2 Replies Latest reply on Jan 10, 2002 3:31 PM by pbnj130

    Won't recognize jars in lib/ext

    pbnj130

      Hi all,

      I'm running the JBoss2.4.4_Tomcat4.0.1 bundle on Solaris 8. My problem is that JBoss doesn't seem to want to recognize the fact that the jboss-j2ee.jar is in the classpath even though from the print out, I can see that it is loaded from lib/ext:

      ...snip...
      [18:21:24,958,ClassPathExtension] Added library:file:/export/home/openspace/work/development/OpenSpace/Dep
      loy/AppServer/jboss/lib/ext/jnet.jar
      [18:21:24,959,ClassPathExtension] Added library:file:/export/home/openspace/work/development/OpenSpace/Dep
      loy/AppServer/jboss/lib/ext/jboss-j2ee.jar
      [18:21:24,960,ClassPathExtension] Added library:file:/export/home/openspace/work/development/OpenSpace/Dep
      loy/AppServer/jboss/lib/ext/catalina-service.jar
      ...snip...

      I also looked in the JBoss's server.log and the jar file is in java.class.path too. It deploys the tomcat-test.ear fine so I thought it was my code, but when I explicitly add jboss-j2ee.jar to JBOSS_CLASSPATH in run.sh, it works ( actually, it then complains that it can't find log4j, which has also been loaded from lib/ext, but at least it finds jboss-j2ee.jar). I found another post with the same problem, but no reply:

      http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg12536.html//www.mail-archive.com/jboss-user@lists.sourceforge.net/msg12536.html

      My output is below. Does anyone have an idea of what's going on? Thanks very much in advance and for this forum.

      abe

      [18:21:47,824,J2eeDeployer] Create application smi-adm-ejb.jar
      [18:21:47,825,J2eeDeployer] install EJB module smi-adm-ejb.jar
      [18:21:47,897,ContainerFactory] Deploying:file:/export/home/openspace/work/development/OpenSpace/Deploy/Ap
      pServer/jboss/tmp/deploy/Default/smi-adm-ejb.jar
      [18:21:48,180,ContainerFactory] Verifying file:/export/home/openspace/work/development/OpenSpace/Deploy/Ap
      pServer/jboss/tmp/deploy/Default/smi-adm-ejb.jar/ejb1004.jar
      [18:21:48,349,ContainerFactory] Verify failure
      java.lang.NoClassDefFoundError: javax/ejb/SessionBean
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:292)

      ...and so on

        • 1. Re: Won't recognize jars in lib/ext
          marc.fleury

          I think the message is missleading and it has to do with an old version of the j2ee classes from SUN in the classpath somewhere. Usually this happens when you were playing with SUN RI classes.

          It is better to really clean up your classpath and let JBoss use its own stuff, you should NOT have to add anything to the static classpath.

          marcf

          • 2. Re: Won't recognize jars in lib/ext
            pbnj130

            Yep...it looks like JBOSS_CLASSPATH is pretty sensitive to changes I've made and that's confusing the class loaders. I put the jar files in lib/ext, used the original JBOSS_CLASSPATH and it deployed fine. I was hoping to organize the jar files in lib/into folders ext though but that could be getting nitpicky :)

            Thanks for the help.

            abe