You can get this error if you have jars in your JDK's lib/ext folder. The dev_appserver generally rejects any classes that are found there, because that feature doesn't make sense under App Engine. (I.E. you just put your jars in WEB-INF/lib instead).
On Tue, Apr 13, 2010 at 10:00 AM, hallmit <hall...@gmail.com> wrote: > hi folks, > > I've had a very strange issue when I'm deploying my web app in local > server(jetty). I got this message: > > Caused by: java.lang.NoClassDefFoundError: > javax.persistence.Persistence is a restricted class. Please see the > Google App Engine developer's guide for more details. > at > > com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java: > 51) > > The offending code is : > _emf = > Persistence.createEntityManagerFactory(aPersistenceUnitName); > > But javax.persistence.Persistence is not a restricted class because I > have already used it in other application. I don't understand why I'm > getting this message. my business classes are embedded in a .jar > archive that I put in WEB-INF/lib. > I copied all jars from ${sdk.dir}/lib/user to my WEB-INF/lib too. > > I use: > sdk 1.3.1 > > any ideas? > > -- > 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-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- 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-j...@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.