Table of Contents
- JSPWiki and Websphere Application Server 6.0.2.5
- Step 1 - Setting up your JSPWiki in Websphere
- Step 2 - Configuring it up
- Classloader Configuration
- Including all Libraries
- JAAS Configuration (optional)
- Policy Configuration (optional)
- Step 3 - Replacing Libraries
- Step 4 - Implementing Oracle as Database
JSPWiki and Websphere Application Server 6.0.2.5
First of all: All replaced or modified files can be found as backup in the attachment.
Step 1 - Setting up your JSPWiki in Websphere
Download the Current beta release of JSPWiki from the JSPWikiDownload page and extract the downloaded zip archive to your local file folder. After that open your Websphere Application Developer > File > Import and import the extracted JSPWiki.war file.
If you have sucessfully imported the JSPWiki war file, you will find there an Dynamic Web Project and an Enterprise Application called JSPWikiEar. After that you should deploy the JSPWikiEar to your Application Server and restart it.
Step 2 - Configuring it up
Classloader Configuration
In your Adminconsole go to Applications > Enterprise-Applications > JSPWikiEar > Webmoduls as shown in the next picture.
In the following step click on the JSPWiki.war entry and set the Classloader for this Module on "PARENT_LAST". Click Save and also save your Masterconfiguration. The reason for this is that Websphere gets in trouble with an JSPWiki Library, called "jdom" (mentioned here BugProblemsWithCommonLogging)
Including all Libraries
The next important Step in your Admin Console is to include all needed Libraries. Therefore you go in Server > Application Server to your Application Server, where you have deployed the JSPWikiEar.
After that go to Server > Applicationserver to your Application Server, where you have deployed the JSPWikiEar on. In the Configuration we need now the Java- and Processmanagment > Processdefiniton to specify the correct Classpath.
Here you have to set up the Path to your JSPWiki.war, which you will find in your WEB-INF/lib directory.
Click OK , also save your MasterConfiguration.
JAAS Configuration (optional)
The next step is to set up the JAAS Configuration for the Login System. Therefore go to Security > Global Security > JAAS-Configuration and open your WEB-INF/jspwiki.jaas to add these lines to WebSphere.
First of all specify the Aliasname to "JSPWiki-Container" and add the lines from your jspwiki.jaas to this Alias.
JSPWiki-container {
com.ecyrd.jspwiki.auth.login.WebContainerLoginModule SUFFICIENT;
com.ecyrd.jspwiki.auth.login.CookieAssertionLoginModule SUFFICIENT;
com.ecyrd.jspwiki.auth.login.AnonymousLoginModule SUFFICIENT;
};
Do the same steps now for "JSPWiki-custom".
JSPWiki-custom {
com.ecyrd.jspwiki.auth.login.UserDatabaseLoginModule REQUIRED;
};
Click OK , also save your MasterConfiguration and stop your Application Server for now.
Policy Configuration (optional)
Finally we need to configure our Application Server to grant access to our Application and to load the specified Principal roles. We need to edit the server.policy of our Applicationserver, which we can found at C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\profiles\default\properties\server.policy (Maybe your path will be different from mine).
We add now the following configuration:
grant {
permission java.io.FilePermission "<<ALL FILES>>", "read, read, write, delete, execute";
permission java.net.SocketPermission "*", "accept, connect, listen, resolve";
permission java.util.PropertyPermission "*", "read";
permission java.lang.RuntimePermission "modifyThreadGroup";
permission java.lang.RuntimePermission "modifyThread";
permission javax.security.auth.AuthPermission "modifyPrincipals";
permission javax.security.auth.AuthPermission "doAsPrivileged";
permission javax.security.auth.AuthPermission "getLoginConfiguration";
permission javax.security.auth.AuthPermission "createLoginContext.JSPWiki-container";
permission javax.management.MBeanServerPermission "findMBeanServer";
permission javax.management.MBeanServerPermission "createMBeanServer";
permission javax.management.MBeanTrustPermission "register";
permission com.ibm.websphere.security.WebSphereRuntimePermission "AdminPermission";
permission javax.management.MBeanPermission "*","registerMBean";
permission javax.management.MBeanPermission "*","unregisterMBean";
permission javax.management.MBeanPermission "*","getMBeanInfo";
permission java.security.SecurityPermission "getProperty.login.configuration.provider";
permission java.lang.RuntimePermission "getClassLoader";
permission javax.security.auth.AuthPermission "createLoginContext.JSPWiki-custom";
};
After clicking Save we can now start our Application Server.
Note: I know that editing the server.policy isn't the right way in configuring up our installation, but WebSphere doesn't load own policy files, especially not when we set the grant to "java.security.AllPermission". Sure, there is a way to add a "was.policy" to our WIKI_EAR/META-INF/ folder but IBM's dynamic policy loader doesn't load principals.
Step 3 - Replacing Libraries
Due some Bugs (BugProblemsWithCommonLogging) with JSPWiki and Websphere we have you replace the "commons-logging-api.jar
" in your /WEB-INF/lib directory with the "commons-logging-adapters-1.1.jar
" library, which you can find in the attachment. As a second "Replacement" we delete also the xmlrpc.jar
.
For now we have a clean installation with WAS 6.0.2.5 and we can now start our Application server und configure our new JSPWiki version with the http://localhost:9080/JSPWiki/Install.jsp
(Websphere Application Server's Port is 9080)
Step 4 - Implementing Oracle as Database
To get our new JSPWiki Installation compatible with Oracle we need the JDBCProviders Plugin, I used for this tutorial. The first few steps are quite simple now, because we can use the readme of the JDBC Package.
First of all we need to copy the modified, attached JDBCProvider.jar
file into JSPWiki's WEB-INF/lib directory and also the Oracle Driver to our WEB-INF/lib folder (I used ojdbc14.jar
for that but you can also use the WebSphere implemented oracle driver for that. If you do that, you don't need an extra archive).
Note: The modified JDBCProvider.jar
only works with Oracle for now !!! Attachments will be stored as blobs and Wikipages as Clob.
After that step we copy jdbcprovider.properties
and jdbcprovider.oracle.properties
to our WEB-INF directory and replace the following entries in our jspwiki.properties file, which you can find in your WEB-INF directory:
jspwiki.pageProvider = com.forthgo.jspwiki.jdbcprovider.JDBCPageProvider jspwiki.attachmentProvider = com.forthgo.jspwiki.jdbcprovider.JDBCAttachmentProvider jspwiki.jdbcprovider.configuration=jdbcprovider.properties
After that step we create our required database with the create_tables_oracle.sql
to finish the last step for migrating to Oracle.
As final step, start your server and enjoy your JSPWiki with Oracle 10g.
You include a modified JDBCProvider.jar. Where is the source code in case we need to fix something?
--Vincent, 17-Apr-2008
Add new attachment
List of attachments
| Kind | Attachment Name | Size | Version | Date Modified | Author | Change note |
|---|---|---|---|---|---|---|
jar |
JDBCProvider.jar | 27.6 kB | 1 | 11-Dec-2007 18:05 | 145.225.60.6 | |
jar |
commons-logging-adapters-1.1.j... | 20.9 kB | 1 | 07-Dec-2007 12:03 | 145.225.60.6 | |
jar |
commons-logging-api.jar | 26.2 kB | 1 | 07-Dec-2007 12:03 | 145.225.60.6 | |
JPG |
config_step2.JPG | 107.6 kB | 1 | 07-Dec-2007 12:02 | 145.225.60.6 | |
JPG |
config_step3.JPG | 97.7 kB | 1 | 07-Dec-2007 12:02 | 145.225.60.6 | |
JPG |
config_step6.JPG | 126.8 kB | 1 | 13-Dec-2007 10:16 | 145.225.60.7 | |
JPG |
config_step7.JPG | 71.1 kB | 1 | 13-Dec-2007 10:16 | 145.225.60.7 | |
JPG |
config_step8.JPG | 60.4 kB | 1 | 13-Dec-2007 10:16 | 145.225.60.7 | |
sql |
create_tables_oracle.sql | 1.0 kB | 1 | 20-Jun-2008 10:43 | HarryMetske | |
JPG |
import_step1.JPG | 37.4 kB | 1 | 07-Dec-2007 12:02 | 145.225.60.6 | |
properties |
jdbcprovider.oracle.properties | 7.6 kB | 2 | 11-Dec-2007 18:05 | 145.225.60.6 | |
properties |
jdbcprovider.properties | 6.3 kB | 1 | 07-Dec-2007 12:03 | 145.225.60.6 | |
JPG |
library_step4.JPG | 137.2 kB | 1 | 07-Dec-2007 12:02 | 145.225.60.6 | |
JPG |
library_step5.JPG | 95.4 kB | 2 | 13-Dec-2007 10:33 | 145.225.60.7 | |
jar |
xmlrpc.jar | 116.0 kB | 1 | 07-Dec-2007 12:04 | 145.225.60.6 |