14 Replies Latest reply on Feb 2, 2011 4:24 AM by Nicklas Karlsson

    Running GateIn on JBoss AS 6

    Michael Schuetz Novice

      Hi to all,

       

      as we really suffer from bad turnaround times with GateIn running on AS 5.1, I would love to help to get it run on AS 6.

       

      So, as AS 6 CR1 has been released and AS 7 is on schedule, huge API changes might not be expected.

       

      Anyone already tried running GateIn on AS 6?

       

      I would invest some time in helping to get it run. So, is there a JIRA issue, where current status can be tracked?

       

      A description of what has been done in transforming plain AS 5.1 to be GateIn compatbile would help.

       

       

      Thanks for any help

       

       

      Cheers

      Michael

        • 1. Re: Running GateIn on JBoss AS 6
          Thomas Heute Master

          It would have to be tested to see the issues.

          The classloading between 5 to 6 and then 6 to 7 are very different, and so far on JBoss 5 we rely on the Unified class loading, so the packaging will have to change (It's probably not the only thing).

           

          The packaging of JBoss AS at the moment is very cumbersome and rely on a very old packaging technique. For Tomcat it moved to something much cleaner using only Maven  http://anonsvn.jboss.org/repos/gatein/portal/trunk/packaging/tomcat/

           

          We may want to create   http://anonsvn.jboss.org/repos/gatein/portal/trunk/packaging/jboss5   http://anonsvn.jboss.org/repos/gatein/portal/trunk/packaging/tomcat/jboss6  http://anonsvn.jboss.org/repos/gatein/portal/trunk/packaging/jboss7 based on how this is done for Tomcat.

           

          First thing to do would be to try to build GateIn with:

          mvn clean install -Ppkg-jbossas (with packaging/profiles.xml pointing to a JBoss 6 installation) and see what it gives. I never tried that yet, too busy with EPP 5.1

           

          Thanks for the help !

          • 3. Re: Running GateIn on JBoss AS 6
            Marko Strukelj Master
            Here are the instruction to get GateIn working on latest JBoss AS 6
            I presume here that gatein portal trunk has been checked out to /devel/gatein
            1) Prepare JBoss AS
            Do either a) or b):
            a) Download latest JBossAS-6.0.0 http://www.jboss.org/jbossas/downloads.html
               Extract zip into /devel/gatein/packaging/pkg/servers/jboss-as-6
            b) Checkout jbossas trunk
            # checkout jboss-as trunk and build it
            cd /devel
            cd /devel/jboss-as-6
            mvn clean install -DskipTests
            # copy the output into gatein code tree
            cp -r build/target/jboss-6.0.0-SNAPSHOT /devel/gatein/packaging/pkg/servers/jboss-as-6
            Now change some global jboss-as settings. First, turn off classloading isolation:
            vi /devel/gatein/packaging/pkg/server/jboss-as-6/server/default/deployers/ear-deployer-jboss-beans.xml
            find:
            <property name="isolated">true</property>
            make it:
            <property name="isolated">false</property>
            Also, exclude WEB-INF from classpath:
            vi /devel/gatein/packaging/pkg/server/jboss-as-6/server/default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
            find:
            <property name="includeWebInfInClasspath">true</property>
            make it:
            <property name="includeWebInfInClasspath">false</property>
            We're now ready to package GateIn.
            2) Build and package GateIn
            cd /devel/gatein
            mvn clean install -Ppkg-jbossas -Dgatein.checkout.dir=/devel/gatein -Dexo.projects.directory.dependencies=/devel/gatein/packaging/pkg/servers -Dexo.projects.app.jboss.version=jboss-as-6  -Dmaven.test.skip.exec=true
            3) Fix issues that would prevent built GateIn from starting up
            Remove gatein-sample-* stuff (jboss complains about web.xml)
            rm /devel/gatein/packaging/pkg/target/jboss/server/default/deploy/gatein-sample-*
            Remove wsrp (looks like it has some startup order related dependency issues)
            rm /devel/gatein/packaging/pkg/target/jboss/server/default/deploy/gatein.ear/wsrp-*
            vi /devel/gatein/packaging/pkg/target/jboss/server/default/deploy/gatein.ear/META-INF/application.xml
            Comment out wsrp modules at the end of the file:
              <!-- module>
                <web>
                  <web-uri>wsrp-admin-gui.war</web-uri>
                  <context-root>wsrp-admin-gui</context-root>
                </web>
              </module>
              <module>
                <web>
                  <web-uri>wsrp-producer.war</web-uri>
                  <context-root>wsrp-producer</context-root>
                </web>
              </module -->
            3) Start GateIn
            cd /devel/gatein/packaging/pkg/target/jboss/bin
            run

             

            Here are the instruction to get GateIn working on latest JBoss AS 6.

             

            I presume here that GateIn portal trunk (http://anonsvn.jboss.org/repos/gatein/portal/trunk) has been checked out to /devel/gatein.

             

             

            1) Prepare JBoss AS

             

             

            Do either a) or b):

             

            a) Download latest JBossAS-6.0.0 (http://www.jboss.org/jbossas/downloads.html)

               Extract zip into /devel/gatein/packaging/pkg/servers/jboss6

             

            b) Checkout jboss-as trunk and build it

             

            cd /devel

            svn co http://anonsvn.jboss.org/repos/jbossas/trunk jboss6

            cd /devel/jboss6

            mvn clean install -DskipTests

             

            # copy the output into gatein code tree

            cp -r build/target/jboss-6.0.0-SNAPSHOT /devel/gatein/packaging/pkg/servers/jboss6

             

             

            Now change some global jboss-as settings. First, turn off classloading isolation:

             

            vi /devel/gatein/packaging/pkg/server/jboss6/server/default/deployers/ear-deployer-jboss-beans.xml

             

            find:

            <property name="isolated">true</property>

            make it:

            <property name="isolated">false</property>

             

             

            Also, exclude WEB-INF from classpath:

             

            vi /devel/gatein/packaging/pkg/server/jboss6/server/default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml

             

            find:

            <property name="includeWebInfInClasspath">true</property>

            make it:

            <property name="includeWebInfInClasspath">false</property>

             

             

            We're now ready to package GateIn.

             

             

            2) Build and package GateIn

             

            cd /devel/gatein

            mvn clean install -Ppkg-jbossas -Dgatein.checkout.dir=/devel/gatein -Dexo.projects.directory.dependencies=/devel/gatein/packaging/pkg/servers -Dexo.projects.app.jboss.version=jboss6  -Dmaven.test.skip.exec=true

             

             

            3) Fix issues that would prevent built GateIn from starting up

             

            Remove gatein-sample-* stuff (jboss complains about web.xml)

            rm /devel/gatein/packaging/pkg/target/jboss/server/default/deploy/gatein-sample-*

             

            Remove wsrp (looks like it has some startup order related dependency issues)

            rm /devel/gatein/packaging/pkg/target/jboss/server/default/deploy/gatein.ear/wsrp-*

             

            vi /devel/gatein/packaging/pkg/target/jboss/server/default/deploy/gatein.ear/META-INF/application.xml

             

            Comment out wsrp modules at the end of the file:

             

              <!-- module>

                <web>

                  <web-uri>wsrp-admin-gui.war</web-uri>

                  <context-root>wsrp-admin-gui</context-root>

                </web>

              </module>

              <module>

                <web>

                  <web-uri>wsrp-producer.war</web-uri>

                  <context-root>wsrp-producer</context-root>

                </web>

              </module -->

             

             

            3) Start GateIn

             

            cd /devel/gatein/packaging/pkg/target/jboss/bin

            run

             

             

            Hopefully I didn't miss some step here, and you'll be able to get it working

            • 4. Re: Running GateIn on JBoss AS 6
              Michael Schuetz Novice

              Thanks a lot for your replies.Sounds promising.

               

              I will check this out within the next week.

               

               

              Cheers

              Michael

              • 5. Re: Running GateIn on JBoss AS 6
                Chris Laprun Master

                Doesn't work for me:

                14:13:57,320 INFO  [TomcatDeployment] deploy, ctxPath=/portal
                14:13:57,382 ERROR [JBossContextConfig] Error processing: context.xml: org.jboss.web.tomcat.service.session.distributedcache.spi.ClusteringNotSupportedException: No DistributedCacheManagerFactory service provider found.

                 

                Resulting in:

                DEPLOYMENTS IN ERROR:
                  Deployment "jboss.web.deployment:war=/portal" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/Users/gatein/portal/trunk/packaging/pkg/target/jboss/server/default/deploy/gatein.ear/02portal.war/ deployment failed

                 

                    at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.Alpha8]
                    at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.Alpha8]
                    at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.0.0.20101110-CR1]
                    at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:118) [:0.1.0.Alpha1]
                    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:133) [:6.0.0.20101110-CR1]
                    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.20101110-CR1]
                    at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
                    at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
                    at java.lang.Thread.run(Thread.java:680) [:1.6.0_22]

                • 6. Re: Running GateIn on JBoss AS 6
                  Marko Strukelj Master

                  Looks like this is a JBossAS 6 CR1 specific bug, that was already taken care of in jboss-as trunk (http://community.jboss.org/message/572779).

                   

                  I can replicate the problem with CR1. M5 and trunk work fine for me.

                  • 7. Re: Running GateIn on JBoss AS 6
                    Nicklas Karlsson Master

                    I can confirm this still works for AS 6 Final (you have to remember to add the exo repository for building). Did we have to comment out anything important in the wsrp? It would be cool to have AS 6 OOTB since there aren't many EE 6 portlet containers out there yet(?)

                    • 8. Re: Running GateIn on JBoss AS 6
                      Chris Laprun Master

                      I have a potential fix for WSRP and AS 6 that I need to test. Will try to do that today.

                      • 9. Re: Running GateIn on JBoss AS 6
                        Michael Schuetz Novice

                        Would be nice if someone could provide an already patched AS 6 final to download.

                         

                        Thanks,

                        Michael

                        • 10. Running GateIn on JBoss AS 6
                          Nicklas Karlsson Master

                          Did you find time to test?

                          • 11. Running GateIn on JBoss AS 6
                            Chris Laprun Master

                            I haven't been able to test WSRP per se due to some issues with the WSRP admin portlet. However, if you're not using WSRP, GateIn should deploy properly on AS 6, at least in the minimal testing I've done. I'd be interested in hearing about your experience.

                            • 12. Running GateIn on JBoss AS 6
                              Nicklas Karlsson Master

                              Well, I have very little GateIn (or portal engine for that matter) experience so I can only report that it runs with the instructions given above. I tried skipping the fixes one by one but they were still required in order to start up.

                              • 13. Re: Running GateIn on JBoss AS 6
                                Marko Strukelj Master

                                There's new packaging available in the trunk, that supports jboss-as6 (see packaging/jboss-as6/README.txt).

                                 

                                It also has a download option.

                                 

                                Go, give it a try