Oracle Containers for Java EE#

Oracle Containers for J2EE (OC4J) is the J2EE runtime component of Oracle Application Server. JspWiki can be installed either in OC4J or the Oracle Application Server.

Below are the instructions for getting JSPWiki 2.6.4 to work on OC4J 10.1.3.1 (Successfully tested with JSPWiki 2.6.0, 2.6.3, 2.8.0 alpha).

Additional settings applied to Oracle Application Server installation. Please refer to the JspWiki and Oracle Application Server for more information.

OC4J 10g R3 (10.1.3.1)#

MBean JDK 1.5#

Workaround for a security error:

Solution 1: Start OC4J with the JVM parameter "-Doc4j.jmx.security.proxy.off=true".

Linux
../bin/oc4j Configuration Section

JVMARGS="{Other parameters} -Doc4j.jmx.security.proxy.off=true"
Windows
../bin/oc4j.cmd Configuration Section
set JVMARGS="%OC4J_JVM_ARGS% -Doc4j.jmx.security.proxy.off=true"
Solution 2: Patch com/ecyrd/jspwiki/ui/admin/AdminBeanManager.java.
Call MBeanServerFactory14 instead of MBeanServerFactory15
  if( SystemUtils.isJavaVersionAtLeast(1.5f) )
  {
      log.info("Using JDK 1.5 Platform MBeanServer");
      m_mbeanServer = MBeanServerFactory14.getServer();

JAAS login configuration#

Paste into ../J2EE/home/config/system-jazn-data.xml
<application>
    <name>JSPWiki-container</name>
    <login-modules>
        <login-module>
            <class>com.ecyrd.jspwiki.auth.login.WebContainerLoginModule</class>
            <control-flag>sufficient</control-flag>
        </login-module>
        <login-module>
            <class>com.ecyrd.jspwiki.auth.login.CookieAssertionLoginModule</class>
            <control-flag>sufficient</control-flag>
        </login-module>
        <login-module>
            <class>com.ecyrd.jspwiki.auth.login.AnonymousLoginModule</class>
            <control-flag>sufficient</control-flag>
        </login-module>
    </login-modules>
</application>
<application>
    <name>JSPWiki-custom</name>
    <login-modules>
        <login-module>
            <class>com.ecyrd.jspwiki.auth.login.UserDatabaseLoginModule</class>
            <control-flag>required</control-flag>
        </login-module>
    </login-modules>
</application>

Container managed authentication#

JSPWiki 2.6.3 does not work properly on OC4J with custom authentication. You always get logged out whenever you change a page.
  1. Setup Oracle user and group
    Use the Oracle Application Server Control. For example User admin, groups admin, authenticated
  2. Enable container managed authentication
    Remove comments in ../J2EE/home/applications/JSPWiki/JSPWiki/web.xml
    Comment the 2 <user-data-constraint> sections. OC4J does not like the <transport-guarantee>CONFIDENTIAL</transport-guarantee> parameter.
  3. Map OC4J users, groups to JSPWiki groups
    Add in ../J2EE/home/application-deployments/JSPWiki/JSPWiki/orion-web.xml for example
<security-role-mapping name="Authenticated">
    <group name="admin" />
    <group name="authenticated" />
</security-role-mapping>
<security-role-mapping name="Admin">
    <group name="admin" />
</security-role-mapping>

Double quotation marks in JSP tags#

OC4J is not as forgiving when you use quotation marks. You need to alternate ' and ". Tnx João Condack and team.
Update tags in ../J2EE/home/applications/JSPWiki/JSPWiki/templates/default/commonheader.jsp
Line 81:
<link rel="stylesheet" type="text/css" media="screen, projection, print"
     href="<wiki:Link format='url' templatefile='skins/' /><c:out value='${prefs["SkinName"]}' />/skin.css" />
Line 84:
<script type="text/javascript"
         src="<wiki:Link format='url' templatefile='skins/' /><c:out value='${prefs["SkinName"]}' />/skin.js" >
</script>

German umlauts#

Fixed in version 2.8.1. Reported as Bug JSPWIKI-348. If someone needs detailed instructions just send me an email.

Extract the properties files out of the jar file and move them into the ../J2EE/home/applications/JSPWiki263/JSPWiki/WEB-INF/classes/ directory. OC4J does not seem to read the encoding correctly if the files are packed.

--Lutz Tietze, 21-Aug-2008

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-19) was last changed on 13-Mar-2009 18:20 by LTietze