On Sep 13, 6:30 pm, jeremy rose <jeremy.rosenb...@gmail.com> wrote:
> I have a JPA application that works fine with Hibernate as the
> persistence provider.  Now, I'm trying to use the gwt with eclipse to
> develop an AJAX client for it.  I do not intend to marshal my
> persistent objects to the client but to simply have the client
> communicate with my server via XML.  However, my RemoteServiceServlet
> runs up against Data Nucleus when I tries to use JPA.  Apparently
> things have been already configured to use Data Nucleus as a JDO
> provider (and I have no knowledge or experience with either one of
> these).
>
> When I started reading the Data Nucleus documentation, I was happy to
> discover it is a JPA provider in addition to a JDO provider.  So, my
> first thought is it just change the configuration to use it as the JPA
> provider instead of Hibernate.   But I'm still struggling to get
> things configured properly and am wondering if I can just by-pass Data
> Nucleus altogether and go back to using Hibernate.  I have a
> Postgresql database with the schema already setup.   My
> persistance.xml file is:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <persistence xmlns="http://java.sun.com/xml/ns/persistence";
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
>                      
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
>     version="1.0">
>
>   <persistence-unit name="huntingMap">
>     <provider>org.datanucleus.jpa.PersistenceProviderImpl</provider>
>     <properties>
>       <property name="datanucleus.ConnectionDriverName"
>                value="org.postgresql.Driver"/>
>       <property name="datanucleus.ConnectionURL"
>                value="jdbc:postgresql://localhost:5432/
> myapplicationdatabasename"/>
>       <property name="datanucleus.ConnectionUserName"
> value="myusername"/>
>       <property name="datanucleus.ConnectionPassword"
> value="myuserpassword"/>
>     </properties>
>   </persistence-unit>
> </persistence>
>
> My servlet gets the following exception:
>
> Caused by: org.datanucleus.exceptions.NucleusUserException: No
> available StoreManager found for the datastore URL key "jdbc". Please
> make sure you have all relevant plugins in the CLASSPATH (e.g
> datanucleus-rdbms?, datanucleus-db4o?), and consider setting the
> persistence property "datanucleus.storeManagerType" to the type of
> store you are using e.g rdbms, db4o
>         at org.datanucleus.store.FederationManager.initialiseStoreManager
> (FederationManager.java:197)
>         at org.datanucleus.store.FederationManager.<init>
> (FederationManager.java:70)
>         at org.datanucleus.ObjectManagerFactoryImpl.initialiseStoreManager
> (ObjectManagerFactoryImpl.java:153)
>         at
> org.datanucleus.jdo.JDOPersistenceManagerFactory.freezeConfiguration
> (JDOPersistenceManagerFactory.java:526)
>
> Obviously, Data Nucleus needs more or different configuration than
> what I have provided but I'm still reading and hacking and failing to
> figure this out.   Any suggestions would be greatly appreciated.
>
> Jeremy

I've discovered if I changed the datanucleus.ConnectionURL to
"appengine" I was able to get further but its still an ongoing set of
hassles and headaches.   This persistence provider doesn't seem to
allow a method such as isAgitated() to be in a entity class even if
the method is tagged with a @Transient annotation to indicate there is
no property to persist.  After renaming the method, the next hurdle is
there is no ID value generator for the strategy of sequence for
whatever datastore I am using now.   I guess I can go change my ID
generation strategies but I was hoping to use the GWT for developing
AJAX applications without having to over the datastore decisions to
it.   Fundamentally, it seems like these two concerns (AJAX
presentation and backend data storage) should be separable. So the
question remains, can I use GWT with JPA without using Data Nucleas?

Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to