You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@reverycodes.com> on 2004/02/07 15:35:26 UTC

JMS: WARN during startup

Hi,

Found WARN [1] in the core.log with "java.lang.ClassNotFoundException: 
org.exolab.jms.jndi.InitialContextFactory". Is it something which should 
not be happening? Geoff? ;-)

Vadim

[1] Stacktrace:
WARN    (2004-02-07) 09:28.38:724   [core] (Unknown-URI) 
Unknown-thread/JMSConnectionImpl: Cannot get Initial Context.  Is the 
JNDI server reachable?
javax.naming.NoInitialContextException: Cannot instantiate class: 
org.exolab.jms.jndi.InitialContextFactory [Root exception is 
java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextFactory]
    at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
    at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at 
org.apache.cocoon.components.jms.JMSConnectionImpl.setupContext(JMSConnectionImpl.java:257)
    at 
org.apache.cocoon.components.jms.JMSConnectionImpl.initialize(JMSConnectionImpl.java:156)
    at 
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)
    at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:313)
    at 
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:143)
    at 
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:558)
    at 
org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:547)
    at 
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)
    at org.apache.cocoon.Cocoon.initialize(Cocoon.java:340)
    at 
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)
    at 
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1371)
    at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:514)
    at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219)
    at 
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:445)
    at 
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:150)
    at 
org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:449)
    at org.mortbay.http.HttpServer.start(HttpServer.java:663)
    at org.mortbay.jetty.Server.main(Server.java:429)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at Loader.invokeMain(Unknown Source)
    at Loader.run(Unknown Source)
    at Loader.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: 
org.exolab.jms.jndi.InitialContextFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:207)
    at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:171)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at 
com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
    at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
    ... 28 more


Re: JMS: WARN during startup

Posted by Geoff Howard <co...@leverageweb.com>.
Vadim Gritsenko wrote:

> Hi,
> 
> Found WARN [1] in the core.log with "java.lang.ClassNotFoundException: 
> org.exolab.jms.jndi.InitialContextFactory". Is it something which should 
> not be happening? Geoff? ;-)

Sorry, it's been too long since I've looked at this, and had forgotten: 
we don't bundle the jms/jndi implementation.  And then it's pretty 
reasonable to have a class not found!  From the samples description for 
the JMS block:

For this sample, the HSQLDB block and the databases block need to be 
present. For the JMS part, a JMS service and libraries e.g. OpenJMS 
needs to be present and running. JMS connection parameters are set in a 
way to work with the OpenJMS demo.

Now, it would be better to intelligently catch this situation and give a 
special warning/message.  Looking into it now....

Geoff

> [1] Stacktrace:
> WARN    (2004-02-07) 09:28.38:724   [core] (Unknown-URI) 
> Unknown-thread/JMSConnectionImpl: Cannot get Initial Context.  Is the 
> JNDI server reachable?
> javax.naming.NoInitialContextException: Cannot instantiate class: 
> org.exolab.jms.jndi.InitialContextFactory [Root exception is 
> java.lang.ClassNotFoundException: 
> org.exolab.jms.jndi.InitialContextFactory]
>    at 
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)