1 Reply Latest reply on Sep 15, 2010 1:25 AM by i3719

    ClassNotFoundException with JBoss 5

    i3719 Newbie

      Hi ,

      I have a problem when JBoss 4.2x to JBoss 5.

       

      My  enviroment is

          JDK 1.6.0_13

          JBoss 5.0.1GA

       

      Error "Caused by: java.lang.ClassNotFoundException: jp.co.A"  was occured when I deploy my EAR apllication.

      "jp.co.A" Class was in "D:/work/lib/a.jar" which defined by MAINIFEST.MF's Class-Path. And MAINIFEST.MF was in "manifest.jar" which defined in application.xml  as java module.

       

      When I put the a.jar to "%jboss_home%/server/default/lib" the problem was OK. But I donn't  want to change my application's structure.Is JBoss 5 's ClassLoader changes? or another reason. How can I do about that. Please help me.

       

      Whole error log is:

      2010-09-10 14:29:56,750    []    [main]    [WARN ]    org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore    WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
      2010-09-10 14:29:56,796    []    [main]    [WARN ]    org.jboss.annotation.factory.AnnotationCreator    No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
      2010-09-10 14:30:01,953    []    [main]    [WARN ]    org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper    supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
      2010-09-10 14:30:01,953    []    [main]    [WARN ]    org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper    supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
      2010-09-10 14:30:02,875    []    [main]    [ERROR]    org.jboss.kernel.plugins.dependency.AbstractKernelController    Error installing to Real: name=vfszip:/D:/opt/jboss/jboss-5.0.1.GA/server/default/deploy/CUSTSEARCH.ear/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error deploying CUSTSEARCHejb.jar: Ljp/co/A;
          at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:201)
          at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:103)
          at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
          at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
          at org.jboss.Main.boot(Main.java:209)
          at org.jboss.Main$1.run(Main.java:547)
          at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.NoClassDefFoundError: Ljp/co/A;
          at java.lang.Class.getDeclaredFields0(Native Method)
          at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
          at java.lang.Class.getDeclaredFields(Class.java:1743)
          at org.jboss.aop.Advisor.doDeployAnnotationOverride(Advisor.java:454)
          at org.jboss.aop.Advisor$DeployAnnotationOverrideAction$2.deploy(Advisor.java:2016)
          at org.jboss.aop.Advisor.deployAnnotationOverride(Advisor.java:415)
          at org.jboss.aop.Advisor.deployAnnotationOverrides(Advisor.java:399)
          at org.jboss.aop.ClassAdvisor.rebindClassMetaData(ClassAdvisor.java:1223)
          at org.jboss.ejb3.interceptors.container.ManagedObjectAdvisor.rebindClassMetaData(ManagedObjectAdvisor.java:180)
          at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:290)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:274)
          at org.jboss.ejb3.interceptors.container.ManagedObjectAdvisor.initialize(ManagedObjectAdvisor.java:174)
          at org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor.initialize(ExtendedManagedObjectAdvisor.java:70)
          at org.jboss.ejb3.interceptors.container.AbstractContainer.initializeAdvisor(AbstractContainer.java:162)
          at org.jboss.ejb3.aop.BeanContainer.initialize(BeanContainer.java:206)
          at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:249)
          at org.jboss.ejb3.session.SessionContainer.<init>(SessionContainer.java:119)
          at org.jboss.ejb3.session.SessionSpecContainer.<init>(SessionSpecContainer.java:71)
          at org.jboss.ejb3.stateless.StatelessContainer.<init>(StatelessContainer.java:116)
          at org.jboss.ejb3.Ejb3AnnotationHandler.getStatelessContainer(Ejb3AnnotationHandler.java:310)
          at org.jboss.ejb3.Ejb3DescriptorHandler.getStatelessContainer(Ejb3DescriptorHandler.java:498)
          at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:203)
          at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:668)
          at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:628)
          at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:610)
          at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:573)
          at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:488)
          at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:187)
          ... 23 more
      Caused by: java.lang.ClassNotFoundException: jp.co.A
          at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:247)
          at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:279)
          at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1102)
          at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:772)
          at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:415)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
          ... 52 more
      2010-09-10 14:30:03,078    []    [main]    [ERROR]    org.jboss.system.server.profileservice.ProfileServiceBootstrap    Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

      DEPLOYMENTS IN ERROR:
        Deployment "vfszip:/D:/opt/jboss/jboss-5.0.1.GA/server/default/deploy/CUSTSEARCH.ear/" is in error due to the following reason(s): java.lang.ClassNotFoundException: jp.co.A

        • 1. Re: ClassNotFoundException with JBoss 5
          i3719 Newbie

          I test  with simple seam project which only have a action in ear.

           

          the result is:

          If  MENIFEST.MF's  Class-Path was defined by absolute path (like my project) :

          it was working well  in  JBoss4.2.2GA + seam2.0.2SP1+ JDK1.6.0_13

          but down in JBoss 5.0.1GA/JBoss 5.1.0GA + seam2.2.0GA + JDK1.6.0_13

          a.jar ‘s class was not founded.....

          where the prolem is? where changes?

           

          MANIFEST.MF:

          Manifest-Version: 1.0
          Ant-Version: Apache Ant 1.7.0
          Class-Path: file:///opt/a.jar
          Created-By: 1.5.0_11-b03 (Sun Microsystems Inc.)