Tuesday, February 01, 2005

Deploying jetspeed 2 on JBoss 4.0.1, succeeded!

Finally succeeded with many thanx to Tom Pesendorfer.
He wrote a proper description for J2's wiki.

It all came down to portlet deployment. The portlets can only be deployed after JBoss is started.
According to his description the portlets even need to be undeployed before stopping JBoss, and re-deployed after starting.

Obviously I tried to stop and start JBoss without undeploying the portlets and J2 still worked fine.

In short these are the steps I followed to deploy J2 M1 on JBoss 4.0.1, assuming that a database on MaxDB is already configured:

  1. Copy the default server configuration and name it e.g. jetspeed.

  2. Create a new subdirectory in the directory /jboss-4.0.1/server/jetspeed/lib named j2lib

  3. Copy the sapdb driver jar into that directory

  4. Copy the maxdb datasource descriptor file into the /jboss-4.0.1/server/jetspeed/deploy directory

  5. Open the file /jboss-4.0.1/server/jetspeed/conf/jboss-service.xml

  6. Locate the line that reads <classpath codebase="lib" archives="*">

  7. Add a similar line below it that reads <classpath codebase="lib/j2lib" archives="*">

  8. Copy the jars pluto-1.0.1-rc1.jar, portals-bridges-common-0.1.jar, jetspeed-commons-2.0-M1.jar, jetspeed-api-2.0-M1.jar and portlet-api-1.0.jar into the directory /jboss-4.0.1/server/jetspeed/lib/j2lib

  9. Create the directory /jboss-4.0.1/server/jetspeed/deploy/jetspeed.war

  10. Extract the contents of the file jetspeed.war into that directory

  11. Move the jars commons-logging-1.0.3.jar, log4j-1.2.8.jar, xerces-2.3.0.jar and xml-apis-2.0.2.jar from the directory /jboss-4.0.1/server/jetspeed/deploy/jetspeed.war/WEB-INF/lib into /jboss-4.0.1/server/jetspeed/lib/j2lib

  12. Open the file /jboss-4.0.1/server/jetspeed/deploy/jetspeed.war/WEB-INF/assembly/jetspeed-spring.xml

  13. Locate the bean definition with id 'org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager' and comment out the Tomcat version and uncomment the JBoss version.

  14. Start JBoss

  15. Copy all desired portlet war files into the directory /jboss-4.0.1/server/jetspeed/deploy/jetspeed.war/WEB-INF/deploy
    You need at least the file jetspeed-layouts.war.
Now browse to http://localhost:8080/jetspeed and you should see jetspeed up and running.

3 comments:

Anonymous said...

Has anyone tried integrating jetspeed 2.1.3 with JBOSS 4.2.2. The instructions on the wiki totally fail. For instance moving the jetspeed version of xerces into the jboss lib dir breaks jboss for all servlets.

Thanks,
Steve
steve.cook@ngc.com

Anonymous said...

Thats true.Need to find out a way to implement the same.

SpiderMars said...

Because of these issues we went along and implemented JBoss Portal on a JBoss AS environment.
That combination, obviously, works stable.
I didn't look at JS anymore after this exercise, but in those days I considered it unstable and not documented well.