Updating EclipseLink to a newer version in existing GlassFish V3 installation

GlassFish V3 ships with EclipseLink 2.0 binaries as JPA provider. If you need to update your existing GlassFish installation to a newer version of EclipseLink binaries, you will need to do following



  • Download newer version of EclipseLink binaries from http://www.eclipse.org/eclipselink/downloads/. Choose OSGI bundles from the available downloads

  • Replace following files under $GLASSFISH_HOME/glassfish/modules with corresponding jars you downloaded above


    • org.eclipse.persistence.antlr.jar

    • org.eclipse.persistence.jpa.jar

    • org.eclipse.persistence.asm.jar

    • org.eclipse.persistence.jpa.modelgen.jar

    • org.eclipse.persistence.core.jar

    • org.eclipse.persistence.oracle.jar

    • javax.persistence.jar


  • Restart GlassFish

Comments:

If people are having trouble with jar versions, etc., try trashing your osgi cache folder. In fact that was the only way that I could start the server properly after the EclipseLink upgrade.

<ROOT INSTALL DIR>/glassfish/domains/domain1/osgi-cache

Posted by Dimitris Tsitses on August 21, 2010 at 03:10 AM PDT #

Thanks for your guide to upgrading EclipseLink in Glassfish. The download from EclipseLink now appears to contain two key jar files:
javax.persistence_2.0.2.v201008061442.jar
and
eclipselink.jar.

To upgrade, should I chop out the files you list, and place these two files into the glassfish/modules directory? Is it important that Glassfish is stopped whilst doing so?

Thanks in advance.

Posted by Graham Robbins on November 08, 2010 at 06:08 AM PST #

Nice! Thanks for the valuable information.
Regards,
Marcio Wesley Borges

Posted by Marcio Wesley Borges on January 25, 2011 at 01:04 AM PST #

If I am deploying as NON-OSGi, do I delete the existing jars and replace with eclipselink.jar, javax.persistence.jar and eclipselink.jpa.modelgen.jar

Posted by mike brooks on February 16, 2011 at 11:52 PM PST #

@Graham, @Mike,

GlassFish consumes EclipseLink as osgi bundles. Using eclipselink.jar instead of the OSGI bundles listed above may not work.

Posted by Mitesh Meswani on February 17, 2011 at 08:44 AM PST #

If I deploy the EclipseLink bundles, does that mean my web application needs to be "bundled"?

Posted by Mike on March 07, 2011 at 01:11 AM PST #

@Mike - No your app need not be an OSGI bundle. It can be a normal JavaEE app

Posted by Mitesh Meswani on March 07, 2011 at 03:33 AM PST #

Awesome! This saved me a lot of headache, thanks for the info.

Posted by Arron Ferguson on June 11, 2012 at 01:20 PM PDT #

If you are using Enterprise Application Client with Java Web Start, following directory also contains copies of eclipse link files and should be thrashed also.

<ROOT INSTALL DIR>/glassfish/domains/domain1/java-web-start

Also redeploy of such application may be needed to initiate java web start update on client side. StreamCorruptedException will occur otherwise because of different version of persistence libraries on server and client.

Posted by guest on July 10, 2012 at 05:32 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Mitesh Meswani

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks