2011/8/30 MadOtis <rcobb1@gmail.com>
Hello all,
I'm running into a little bit of a problem. I'm trying to use some
jar packaged OpenJPA entities in a GWT servelet service but I keep
getting a persistence exception. The OpenJPA entities are, again,
packaged in a separate jar file and are provided by a different
project (they all work great in other projects). Within the service,
I'm converting the OpenJPA entities into DTO objects, so I'm not
trying to pass actual connected JPA entities from the service back to
the client side of the house. I do have other services that do not
use OpenJPA that work as expected; it's just the handful of services
that are using the DAO/Entities from the jar. The war will not be
hosted in App Engine (rather a stand-alone war on Tomcat or some more
robust JEE container ), so I believe having to do a one-off version of
this jar for datanucleus shouldn't be needed (I hope).
I've tried extracting the persistence.xml file from the jar and hand-
placing it in the respective locations in the war project, but it
seems to not make any difference. Here's the relevant portion of the
stacktrace I get when the services try to fire (which tells me the
OpenJPA Entity Manager can't find the provider from persistence.xml):
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.ExceptionInInitializerError
at
com.adp.mas.svntools.server.data.DefaultsDAO.findAll(DefaultsDAO.java:
193)
at
com.adp.mas.svntools.server.SVNMergeServiceImpl.getDefaults(SVNMergeServiceImpl.java:
18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
569)
... 22 more
Caused by: javax.persistence.PersistenceException: No persistence
providers available for "svntools-data" after trying the following
discovered implementations: NONE
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
182)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
72)
at
com.adp.mas.svntools.server.data.EntityManagerHelper.<clinit>(EntityManagerHelper.java:
20)
Can anyone point me to any sort of documentation or example on how to
properly utilize an OpenJPA jar in a GWT War?
Thanks in advance!
Randy
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment