Reposting again. ________________________________
From: Krishna Kumar (krishkum) Sent: Thursday, April 06, 2006 10:49 AM To: Jetspeed Users List Subject: Steps to build and deploy Jetspeed 2 in Websphere 5.1 Hi Guys, After so many hiccups the following is the solution for Websphere 5.1. But still I am not able to bring up the j2-admin.war as an application in WAS 5.1. Steps to configure, build and deploy Jetspeed2 with Oracle in WAS 5.1 Note: First do a successful build and deploy Jetspeed 2 with Tomcat and do the following. 1. Creation of myPortal.ear Create jetspeed.war from <TOMCAT_HOME>\webapps\jetspeed (Don't use the already existing jetspeed.war in <TOMCAT_HOME>/webapps as it won't have Layouts which are required for the portlet application) Create demo.war from <TOMCAT_HOME>\webapps\demo Create a ear using these war files jetspeed.war and demo.war Provide the following details in application.xml under META-INF folder <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'> <application> <display-name>MyPortal</display-name> <module id="WebModule_1"> <web> <web-uri>jetspeed.war</web-uri> <context-root>/myportal</context-root> </web> </module> <module id="WebModule_2"> <web> <web-uri>demo.war</web-uri> <context-root>/demo</context-root> </web> </module> </application> 2. Modifications needed to start the WAS with Jetspeed 1. Patch Websphere's Appserver/java/jre/lib/core.jar with 1.4.2's classes: * Preferences.class * Preferences$.class This requires expanding the 1.4.2 rt.jar, and IBM's core.jar Copy over the 2 files listed above into the expand core.jar and recreate the jar and drop it back into Appserver/java/jre/lib/ Note: If the above step is missed the following error will pop-up while starting the server ClassNotFoundException for prefs 2. Uncomment the following properties found in the jaxp.properties file located in your <WAS_HOME>\AppServer\java\jre\lib directory : javax.xml.transform.TransformerFactory=org.apache.xalan.processor.Transf ormerFactoryImpl javax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFacto ryImpl javax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.Document BuilderFactoryImplerver Note: If the above step is missed the following error will pop-up while starting the server javax.xml.parsers.FactoryConfigurationError: Provider null could not be instantiated: java.lang.NullPointerException 3. Put log4j.properties under <WAS_HOME>\AppServer\classes Later configure the Log4j.properties with the path of the log files Eg. log4j.appender.jetspeed.file = <WAS_HOME>/AppServer/installedApps/krishkum- w2k01/MyPortal.ear/jetspeed.war/logs/jetspeed.log Note: If the above step is missed the following error will pop-up while starting the server log4j:WARN No appenders could be found for logger log4j:WARN Please initialize the log4j system properly Start the Websphere server and go to WAS admin console 3. Create the J2C authentication data entry The following procedure describes how to create the J2C authentication data entry. 1. Log in to the WebSphere Application Server Administrative Console. 2. Select Security icon: forward arrowJAAS Configuration icon: forward arrowJ2C Authentication Data. 3. Click New and enter: * Alias - OracleAuthen * User ID - (DB Username) * Password - (DB password) * Description (optional) 4. Click OK. 4. Create the JDBC provider The following procedure describes how to create the JDBC provider. 1. Select Resources icon: forward arrowJDBC Providers. 2. Click New. 3. For JDBC Providers, select Oracle JDBC Driver from the drop-down list. 4. Click OK and enter values in the Configuration tab. * Name - Oracle JDBC * Description (Optional). * Classpath ${ORACLE_JDBC_DRIVER_PATH}/ojdbc14.jar * Implementation Classname - oracle.jdbc.pool.OracleConnectionPoolDataSource Note: Use Enviroment icon: forward arrowManage WebSphere Variables to set the ORACLE_JDBC_DRIVER_PATH variable if it is not already set. If a value is not specified for the ORACLE_JDBC_DRIVER_PATH variable, set it to oracle_driver_path. The oracle_driver_path variable name represents the directory path to classes12.jar on your WebSphere Portal server. 5. Click OK. 6. Select the JDBC provider that you just created (Oracle JDBC). 7. Click Data Sources (under Additional Properties). 8. Click New and enter values in the Configuration tab. * Name - JetspeedDS * JNDI Name - JetspeedDS (JNDI name should be JetspeedDS) * Description (Optional) * DataSource Helper Classname - com.ibm.websphere.rsadapter.ConnectJDBCDataStoreHelper 9. Select the previously created J2C entry from the Component-managed Authentication Alias drop-down list (OracleAuthen). 10. Click OK. 11. Select the data source you just created (JetspeedDS). 12. Click Custom Properties (under Additional Properties), Add the following properties. 13. URL jdbc:oracle:thin:@xxx.com:1521:xxx 14. Click OK. 15. Save the configuration. 16. Stop and Start the Server 17. Log in to the WebSphere Administrative Console. 18. Select Resources icon: forward arrowJDBC Providers icon: forward arrowOracle JDBC icon: forward arrowData Sources. 19. Select the JetspeedDS check box and click Test Connection. Note: If the test connection fails and you modify the configuration, you must restart the application server before testing the connection again. 5. Create the Shared Library The following procedure describes how to create the shared library. Select Environment icon: forward arrowShared Libraries. Click New Enter values in the General properties Name - Jetspeed-Library Classpath - path to the lib Put the following files in the lib folder * pluto-1.0.1.jar * portals-bridges-common-0.1.jar * jetspeed-commons-2.0.jar * jetspeed-api-2.0.jar * portlet-api-1.0.jar * xalan-2.4.1.jar 6. Install the Application as an ear Install the ear (myPortal.ear) file using the Websphere's application installation wizard. * Applications->Install New Application Remember to associate JetspeedDS with the data source defined above on installation. 7. MyPortal Application Configuration Once the application is installed. * Select Enterprise Applications -> Select MyPortal from the list * Under Configuration Tab give the following details Classloader Mode - PARENT_LAST WAR Classloader Policy - Module * Click Apply * Select Libraries under Additional Properties * Click Add and select the Jetspeed-Library which is created early. * Click OK * Select Web Modules under Related Items * Select each uri and give input classloader Mode as PARENT_LAST * Click Ok * Save the Changes * Stop and Start the Server Go to [WWW]http://localhost:9080/myportal/ Regards, KK
