How to replace EclipseLink 2.3.2 with EclipseLink 2.5 in WebLogic Server 12c

I am trying to run Docx4j on WebLogic Server 12c. WebLogic Server 12c ships with EclipseLink 2.3.2.

There is a similar Message describing the situation, which, unfortunately, does not give an answer.

Docx4j does not work with the JAXB (MOXy) implementation, which is part of EclipseLink 2.3.2. My Docx4j works autonomously with EclipseLink 2.5. Therefore, I am very sure that using EclipseLink 2.5 with Weblogic Server 12c will solve the problem with Docx4j.

How to replace EclipseLink Vesion 2.3.2 on WebLogic Server 12c with EclipseLink version 2.5?

+4
source share
3 answers

The solution provided by Blaze on Blogpost does not work with WebLogic 12c. The solution for its operation is a minor change in application.xml, explicitly defining the library used:

<application> <display-name>EclipseLink 2.5 Shared Library</display-name> <module> <java>lib/eclipselink.jar</java> </module> </application> 
+2
source

You can create a shared library in WebLogic to upgrade the version of EclipseLink.

CREATE A GENERAL LIBRARY

EclipseLink25_SharedLibrary.ear

The shared library is an EAR with the following contents

  • lib / eclipselink.jar
  • META-INF / application.xml

     <application> <display-name>EclipseLink 2.5 Shared Library</display-name> <module> <java></java> </module> </application> 
  • META-INF / MANIFEST.MF

     Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.2 Created-By: 1.7.0_04-b21 (Oracle Corporation) Extension-Name: EclipseLink-2.5.0 Specification-Version: 2.5.0 Implementation-Version: 2.5.0.v20130507 
  • META-INF / WebLogic-application.xml

     <weblogic-application> <prefer-application-packages> <package-name>org.eclipse.persistence.*</package-name> </prefer-application-packages> </weblogic-application> 

USE GENERAL LIBRARY

The following shows how you will package the application to use the shared library,

SampleApplication.ear

  • META-INF / MANIFEST.MF
  • META-INF / weblogic-application.xml

     <?xml version="1.0" encoding="UTF-8"?> <wls:weblogic-application xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.2/weblogic-application.xsd"> <!--weblogic-version:10.3.4--> <wls:application-param> <wls:param-name>webapp.encoding.default</wls:param-name> <wls:param-value>UTF-8</wls:param-value> </wls:application-param> <wls:library-ref> <wls:library-name>EclipseLink-2.5.0</wls:library-name> <wls:specification-version>2.5.0</wls:specification-version> <wls:implementation-version>2.5.0.v20130507</wls:implementation-version> <wls:exact-match>true</wls:exact-match> </wls:library-ref> </wls:weblogic-application> 
  • SampleApplication.war


FOR FURTHER INFORMATION

+1
source

I preferred switching back to JAXB RI instead of using moxy JAXB buggy. Here's how you can do it: http://docs.oracle.com/cd/E24329_01/web.1211/e24964/data_types.htm#CIHBHDGI

I used Methode, where the following jar module file is placed in "startWebLogic.cmd": set PRE_CLASSPATH = $ wls_home / modules / databinding.override_1.0.0.0.jar

to have it first on its way to classes.

+1
source

Source: https://habr.com/ru/post/1489241/


All Articles