2 Replies Latest reply on Mar 2, 2011 3:12 AM by jaikiran

    JBoss 4 to Jboss 5 migration: JSF, EJB3...

    faraon02

      Hi

       

      I have a project based on JSF 1.2 (MyFaces) + EJB3 tech stack which is working fine on Jboss 4.2.3 + JDK 1.6

      Recently I have decided to migrate it to Jboss 5.1.0 GA and got some issues but didnt find clear source how to resolve them so decided to make this post and hope the community could bring some additional points.

       

      My application (ear) consist of 2 wars + 1 ejb jar. 1 war is JAX-RS services and for the moment I disabled it.

       

      I will explain my issues and current resolution for each of them:

       

      1) All org.jboss.annotation.ejb imports must be replaced with org.jboss.ejb3.annotation


      2) Now most irritating - errors related with CDI implementation.  I had such error during startup - but my application DOESNT have any dependency on webbeans!!! Why I'm getting this?

      Caused by: java.lang.IllegalArgumentException: Exception loading class for ScopeKey addition.
       at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:67)
       at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:126)
       ... 34 more
      Caused by: java.lang.ClassNotFoundException: org.jboss.webbeans.bootstrap.WebBeansBootstrap from BaseClassLoader
      
      

      Because by default webbeans deployer will treat your application as the app with webbeans support...

      Solution: remove from your server/deploeyrs webbeans.deployer folder

       

      If you want to use webbeans capabilities:

      there is http://docs.jboss.org/webbeans/reference/1.0.0.PREVIEW1/en-US/html_single/

      look on container contract part.

       

      3) Change the JMS configuration - see the official docs

       

      Hope it will help for people who will have the same problems...

       

      Will add more details about JAX-RS later...

        • 1. Re: JBoss 4 to Jboss 5 migration: JSF, EJB3...
          jaikiran

          Anton Gavazuk wrote:

           


           

          1) All org.jboss.annotation.ejb imports must be replaced with org.jboss.ejb3.annotation

          That's correct. The package changed between AS4.x and AS5.

           

           

          Anton Gavazuk wrote:

           


           

          2) Now most irritating - errors related with CDI implementation.  I had such error during startup - but my application DOESNT have any dependency on webbeans!!! Why I'm getting this?

          Caused by: java.lang.IllegalArgumentException: Exception loading class for ScopeKey addition.
          at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:67)
          at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:126)
          ... 34 more
          Caused by: java.lang.ClassNotFoundException: org.jboss.webbeans.bootstrap.WebBeansBootstrap from BaseClassLoader



          Because by default webbeans deployer will treat your application as the app with webbeans support...


          Solution: remove from your server/deploeyrs webbeans.deployer folder



          I haven't seen anyone bring up an issue related to this. So this looks new. Can you please add a bit more details about your application contents, especially the packaging? You shouldn't have seen that ClasstNotFoundException.

          • 2. Re: JBoss 4 to Jboss 5 migration: JSF, EJB3...
            jaikiran

            By the way, if it's an option then you should consider using the latest JBoss AS 6.0.0.Final instead of JBoss AS 5.1.0.