Saturday, November 17, 2012

Running JSPWiki on Weblogic 11g

JSPWiki ( is a simple Wiki engine, that can be used to power a small Wiki to share knowledge on your project. If you have Oracle Weblogic infrastructure running (including e.g. Oracle SOA Suite), you can set up JSPWiki on one of your servers.
Small problem though ... JSPWiki does not play very well with Weblogic, mainly because Weblogic tries to insert its classes into your web application to reuse them. I was receiving couple NullPointerExceptions and ClassNotFoundException, and other Class Loader problems. So here are my instructions to run JSPWiki on Weblogic

Used software:
  • JSPWiki 2.8.4 (latest stable version at the time of writing)
  • Oracle Weblogic, or Oracle SOA Suite 11g

1. Download and extract the JSPWiki distribution

2. Extract JSPWiki.war

3. Create a weblogic.xml file as WEB-INF/weblogic.xml 

4. Paste the following content into the file:

<wls:weblogic-web-app xmlns:wls="" xmlns:xsi="" xsi:schemalocation="">

This is to tell Weblogic to use classes deployed in the archive, and not to force its own libraries for the application.

5. Locate $WL_SERVER/modules/org.apache.ant_1.7.1/lib folder and copy the following libraries into the WEB-INF/lib folder of JSPWiki:
  • xml-apis.jar
  • xercesImpl.jar
You can get these libraries from other sources too (e.g. Maven repository), these from Ant were working with JSPWiki. Otherwise JSPWiki will try to use classes from Weblogic, which are not compatible with JDom.

At this moment you can also modify the JSPWiki configuration files (, jspwiki.policy) for your deployment. You can find the instructions on JSPWiki web site.

6. Repackage the JSPWiki back into the war file.

7. Create a new folder for JSPWiki EAR archive and with the following structure:
    • application.xml
    • weblogic-application.xml
  • JSPWiki.war
8. Paste the following into the META-INF/application.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
  "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"


9. Paste the following into the META-INF/weblogic-application.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="" xmlns:xsi="" xsi:schemaLocation="">

This is because Weblogic on SOA Suite still tries to use internal XML Parsing classes for the application, and fail on exceptions. These settings cannot be applied on WAR level, that's why we had to create an enterprise application.

10. Package the ear archive for JSPWiki and deploy on Weblogic. 

And good luck on using JSPWiki.

Final Note:
At the moment, the JSPWiki site does not allow to add or modify content due to migration to ASF infrastructure. For these reasons I've used a blog entry. I will try to contribute the content back to JSPWiki site, when it is again possible.