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.

Reply via email to