Hi Gerald,

that's exactly what I did, though I didn't find the reason why it
works in Karaf
but not with pax exam standalone :)
It looks more to be some tricky thing about bootloader and declaration of system
loaders. Since in Karaf the javax.persistence packages are configured to be
system packages (and AFAIRC bootloaded). I'm quite unhappy about this right now
since it still requires three potential sources for javax.persistence
aries-jpa, geronimo-jpa spec and the jre as system package.

Regards, Achim

2012/6/26 Gerald Preissler <[email protected]>:
> Hi Achim,
>
> thanks for the insight. Guess I'll go down the route you suggested, at
> least until I find some time at my hand to do some more experimentation.
>
> Regards
>     Jerry
>
> p.s. The classloading issue you describe below could stem from the fact
> that one bundle gets passed an object that implements an interface from
> one bundle, but resolves the interface definition from another bundle,
> maybe even itself. Maybe you could try setting a breakpoint at the code
> location and compare the classloaders?
>
> On 06/25/2012 05:52 PM, Achim Nierbeck wrote:
>> Hi Gerald,
>>
>> I suggest sticking to testing with pax-exam or even better using 
>> paxexam-karaf.
>> I have the following reasons for this :)
>>
>> If you want to use blueprint jpa or something like this, I experienced
>> trouble with pojoSR not being capable of providing some needed
>> functionality for the jpa part of blueprint.
>> It uses some internal OSGi method which resolves to a null-pointer
>> exception. So this is not really capable for doing intense tests right
>> now.
>> (if I find some time I might add some patches :) )
>> But it's good enough to test some basic blueprint wiring stuff.
>>
>> pax-exam is far better in usage since it really starts a container
>> though this might increase the timing on the test.
>> Though this can be some troublesome to get all required bundles
>> working together this way. It needs some trial and error
>> to have the right set of bundles available :)
>> Though right now I also face an issue with this setup and
>> blueprint:jpa. A rather strange Classcast excpetion.
>> Somehow the javax.persistence Classes used by blueprint-jpa while
>> instanciating the Entity objects is not the same when
>> trying to find the corresponding meta-data. Somehow the Entity class
>> used in both cases are not the same (classloader issue :( )
>>
>> Now finally if you use paxexam-karaf you have all the required bundles
>> at hand and if you use jpa
>> it magically seems to work right away (no idea what the difference is
>> right now, still investigating :) )
>> And of course if you are gonna use specialties in setup etc. this
>> test-framework gives you just
>> the right amount of power to get along :)
>>
>> Hope this helps some :)
>>
>> regards, Achim
>>
>> 2012/6/25 Gerald Preissler <[email protected]>:
>>



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
OPS4J Pax for Vaadin
<http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
Lead
blog <http://notizblog.nierbeck.de/>

Reply via email to