4 Replies Latest reply on Nov 8, 2011 2:37 PM by dah

    ClassNotFoundException on startup - Jboss issue?

    dah

      Hi,

      I'm migrating from JBOSS4 to 7 and I am getting a ClassNotFoundException exception on startup with my app.  I'm running this as an exploded war in standalone mode.  There is no place in my application code where JaxrsComponentDeployer, mentioned in the below error message is being used.  I also attempted to add jboss-as-jaxrs-7.0.0.Beta3.jar to my app's/web-inf/lib folder and restart the server.  It still shows the same error...

       

      Any ideas on what I can do? 

       

      Stack trace is...

       

      12:03:34,126 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."plu.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."plu.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "plu.war"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.ClassNotFoundException: examples.ShowSource from [Module "deployment.plu.war:main" from Service Module Loader]

          at org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer.deploy(JaxrsComponentDeployer.java:63)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

          ... 5 more

      Caused by: java.lang.ClassNotFoundException: examples.ShowSource from [Module "deployment.plu.war:main" from Service Module Loader]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)

          at org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer.deploy(JaxrsComponentDeployer.java:61)

          ... 6 more

        • 1. Re: ClassNotFoundException on startup - Jboss issue?
          jaikiran

          Caused by: java.lang.ClassNotFoundException: examples.ShowSource

           

          Where exactly is the examples.ShowSource class located in the plu.war?

          • 2. Re: ClassNotFoundException on startup - Jboss issue?
            dah

            That's the thing, examples.ShowSource is not in my plu.war source classes. For some reason, I'm getting exceptions with the modules on startup when I boot up the plu.war.  I tried removing some of the modules in the standalone.xml file (which I figured I probably shouldn't be doing), and it removes some of the errors, but classnotfoundexceptions keep popping up for various org.as classes.  For example if I remove the following lines from standalone.xml

                  <extension module="org.jboss.as.jaxrs"/>

            <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

             

            Then that error above goes away, but then I get this...

             

            Caused by: java.lang.ClassNotFoundException: examples.ShowSource from [Module "deployment.plu.war:main" from Service Module Loader]

                   at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]

                   at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                   at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                   at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                   at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                   at java.lang.Class.forName0(Native Method) [:1.6.0_27]

                   at java.lang.Class.forName(Class.java:247) [:1.6.0_27]

              at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:

             

            So I figure, might as well remove the <extension module="org.jboss.as.ee"/> module as well, but I can't do that, because if I do that, it can't deploy my mysql and oracle database drivers.  (I am dropping those two jars in the standalone folder and deploying them via a dodeploy file). 

             

            So I'm somewhat stuck at the moment, there must be a better way.  Thanks jaikiran for being willing to help.  I'll search my jar files today as well to make sure there is no examples.ShowSource file.  But when I do a code search in eclispe nothing comes up for my class files.  I'm guessing I must have some conflicting jar?  If you can think of anything else I'm all ears. 

            • 3. Re: ClassNotFoundException on startup - Jboss issue?
              jaikiran

              Actually, it's not about the standalone.xml. Some class or xml within the application (plu.war) that you are deploying has a reference to that examples.ShowSource class. See if you can find out what references that class. If you can't figure out then attach that war to this thread, someone else might help you find out the reference.

              1 of 1 people found this helpful
              • 4. Re: ClassNotFoundException on startup - Jboss issue?
                dah

                Thanks jaikiran, yes there was a jar file that had a tld tag which was pointing to that examples.showSource, but that class was not found in the jar.  Thanks for your help.