4 Replies Latest reply on Mar 11, 2005 7:18 PM by Bill Burke

    ClassNotFoundException after switch to Preview4 from Preview

    Bill Burke Master

      a bunch of entity classes have changed packages, specifically @Entity to javax.persistence.Entity. You'll have to do a full recompile. Don't know if that is the issue.

      .ejb3 files should definately deploy before wars. JBoss has a default ordering based on file extension (which is pluggable and changeable).

      You need to give me more information like stack traces and how the WAR is using ejb3. Otherwise I can only guess...

        • 1. Re: ClassNotFoundException after switch to Preview4 from Pre
          Juraj Holtak Newbie

           

          19:44:19,456 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.Address
          19:44:19,457 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.Assignment
          19:44:19,458 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.CalculationSchema
          19:44:19,460 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.Day
          19:44:19,462 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.DayProperty
          19:44:19,466 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.Dienststelle
          19:44:19,470 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.Filiale
          19:44:19,476 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.Firma
          19:44:19,479 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.InfoPerson
          19:44:19,482 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.MVerleih
          19:44:19,485 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.Mitarbeiter
          19:44:19,490 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.Person
          19:44:19,492 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.RechteManagement
          19:44:19,500 INFO [Ejb3Module] found EJB3 stateless session bean: com.ose.ejb.entity.StammdatenDAOBean
          19:44:19,506 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.Week
          19:44:19,509 INFO [Ejb3Module] found EJB3 stateless session bean: com.ose.ejb.entity.WeekDAOBean
          19:44:19,512 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.WeekProperty
          19:44:19,514 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.BObject
          19:44:19,516 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.BObjectTab
          19:44:19,517 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.BObjectTabEntry
          19:44:19,518 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.HTMLCheckboxElement
          19:44:19,518 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.HTMLHiddenElement
          19:44:19,519 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.HTMLPasswordElement
          19:44:19,521 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.HTMLRadioElement
          19:44:19,522 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.HTMLSelectElement
          19:44:19,523 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.HTMLSelectMultipleElement
          19:44:19,524 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.HTMLTextElement
          19:44:19,525 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.HTMLTextareaElement
          19:44:19,527 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.MultipleCheckboxItem
          19:44:19,528 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.MultipleItem
          19:44:19,529 INFO [Ejb3Module] found EJB3 Entity bean: com.ose.ejb.entity.gui.SelectedValue
          19:44:19,530 INFO [Ejb3Module] found EJB3 stateless session bean: com.ose.ejb.session.HelloBean
          19:44:19,536 INFO [Ejb3Module] found EJB3 stateless session bean: com.ose.ejb.session.SelectmenuSessionBean
          19:44:19,544 INFO [Ejb3Module] found EJB3 stateless session bean: com.ose.ejb.session.gui.BObjectDataSessionBean
          19:44:19,553 INFO [Ejb3Module] found EJB3 stateless session bean: com.ose.ejb.session.gui.BObjectSessionBean
          19:44:19,727 INFO [Ejb3Module] EJB3 jar using default hibernate.properties: {hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.hbm2ddl.auto=create-drop, hibernate.connection.datasource=java:/DefaultDS, hibernate.query.factory_class=org.hibernate.hql.ast.ASTQueryTranslatorFactory}
          19:44:19,743 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB3,module=ose.ejb3
          java.lang.NoClassDefFoundError: com/ose/bean/actionform/elements/BObjectActionFormBean
           at java.lang.Class.getDeclaredMethods0(Native Method)
           at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
           at java.lang.Class.getDeclaredMethods(Class.java:1763)
           at org.jboss.ejb3.entity.EntityToHibernateXml.getPropertiesByMethod(EntityToHibernateXml.java:389)
           at org.jboss.ejb3.entity.EntityToHibernateXml.getDeclaredEntityProperties(EntityToHibernateXml.java:379)
           at org.jboss.ejb3.entity.EntityToHibernateXml.handlePrimaryKey(EntityToHibernateXml.java:1067)
           at org.jboss.ejb3.entity.EntityToHibernateXml.handleBasicClass(EntityToHibernateXml.java:1814)
           at org.jboss.ejb3.entity.EntityToHibernateXml.handleClass(EntityToHibernateXml.java:1431)
           at org.jboss.ejb3.entity.EntityToHibernateXml.convert(EntityToHibernateXml.java:134)
           at org.jboss.ejb3.entity.HibernateSessionFactory.createSessionFactory(HibernateSessionFactory.java:144)
           at org.jboss.ejb3.Ejb3Module.createHibernateSessionFactory(Ejb3Module.java:252)
           at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:264)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
           at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
           at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
           at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
           at $Proxy0.start(Unknown Source)
           at org.jboss.system.ServiceController.start(ServiceController.java:416)
           at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
           at $Proxy16.start(Unknown Source)
           at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:166)
           at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
           at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
           at $Proxy8.deploy(Unknown Source)
           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
          19:44:19,748 INFO [EJB3Deployer] Deployed: file:/home/juraj/jboss/server/ose/deploy/ose.ejb3
          19:44:21,123 INFO [TomcatDeployer] deploy, ctxPath=/ose, warUrl=file:/home/juraj/jboss/server/ose/tmp/deploy/tmp26007ose.war/
          19:44:21,596 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
          MBeans waiting for other MBeans:
          ObjectName: jboss.j2ee:service=EJB3,module=ose.ejb3
           state: FAILED
           I Depend On:
           Depends On Me: java.lang.NoClassDefFoundError: com/ose/bean/actionform/elements/BObjectActionFormBean
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.entity.StammdatenDAOBean
           state: CREATED
           I Depend On:
           Depends On Me:
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.entity.WeekDAOBean
           state: CREATED
           I Depend On:
           Depends On Me:
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.session.HelloBean
           state: CREATED
           I Depend On:
           Depends On Me:
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.session.SelectmenuSessionBean
           state: CREATED
           I Depend On:
           Depends On Me:
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.session.gui.BObjectDataSessionBean
           state: CREATED
           I Depend On:
           Depends On Me:
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.session.gui.BObjectSessionBean
           state: CREATED
           I Depend On:
           Depends On Me:
          
          MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.session.SelectmenuSessionBean
           state: CREATED
           I Depend On:
           Depends On Me:
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.entity.WeekDAOBean
           state: CREATED
           I Depend On:
           Depends On Me:
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.session.HelloBean
           state: CREATED
           I Depend On:
           Depends On Me:
          ObjectName: jboss.j2ee:service=EJB3,module=ose.ejb3
           state: FAILED
           I Depend On:
           Depends On Me: java.lang.NoClassDefFoundError: com/ose/bean/actionform/elements/BObjectActionFormBean
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.entity.StammdatenDAOBean
           state: CREATED
           I Depend On:
           Depends On Me:
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.session.gui.BObjectSessionBean
           state: CREATED
           I Depend On:
           Depends On Me:
          ObjectName: jboss.j2ee:service=EJB3,name=com.ose.ejb.session.gui.BObjectDataSessionBean
           state: CREATED
           I Depend On:
           Depends On Me:
          
          



          As I didn`t wrote the code, I don`t exactly know what to look at.
          I`ll consult the guy who wrote it and post here again.



          • 2. Re: ClassNotFoundException after switch to Preview4 from Pre
            Bill Burke Master

            Is the ejb3 jar looking for classes that are only within the WAR? It seems to be looking for an action bean. (Some struts thingy?)

            So you have a WAR and a .ejb3 jar in the deploy directory?

            Where is the com/ose/bean/actionform/elements/BObjectActionFormBean class located?

            • 3. Re: ClassNotFoundException after switch to Preview4 from Pre
              Juraj Holtak Newbie

              in both.

              .ejb3 and .war

              i`m completely sure

              • 4. Re: ClassNotFoundException after switch to Preview4 from Pre
                Bill Burke Master

                if you could send a small testcase that I can reproduce, that would be most helpful.