4 Replies Latest reply on Apr 20, 2006 9:18 AM by Henrik Johansson

    Problem with JBoss 404cr2 and EJB3rc6

    Henrik Johansson Newbie

      Hi,

      I'm in the middle of the process of migrating from JBoss 403sp1 with EJB3rc3 to JBoss 404cr2 with EJB3rc6 and I'm having problems.

      When deploying my .ear package (containing an application.xml file in the META-INF directory pointing out one jar containing session beans and two other jars containing entity beans) the following exception is thrown:

      16:18:32,021 INFO [EARDeployer] Init J2EE application: file:/opt/UMC/jboss/server/all/deploy/axessity.ear
      16:18:34,725 INFO [Ejb3Deployment] EJB3 deployment time took: 1035
      16:18:34,924 INFO [Ejb3Deployment] EJB3 deployment time took: 179
      16:18:35,106 INFO [Ejb3Deployment] EJB3 deployment time took: 162
      16:18:35,444 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=RegisterBean,service=EJB3
      16:18:35,445 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=RegisterBean,service=EJB3
      16:18:35,445 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=UserBean,service=EJB3
      16:18:35,446 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=UserBean,service=EJB3
      16:18:35,446 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=AxessityConfigBean,service=EJB3
      16:18:35,447 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=AxessityConfigBean,service=EJB3
      16:18:35,447 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=CompanyBean,service=EJB3
      16:18:35,447 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=CompanyBean,service=EJB3
      16:18:35,448 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=IspCustomerBean,service=EJB3
      16:18:35,448 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=IspCustomerBean,service=EJB3
      16:18:35,449 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=PersonBean,service=EJB3
      16:18:35,450 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=PersonBean,service=EJB3
      16:18:35,450 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=PlugBean,service=EJB3
      16:18:35,450 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=PlugBean,service=EJB3
      16:18:35,451 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=RegisterEquipmentBean,service=EJB3
      16:18:35,451 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=RegisterEquipmentBean,service=EJB3
      16:18:35,452 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=ServiceBean,service=EJB3
      16:18:35,452 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=ServiceBean,service=EJB3
      16:18:35,452 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=SubscriberBean,service=EJB3
      16:18:35,453 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=SubscriberBean,service=EJB3
      16:18:35,453 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=UserUtilsBean,service=EJB3
      16:18:35,454 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:ear=axessity.ear,jar=axessity-beans.jar,name=UserUtilsBean,service=EJB3
      16:18:35,715 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB3,module=axessity-beans.jar
      java.lang.TypeNotPresentException: Type javax.ejb.PostConstruct not present
       at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
       at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
       at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
       at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:351)
       at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:175)
       at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
       at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
       at java.lang.reflect.Method.declaredAnnotations(Method.java:676)
       at java.lang.reflect.Method.getAnnotation(Method.java:663)
       at org.jboss.aop.annotation.AnnotationElement.getVisibleAnnotation(AnnotationElement.java:33)
       at org.jboss.aop.Advisor.resolveAnnotation(Advisor.java:270)
       at org.jboss.ejb3.injection.InjectionUtil.getAnnotation(InjectionUtil.java:107)
       at org.jboss.ejb3.injection.PersistenceContextHandler.loadMethodDependencies(PersistenceContextHandler.java:287)
       at org.jboss.ejb3.injection.PersistenceContextHandler.loadDependencies(PersistenceContextHandler.java:409)
       at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:250)
       at org.jboss.ejb3.SessionContainer.processMetadata(SessionContainer.java:77)
       at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:429)
       at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:478)
       at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor2.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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       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:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
       at $Proxy28.start(Unknown Source)
       at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:385)
      ...
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: javax.ejb.PostConstruct
       at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:490)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:392)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:242)
       at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
       ... 79 more
      


      The root cause is that the class javax.ejb.PostConstruct could not be found. Well, not that strange as the class is moved to the javax.annotation-package. I'm also not making use of the @PostConstruct annotation, yet.

      Is this perhaps a misconfiguration issue caused by myself? The documentation I have found tells that the 404cr2 release of JBoss comes bundled with EJB3rc6, at least that is how I interpret it. This is perhaps true with the installer, but definetly not with the zipped version that I use. (The installer crashes for me on the 3rd or 4th screen or so and I use JDK1.5.0_06.)

      No installation instructions for EJB3rc6 are talking about how to install into 404cr2 so I went along and followed the instructions for migrating from 403sp1.

      How am I supposed to install and configure JBoss 404cr2 with EJB3rc6 in a correct manner?



        • 1. Re: Problem with JBoss 404cr2 and EJB3rc6
          William DeCoste Apprentice

          Can you confirm that the jboss-ejb3x.jar file is in the deploy/ejb3.deployer directory?

          • 2. Re: Problem with JBoss 404cr2 and EJB3rc6
            Henrik Johansson Newbie

            Yes, there is a jboss-ejb3x.jar located there. It is taken från the EJB3RC6 package. I suppose the EJB3RC6 package is compatible with JBoss AS 4.0.4CR2?

            There is a difference between the RC5 and RC6 versions where PostConstruct.class is moved from the javax.ejb package to javax.annotations. But that you are of course already aware of...

            • 3. Re: Problem with JBoss 404cr2 and EJB3rc6
              Henrik Johansson Newbie

              I succeeded to install JBoss AS 4.0.4.CR2 (configured it with ejb3 clustering as "all") with the jar-installer but ends up with the same result as before:

              java.lang.TypeNotPresentException: Type javax.ejb.PostConstruct not present
              Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: javax.ejb.PostConstruct
              


              ...without having done any modifications on the installation when it comes to the EJB3 part. I also checked the /deploy/ejb3.deployer/ directory to confirm that the jboss-ejb3x.jar is in place, and it is.

              This is a quick structure description of our packaged application:

              axessity.ear
              --META-INF
              ----application.xml
              ----MANIFEST.MF
              --axessity-sae.sar
              ----META-INF
              ------MANIFEST.MF
              ------jboss-service.xml
              ----[packaged service classes]
              --axessity.sar
              ----META-INF
              ------jboss-service.xml
              ------MANIFEST.MF
              ----[packaged service classes]
              --axessity.war
              ----[directories with web content, jsp files, applets, etc]
              ----META-INF
              ------MANIFEST.MF
              ----WEB-INF
              ------classes
              ------lib (containing .jars only for web tier)
              ------tld
              ------web.xml
              --axessity-beans.jar
              ----META-INF
              ------MANIFEST.MF
              ----[packaged EJB Session Beans, application exceptions and util classes]
              --axessity-citynet.jar
              ----META-INF
              ------MANIFEST.MF
              ------persistence.xml (EntityManager for database #1)
              ----[packaged Entity Beans]
              --axessity-portal.jar
              ----META-INF
              ------MANIFEST.MF
              ------persistence.xml (EntityManager for database #2)
              ----[packaged Entity Beans]

              Any obvious problems with this packaging? It worked fine with JBoss AS 4.0.3SP1.

              We have followed the wiki migration guide for EJB's, Hibernate and persistence.xml.

              We are also depending on xmbeans with attribute persistence so I had to modify the /all/conf/jboss-service.xml to use the AttributePersistenceService.

              Another thing we depend on is System.properties and we add properties to the system from a properties file residing in /all/conf/ and pointing it out in the properties-service.xml in the /all/deploy/ directory. properties-plugin.jar is also added to /all/lib/ as it holds org.jboss.varia.property.PropertyEditorManagerService. Never been a problem before.

              Anyone else that have succeeded to migrate to 4.0.4CR2 + EJB3RC6?

              • 4. Re: Problem with JBoss 404cr2 and EJB3rc6
                Henrik Johansson Newbie

                Downgraded to EJB3RC5 (still with 4.0.4CR2) and now it all works fine.

                I don't know, but it feels to me like JBoss could have a compatibility issue with the latest AS release candidate - or candidate release :-S - and EJBRC6?