You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Bierenfeld <mi...@atmiralis.de> on 2001/09/17 15:31:30 UTC

cocoon 1.8.2 and jboss

Hi there,

does anybody experienced problems with jboss. While "executing" the
following code snipplet :


        String jndiName = <xsl:text>"</xsl:text><xsl:value-of
select="@jndiname"/><xsl:text>"</xsl:text>;

        debugMessage ("jndiname [" + <xsl:text>"</xsl:text><xsl:value-of
select="@jndiname"/><xsl:text>"</xsl:text> + "] beanname [" +
                      <xsl:text>"</xsl:text><xsl:value-of
select="@beanname"/><xsl:text>"</xsl:text> + "]");

        InitialContext jndiContext = new InitialContext();

        debugMessage ("lookup started for [" + jndiName + "]");
        Object ref  = jndiContext.lookup(jndiName);
        debugMessage ("lookup finished");

        <xsl:value-of select="@beanname"/>Home home = (<xsl:value-of
select="@beanname"/>Home) 
		PortableRemoteObject.narrow (ref, <xsl:value-of
select="@beanname"/>Home.class);

        debugMessage ("narrow finished");

I receive "javax.naming.NoInitialContextException".
$JBOSS_DIST/.../jndi.jar is in the classpath. I doubt its a classloading
issue.

The full text of the exception is :

Cocoon 1.8.2

                                                                                      
Error found handling the request.

      javax.naming.NoInitialContextException: Need to specify class name
in environment or system property, or as an applet parameter, or in an
application resource file:  java.naming.factory.initial
              at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:643)
              at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
              at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:283)
              at
javax.naming.InitialContext.lookup(InitialContext.java:350)
              at
_home._global._Projekte._Dsm._xml._content._menu._menu.populateDocument(_menu.java:166)
              at
org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
              at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:527)
              at org.apache.cocoon.Engine.handle(Engine.java:384)
              at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
              at
javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
              at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
              at
org.apache.jserv.JServConnection.run(JServConnection.java:188)
              at java.lang.Thread.run(Thread.java:484)



Regards

Michael

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>