!!!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.

[{TableOfContents }]

!!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
%%prettify 
{{{
JVMARGS="{Other parameters} -Doc4j.jmx.security.proxy.off=true"
}}}
/%
{{Windows}}\\
{{
../bin/oc4j.cmd}} Configuration Section
%%prettify 
{{{
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}}
%%prettify 
{{{
  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}}
%%prettify 
{{{
<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.\\

#__Setup Oracle user and group__\\
 Use the Oracle Application Server Control. For example User {{admin}}, groups {{admin}}, {{authenticated}}\\
#__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.
#__Map OC4J users, groups to JSPWiki groups__\\
 Add in {{../J2EE/home/application-deployments/JSPWiki/JSPWiki/orion-web.xml}} for example
%%prettify 
{{{
<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:
%%prettify 
{{{
<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:
%%prettify 
{{{
<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|https://issues.apache.org/jira/browse/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|mailto://lutz.tietze@tietzenet.de], 21-Aug-2008\\