Ok having thought about what Toby said and allied to what I knew I went back to retest basics, which no longer worked!!! On investigation I see that all of my projects have empty lib areas, except for gwt- servlet.jar.
I created a new Eclipse project and sure enough it has been created with all of the necessary jar files in the war/WEB-INF/lib area. I can't immediately think why/how the jars have been removed from the lib area, I am thinking it must be related to upgrading from App Engine 1.2.2 to App Engine 1.2.5 yesterday. Well thanks again Toby for the comments, they have helped me onto the right path hopefully and I can continue with a clearer model of how things are constructed. Now sleep ... John On Sep 15, 11:49 pm, John <john.r.nic...@gmail.com> wrote: > Toby, > > thanks for taking the time to respond, I appreciate it. > > First some things I should have said before, I am using the GAE > Eclipse plug in. GWT 1.7, App Engine 1.2.5. > > What I don't understand is why other test applications seem to work > quite hapilly with datastore without me adding a load of jars to the > lib area. Those other applications are using GWT and for example the > standard eclipse generated GreatingServer expanded to use > PersistenceManager seem to work just fine. > > Now this may just be down to good/bad luck and the way that the google > projects are structured and therefore work with Jetty etc. > > If the correct way to structure things is to explicitly put the GAE/ > JDO/... jars in the war/WEB-INF/lib area should they be appearing on > the classpath of the eclipse projects? And why do some projects/use > cases (such as via GWT RCP) seem to work and others fail? > > Its coming up to midnight here, so I am going to sleep and revisit > this in the morning, hopefully with a clear head I will be able to > work out what I need to do, but any input on how to set up properly is > really appreciated. > > J > > On Sep 15, 11:23 pm, Toby Reyelts <to...@google.com> wrote: > > > John, > > The JDO/JPA support for App Engine lives entirely in "userland". Like all > > the other libraries under the sdk's <SDK_ROOT>/lib/user folder, you must > > bundle it with your application in order to use it. One nice aspect about > > the ORM support living in userland is that you can easily apply patches or > > try new interim releases between official SDK releases. > > > On Tue, Sep 15, 2009 at 6:17 PM, John <john.r.nic...@gmail.com> wrote: > > > > Actually I think I have simplified this further. The basic issue seems > > > to be referencing anything to do with the datastore from an ordinary > > > servlet. So if I have a servlet > > > > import java.io.IOException; > > > > import javax.jdo.JDOHelper; > > > import javax.jdo.PersistenceManagerFactory; > > > import javax.servlet.ServletException; > > > import javax.servlet.http.HttpServlet; > > > import javax.servlet.http.HttpServletRequest; > > > import javax.servlet.http.HttpServletResponse; > > > > public class UploadFileServlet extends HttpServlet { > > > �...@override > > > protected void service(HttpServletRequest request, > > > HttpServletResponse response) throws ServletException, IOException { > > > } > > > > private static final PersistenceManagerFactory PMF = > > > > JDOHelper.getPersistenceManagerFactory("transactions-optional"); > > > > } > > > > and I send it a request I get the following exception > > > > WARNING: Nested in javax.servlet.ServletException: init: > > > java.lang.NoClassDefFoundError: javax/jdo/JDOHelper > > > at > > > com.cloudscapesolutions.wavacalculator.server.UploadFileServlet.<clinit> > > > (UploadFileServlet.java:18) > > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > Method) > > > at sun.reflect.NativeConstructorAccessorImpl.newInstance > > > (NativeConstructorAccessorImpl.java:39) > > > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance > > > (DelegatingConstructorAccessorImpl.java:27) > > > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > > at java.lang.Class.newInstance0(Class.java:355) > > > at java.lang.Class.newInstance(Class.java:308) > > > at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153) > > > at org.mortbay.jetty.servlet.ServletHolder.getServlet > > > (ServletHolder.java:339) > > > at > > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: > > > 463) > > > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter > > > (ServletHandler.java:1093) > > > at > > > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter > > > (TransactionCleanupFilter.java:43) > > > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter > > > (ServletHandler.java:1084) > > > at com.google.appengine.tools.development.StaticFileFilter.doFilter > > > (StaticFileFilter.java:121) > > > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter > > > (ServletHandler.java:1084) > > > at org.mortbay.jetty.servlet.ServletHandler.handle > > > (ServletHandler.java:360) > > > at org.mortbay.jetty.security.SecurityHandler.handle > > > (SecurityHandler.java:216) > > > at org.mortbay.jetty.servlet.SessionHandler.handle > > > (SessionHandler.java:181) > > > at org.mortbay.jetty.handler.ContextHandler.handle > > > (ContextHandler.java:712) > > > at > > > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: > > > 405) > > > at > > > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle > > > (DevAppEngineWebAppContext.java:54) > > > at org.mortbay.jetty.handler.HandlerWrapper.handle > > > (HandlerWrapper.java:139) > > > at com.google.appengine.tools.development.JettyContainerService > > > $ApiProxyHandler.handle(JettyContainerService.java:313) > > > at org.mortbay.jetty.handler.HandlerWrapper.handle > > > (HandlerWrapper.java:139) > > > at org.mortbay.jetty.Server.handle(Server.java:313) > > > at > > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: > > > 506) > > > at org.mortbay.jetty.HttpConnection$RequestHandler.content > > > (HttpConnection.java:844) > > > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) > > > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) > > > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) > > > at org.mortbay.io.nio.SelectChannelEndPoint.run > > > (SelectChannelEndPoint.java:396) > > > at org.mortbay.thread.BoundedThreadPool$PoolThread.run > > > (BoundedThreadPool.java:442) > > > Caused by: java.lang.ClassNotFoundException: javax.jdo.JDOHelper > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > > > at java.security.AccessController.doPrivileged(Native Method) > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > > > at > > > com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass > > > (IsolatedAppClassLoader.java:142) > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:252) > > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) > > > ... 32 more > > > 15-Sep-2009 22:11:21 com.google.apphosting.utils.jetty.JettyLogger > > > warn > > > WARNING: /wavacalculator/fileupload > > > java.lang.NoClassDefFoundError: javax/jdo/JDOHelper > > > at > > > com.cloudscapesolutions.wavacalculator.server.UploadFileServlet.<clinit> > > > (UploadFileServlet.java:18) > > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > Method) > > > at sun.reflect.NativeConstructorAccessorImpl.newInstance > > > (NativeConstructorAccessorImpl.java:39) > > > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance > > > (DelegatingConstructorAccessorImpl.java:27) > > > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > > at java.lang.Class.newInstance0(Class.java:355) > > > at java.lang.Class.newInstance(Class.java:308) > > > at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153) > > > at org.mortbay.jetty.servlet.ServletHolder.getServlet > > > (ServletHolder.java:339) > > > at > > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: > > > 463) > > > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter > > > (ServletHandler.java:1093) > > > at > > > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter > > > (TransactionCleanupFilter.java:43) > > > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter > > > (ServletHandler.java:1084) > > > at com.google.appengine.tools.development.StaticFileFilter.doFilter > > > (StaticFileFilter.java:121) > > > at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter > > > (ServletHandler.java:1084) > > > at org.mortbay.jetty.servlet.ServletHandler.handle > > > (ServletHandler.java:360) > > > at org.mortbay.jetty.security.SecurityHandler.handle > > > (SecurityHandler.java:216) > > > at org.mortbay.jetty.servlet.SessionHandler.handle > > > (SessionHandler.java:181) > > > at org.mortbay.jetty.handler.ContextHandler.handle > > > (ContextHandler.java:712) > > > at > > > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: > > > 405) > > > at > > > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle > > > (DevAppEngineWebAppContext.java:54) > > > at org.mortbay.jetty.handler.HandlerWrapper.handle > > > (HandlerWrapper.java:139) > > > at com.google.appengine.tools.development.JettyContainerService > > > $ApiProxyHandler.handle(JettyContainerService.java:313) > > > at org.mortbay.jetty.handler.HandlerWrapper.handle > > > (HandlerWrapper.java:139) > > > at org.mortbay.jetty.Server.handle(Server.java:313) > > > at > > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: > > > 506) > > > at org.mortbay.jetty.HttpConnection$RequestHandler.content > > > (HttpConnection.java:844) > > > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) > > > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) > > > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) > > > at org.mortbay.io.nio.SelectChannelEndPoint.run > > > (SelectChannelEndPoint.java:396) > > > > > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---