Discovering Portals - Jetspeed with WebSphere 5.1
After I tackled getting Jetspeed up and running under tomcat which was mostly effortless, I wanted to get it running under WebSphere 5.1. This process was not an install and go as I hoped it would be! After tackling everything I must say it wasn't jetspeeds fault, it was IBM's, but I did get it running and some demo portlets deployed. Here's how!
I did all this work on my Netra T1 (Solaris 8). The database I wanted to use was mysql version 5 also running on the netra. I have a default install of WebSphere 18.104.22.168.
Install the Software
I downloaded Jetspeed2.0-MultiDb-install.jar from the Apache Portal site
java -jar Jetspeed2.0-MultiDB-install.jar
During the installed it did ask for the database information. I also opted in of all the demo apps this time, since with the tomcat install I didn't. For mysql I used the following info:
-username/password (root/mypassword for the install)
-The connection url:jdbc:mysql://localhost:3306t/jetspeed
-The driver: com.mysql.jdbc.Driver
-The path to the driver file I'm using: mysql-connector-java-3.0.17-ga-bin.jar.
So this created a db added a jetspeed user/password. I then modified some of the permissions to this user. Probably more than you would do if you are just playing with this.
Note: The installer as I noted with tomcat didn't like the version 5 connector.
We should now be able to bring up the install using tomcat which gets installed by default. I'm not going to though!
On the WebSphere side of things we need to prep the environment for the install of the portal.
Add the following jars to the WebSphere lib directory or create a shared library. Personally I used a shared library (note they are not part of the java specs yet), since these are not part of the WebSphere package and I might have different installs of jetspeed going forward which I would need to version these jars as they change.
Add a J2C Authentication Data Entries for the Jetspeed Datasource.
Security=>JAAS Configuration=> J2C Authenticaiton Data
Set the userid/alias and password to the jetspeed user you created. If you left the default from the script install its jetspeed/jetspeed.
After this create a MySQL JDBC Provider.
Resources=> JDBC Providers => New.
Implementation Classname: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
Once complete add a Data Source for Jetspeed.
JNDI Name: jdbc/JetspeedDS
Datasource Helper Classname:com.ibm.websphere.rsadapter.ConnectJDBCDataStoreHelper
Container-managed Authentication Alias: JetspeedDS or the alias you used for J2C above.
Go to custom Properties and set the following:
Apply, OK and Save!
The last bit of prep work we need to do is remove jdom.jar from the WebSphere lib directory. WebSphere uses a very old version of jdom.jar. If you want to replace it you may but jetspeed comes with its own packaged. Currently version 1.0 is available (http://www.jdom.org/). Without making this change portlets will not be deployed from the deploy folder and register inside the container. This was the big show stopper in my install. When you load the portal you get errors like /demo not found.
So we have everything ready now and can deploy jetspeed into an application server. I have a spare one created so I will be using that, its basically a default container with the memory bumped up to 1GB.
Applications=> Install New Application
Path: /jetspeedtmp/jetspeed.war (this should be the path to your war file on the server)
Context Root:/jetspeed (I just used this for testing)
The rest is basically a next,next,next finish routine. Just ensure you bind the datasource settings when prompted.
Click Ok and save.
Check the WEB-INF/deploy directory to ensure all the demo apps reside in there. If not add them in.
Start the Application Server you deployed jetspeed into. Upon startup it should deploy all the demo applications into the ear. You should now be able to hit your portal and see some error messages as follows:
Failed to find Servlet context for Portlet Application: /demo
Stop the portal and go back to the Install New Application. For each "demo" (meaning portlet demo) war you want to install and have deployed we need to install it manually into the container as we did jetspeed itself.
You should be able to see all the portlet wars in the jetspeed_war.ear folder in installedApps. Start with demo.war and move on from there. You can start the portal after you install demo to ensure everything looks ok.
I have found some issues with the default portlets such as j2-admin. Im looking at getting those running now.