In an attempt to load data into a fledgling GAE Java application I am using XStream (xstream-gae.jar a patched version that others have developed to get a working version with GAE) coupled with a FileUploadServlet that upload an XML file description of some initial application to prime the application datastore.
The problem I am encountering is that the Objects being created from XStream have been annotated with persistence annotations (@PersistenceCapable(identityType=IdentityType.APPLICATION) ...) to make them usable with the data store. When the servlet is executed to process the uploaded file stream I get a ClassCastExceptions for some of the app engines persistence related files, e.g WARNING: Error for /wavacalculator/fileupload java.lang.NoClassDefFoundError: javax/jdo/JDOHelper I am assuming that I am missing something important about the GAE model in terms of ClassLoaders or configuration. It seems that the Servlet is attempting to resolve fundemental classes (from its own classloader??) and failing to find them, and whats more is not able to find them in a parent/containing loader. Is there something special that I need to do to have a non GWT RPC servlet with GAE? My UploadFileServlet extends HttpServlet and does not special initialization. Out of interest I placed a number of the core jars such as jdo2-api-2.3-eb.jar datanucleus-jpa-1.1.5.jar datanucleus-core-1.1.5.jar into the war/WEB-INF/lib area and the initial class loading problems stopped, but other issues popped up elsewhere, also it feels wrong to be duplicating framework jar files in the war lib. Any suggestions or pointers gratefully accepted. If I can get past these problems I hope to post a tutorial on migrating data from hibernate to app engine using a combination of tools with XStream as the transition medium. Regards, John --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---
