openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: Why doesn't unpacked openjpa works like packed openjpa.jar?
Date Tue, 10 Mar 2009 14:56:50 GMT
Hi,

My first guess is that the services files aren't extracted "properly". When
you use the maven-assembly-plugin is the
META-INF/services/org.apache.openjpa.lib.conf.ProductDerivation file
included?

If you can post an example pom.xml that shows the problem it might help us
to diagnose.

Regards,
-mike

On Tue, Mar 10, 2009 at 9:48 AM, Targa <denis@bodnar.ws> wrote:

>
> Hello!
> I'm using maven2 tool to build my OpenJPA application with embedded
> database
> and run into strange OpenJPA behavior. What I want is just get JAR with all
> dependencies included in unpacked form. So there is maven-assembly-plugin
> used with <unpack>true</unpack> option. This actually creates big jar with
> all *.class dependencies included.
> When I try to run this jar, it doesn't work properly:
> Persistence.createEntityManagerFactory(PERSISTENCE_UNIT, prop); returns
> NULL. I thought there could be an issue with persistence.xml, but If I
> manually include openjpa-persistence-1.2.0.jar to my package and add it to
> classpath - everething works fine...
> So I suppose there could be a problem with classloading (although I didn't
> use any custom classloaders). I tryed to manually set up classloader before
> call Persistence.createEntityManagerFactory(PERSISTENCE_UNIT, prop);
> without
> any success.
>
> Please, tell me what's the problem? Why I can't just unzip
> openjpa-*-1.2.0.jar and include *.class files in my JAR bundle? Is there
> any
> trick I should know?
>
> Thanks in advance to all!
> --
> View this message in context:
> http://n2.nabble.com/Why-doesn%27t-unpacked-openjpa-works-like-packed-openjpa.jar--tp2455600p2455600.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message