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!
Staring notes.
--------------
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 5.1.1.5.
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!
WebSphere Setup
--------------------
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.
-jetspeed-api-2.0.jar
-jetspeed-commons-2.0.jar
-portlet-api-1.0.jar
-portals-bridges-common-1.0.jar
-pluto-1.0.1.jar
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.
Name: MySQL
ClassPath: /www/global/lib/mysql-connector-java-3.0.17-ga-bin.jar
Implementation Classname: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
Once complete add a Data Source for Jetspeed.
Name: JetspeedDS
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:
databaseName: jetspeed?autoReconnect=true
username:jetspeed
password:jetspeed
serverName: localhost
port:3306
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.
JetSpeed Deployment
----------------------
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.
JetSpeed Startup
-----------------
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.
Post Issues:
I have found some issues with the default portlets such as j2-admin. Im looking at getting those running now.
Some references:
http://wiki.apache.org/portals/Jetspeed2/Fusion
Hi :)
Do you try to deploy jetspeed on Websphere 6?
I am trying for 3 days to run the jetspeed on WAS 6 without any success!
I found another article for WAS 5.1.2: http://mail-archives.apache.org/mod_mbox/portals-jetspeed-user/200605.mbox/%3c99880612F4650C428948DD14DE44D268A263A8@xmb-blr-414.apac.cisco.com%3e
I try that solution, then your solution and finally a "merged" solution of the two walkthroughs and no results again!
Do you have any idea?
Best regards,
Hélder Sousa
Posted by Hélder Sousa | 10:31 AM, December 20, 2006
What version of Websphere are you using? Websphere 6.0 or Websphere 6.1
Posted by Anonymous | 3:02 PM, January 08, 2007
Hi,
I am using Websphere 6.0
I can run jetspeed on Websphere 6.0 but I can't run any portlets.
Thank you for your help.
Hélder
Posted by Hélder Sousa | 6:40 AM, January 09, 2007
This was was 6.0 at the time.
Posted by Michael Johnson | 6:46 PM, January 17, 2007
What happens when you run the portlets?
Posted by Michael Johnson | 6:46 PM, January 17, 2007