开发者

gwt-rpc + appengine + persistence using restlet throws exception

I was trying to rebuild the Restlet sample Application for GWT + GAE ( http://wiki.restlet.org/docs_2.1/13-restlet/21-restlet/318-restlet/303-restlet.html ) . I changed it a bit, since I am planning something diffrent but I thought it would be a good start.

It was going okish until now. The "Put" was coming through to app engine but when i tried to persist the Objects using JPA i get the following Exception:

Caused by: org.datanucleus.exceptions.ClassNotResolvedException: Class "de.fr1zle.shoplist.web.gae.client.ShoppingListRessourceProxy" was not found in the CLASSPATH. Please check your specification and your CLASSPATH.
    at org.datanucleus.JDOClassLoaderResolver.classForName(JDOClassLoaderResolver.java:250)
    at org.datanucleus.JDOClassLoaderResolver.classForName(JDOClassLoaderResolver.java:415)
    at org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:767)
    ... 79 more

As you can see, datanucleus somehow tries to access the GWT Proxy class when loading the info from the persistence.xml. I use the foll开发者_Go百科owing in my ServerRessource:

@Put
public void putShoppingList(ShoppingList shoppingList) {
    ShoppingListDOA shoppingListDOA = new ShoppingListDOA(shoppingList);
    EntityManagerFactory emf = Persistence
            .createEntityManagerFactory("transactions-optional");
    try {
        EntityManager entityManager = emf.createEntityManager();
        EntityTransaction transaction = entityManager.getTransaction();
        transaction.begin();
        entityManager.persist(shoppingListDOA);
        entityManager.flush();
        transaction.commit();
        entityManager.close();
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        if (emf != null)
            emf.close();
    }
}

I somehow have the feeling that DataNucleus enhances the Proxy Class, too although I changed the properites for it to not do so.

Using: GAE 1.4.2 (tried 1.4.3, too) , GWT 2.2 and Restlet 2.1m3

Am I missing a point here? Your help is appricated :-)

Thanks in advance!

fr1zle

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜