OC4J Configuration
From Skyway Wiki
This page describes any considerations regarding the deployment of a fully or partially generated Spring MVC and Spring Web Flow applications to Oracle OC4J application servers.
This page has been updated to reflect the use of Skyway Builder 6.3.
OC4J 10
Here are the steps to deploy to OC4J 10. These instructions apply to both WAR and EAR deploys.
- From the Enterprise Configuration tab of the Spring DSL, configure the project as follows:
- Container: Oracle
- Transactions: Container
- Persistence: Container
- Container: Oracle
- Do a clean build of the project (Project-->Clean...)
- Add the contents of data-sources.xml to {OC4J_HOME}/j2ee/home/config/data-sources.xml for both EAR and WAR deploys.
Notes
Important Note: When installing OC4J be sure to go to {OC4J_HOME}//j2ee/home/config and check the server.xml file for the <java-compiler> settings. Even if you have a JAVA_HOME set, OC4J will not pickup the location of javac automatically. ensure that the bindir attribute is pointing to the bin directory in your JDK install. See the example below.
<java-compiler name="javac" in-process="false" options="-J-Xmx1024m -encoding UTF8" bindir="C:\Program Files\Java\jdk1.5.0_15\bin" extdirs="C:\Program Files\Java\jdk1.5.0_15\jre\lib\ext" />
If OC4J cannot find a compiler, then you will get an error every time you attempt to access a JSP on the server. Sometimes this manifests as 500 error returned from OC4J.
EAR Deploy Note: When deploying as an EAR project, you must copy all .properties files that reside in WEB-INF/classes to the resources folder of the project if they are to be accessed by any compiled resource not in the web-layer.
Permgen Errors Fix: If you are getting Permgen errors when trying to publish to the server, you will need to modify the oc4j startup script to give the JVM more memory. To do this go to you will to locate the “oc4j.cmd” file, ORACLE_HOME/bin. In this directory there should be two files, a “oc4j” and a “oc4j.cmd” file. These files are used to start oc4j. One for Windows and the other for Unix. Modify these files and make the JVMARGS variable look like this.
JVMARGS=-Xmx512m -Xms512m

