I am using JDK 1.3.1, and JBoss 2.4.4 is running un JRE 1.3.1
I am getting a strange Exception:
get context
lookup factory
java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError: org
/apache/log4j/Priority
at org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory.
(SpyConnectionFactoryObjectFactory.java:25)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:195)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.jav
a:45)
at javax.naming.spi.NamingManager.getObjectFactoryFromReference(NamingMa
nager.java:132)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
02)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:437)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:421)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at test.ejb.JMSSender.main(JMSSender.java:24)
at java.lang.reflect.Method.invoke(Native Method)
at com.borland.jbuilder.util.BootStrap.invokeMain(Unknown Source)
at com.borland.jbuilder.util.BootStrap.main(Unknown Source)
***************************
Here is the SourceCode:
Properties props= new Properties();
props.setProperty( "java.naming.factory.initial" , "org.jnp.interfaces.NamingContextFactory");
props.setProperty( "java.naming.provider.url" , "jnp://servix:1099");
props.setProperty( "java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
System.out.println("get context");
InitialContext context = new InitialContext( props);
System.out.println("lookup factory");
TopicConnectionFactory topicFactory = (TopicConnectionFactory)context.lookup("TopicConnectionFactory");
**************************************************
According to the online documentation i have to inlcude jms.jar into the classpath (from the lib/ext directory), but there is no such file in the jBoss 2.4.4 distribution.