Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Problems with Eclipselink 2 (JPA 2.0) & WebLogic 10

Constantino,
    Correct for JPA 1.0 but if you wish to override the modules JPA spec jar with the one in you ear via the FilteredClassLoader - you will also need to add the JPA spec package to the <prefer-application-packages> override element as described in
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#DI_1.1:_Alternative_3:_Application_Level_Shared_Library_-_In_Use

  • 5) Add the prefer-application-packages element to weblogic-application.xml so the internal WebLogic API FilteredClassLoader places our library ahead of the modules directory.
<wls:prefer-application-packages>
  <wls:package-name>javax.persistence.*</wls:package-name>
  <wls:package-name>org.eclipse.persistence.*</wls:package-name>
</wls:prefer-application-packages>
    thank you
    /michael

Cronemberger, Constantino wrote:
Hi,



The first thing to define is:



Is JPA 1.0 interface enough for you or do you need 2.0?



In my env. I did not have the option to change anything in the Weblogic installation so I had to go for 1.0 interface.



It was quite simple:



1 - use eclipselink-2.1.0.jar (everything in one JAR) because this JAR has all 2.0 classes that are not in 1.0 (this is necessary to let the classes be loaded)

2 - remove javax.persistence 2.0 jar from your EAR

3 - configure weblogic-application.xml with: <prefer-application-packages><package-name>org.eclipse.persistence.*</package-name>

4 - make sure persistence.xml is 1.0 complient



It worked OK for me.



Regards,

   Constantino.






_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
  


Back to the top