[
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
|
Hi Michael,
I managed to get it working with JPA 2.0 but I had to do sligtly different steps:
- I did not put anything in APP-INF/lib neither in war/WEB-INF/classes/META-INF/MANIFEST.MF
- at first Weblogic was still trying to parse my persistence.xml that is inside war/WEB-INF/classes/META-INF, this happened before Spring initialization started, so at that point my application was not even trying to use JPA
- to fix this I renamed it to persistenceWeblogic.xml and changed the Spring configuration to use this name instead of the default
When it failed the error was:
<01-Dec-2010 08:52:29 o'clock BRST> <Error> <J2EE> <BEA-160197> <Unable to load descriptor weblogic.utils.classloaders.GenericClassLoader@1ecade2<mailto:weblogic.utils.classloaders.GenericClassLoader@1ecade2> finder: weblogic.utils.classloaders.CodeGenClassFinder@bf3596<mailto:weblogic.utils.classloaders.CodeGenClassFinder@bf3596> annotation: projectTest@/WEB-INF/classes/META-INF/persistence.xml of module /test. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
C:\development\tools\bea-10.3.3\user_projects\domains\dl\weblogic.utils.classloaders.GenericClassLoader@1ecade2 finder: weblogic.utils.classloaders.CodeGenClassFinder@bf3596<mailto:weblogic.utils.classloaders.CodeGenClassFinder@bf3596> annotation: projectTest@\WEB-INF\classes\META-INF\persistence.xml:2:3:2:3: problem: cvc-attribute.4: The value '2.0' does not equal the fixed value '1.0' of attribute 'version':<weblogic.utils.classloaders.GenericClassLoader@1ecade2<mailto:weblogic.utils.classloaders.GenericClassLoader@1ecade2> finder: weblogic.utils.classloaders.CodeGenClassFinder@bf3596<mailto:weblogic.utils.classloaders.CodeGenClassFinder@bf3596> annotation: projectTest@/WEB-INF/classes/META-INF/persistence.xml:2:3>
Is it possible that somehow you have disabled the validation in your Weblogic?
Thanks,
Constantino
------------------------------
Message: 3
Date: Tue, 30 Nov 2010 12:42:51 -0500
From: "Michael O'Brien" <michael.obrien@xxxxxxxxxx>
To: EclipseLink User Discussions <eclipselink-users@xxxxxxxxxxx>
Subject: Re: [eclipselink-users] Problems with Eclipselink 2 (JPA 2.0)
& WebLogic 10
Message-ID: <4CF5379B.0@xxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/eclipselink-users/attachments/20101130/3469ae39/attachment.htm>
------------------------------
Message: 4
Date: Tue, 30 Nov 2010 18:11:44 +0000
From: Sri Sankaran <Sri.Sankaran@xxxxxxx>
To: EclipseLink User Discussions <eclipselink-users@xxxxxxxxxxx>
Subject: Re: [eclipselink-users] Problems with Eclipselink 2 (JPA 2.0)
& WebLogic 10
Message-ID:
<C89F442C2B8CDB43AD484B19C7334FCA11EAF9CF@xxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
I would like to be able to use JPA 2 features. As long as I was on JPA 1.0 I was able to work with my application deployed as a WAR. The whole reason for converting it to an EAR is to work around WebLogic.
Sri
-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Cronemberger, Constantino
Sent: Tuesday, November 30, 2010 12:13 PM
To: eclipselink-users@xxxxxxxxxxx
Subject: Re: [eclipselink-users] Problems with Eclipselink 2 (JPA 2.0) & WebLogic 10
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
------------------------------
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
End of eclipselink-users Digest, Vol 39, Issue 50
*************************************************