Thursday, October 18, 2012

Weblogic: Enable JPA 2 on WebLogic Server Version: 10.3.5.0

I worked on JDeveloper 11.1.2.2.0 then 11.1.2.3.0 but the two versions bundled with Weblogic Server Version 11g (10.3.5.0).

I decided to work with JPA version 2, but when you use the eclipselink_v2 and use specific features in the API that is related to version 2, you will get the following error:

After a while I found a work around to enable the JPA2 on Weblogic Server Version 11g (10.3.5.0).

Follow the following steps and the server will be happy with the JPA2:
  1. Stop the Weblogic server if it is running.

  2. Navigate to <%SERVER_INSTALLATION_PATH%>\wlserver_10.3\common\bin

  3. Edit commEnv.cmd

  4. Search for the line 'set JAVA_USE_64BIT=false'.

  5. Add the following line under it

    set PRE_CLASSPATH=%MODULES_DIR%\javax.persistence_1.0.0.0_2-0-0.jar;%MODULES_DIR%\com.oracle.jpa2support_1.0.0.0_2-0.jar

  6. Start the server

  7. Test your JPA2 implementation and the server should be happy now.

No comments :

Post a Comment