0 Replies Latest reply on May 14, 2009 9:23 AM by Thilko Richter

    java.lang.ClassNotFoundException: org.jnp.server.NamingServe

    Thilko Richter Newbie

      Hello,

      i try to connect a jboss server from tomcat 6 with global transactions activated. I am using spring on the client side. During startup of tomcat I get the exception:

      Caused by: java.lang.NoClassDefFoundError: org/jnp/server/NamingServer
      at org.jboss.naming.java.javaURLContextFactory.(javaURLContextFactory.java:52)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:247)
      at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:54)
      at com.sun.naming.internal.ResourceManager.getFactory(ResourceManager.java:371)
      at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:575)
      at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:533)
      at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:320)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at org.jboss.tm.usertx.client.ClientUserTransactionObjectFactory.getUserTransaction(ClientUserTransactionObjectFactory.java:63)
      at org.jboss.tm.usertx.client.ClientUserTransactionObjectFactory.getObjectInstance(ClientUserTransactionObjectFactory.java:89)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
      at org.jnp.interfaces.NamingContext.getObjectInstance(Unknown Source)
      at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(Unknown Source)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:132)
      at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:88)
      at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:130)
      at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:155)
      at org.springframework.transaction.jta.JtaTransactionManager.lookupUserTransaction(JtaTransactionManager.java:565)
      at org.springframework.transaction.jta.JtaTransactionManager.initUserTransactionAndTransactionManager(JtaTransactionManager.java:444)
      at org.springframework.transaction.jta.JtaTransactionManager.afterPropertiesSet(JtaTransactionManager.java:431)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
      ... 118 more
      Caused by: java.lang.ClassNotFoundException: org.jnp.server.NamingServer
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      ... 144 more


      I found the class in jnpserver.jar but I dont have this jar in my classpath and I thought I dont need it on the client, is it? jbossall-client is in the classpath.

      Any suggestions?

      Cheers,

      Thilko