开发者

Problem with GAE(J), EXTGwt and JPA

Greetings , I have been using GWT,Extgwt & JPA for few weeks. I have simple called Area and Works fine. When i add extgwt lib gxt-2.2.3 and create new class Area_dto which is extends the BaseModelData of Extgwt lib, i got errors as follows

[ERROR] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.myday.client.AreaService.greetServer(com.myday.shared.Area) throws java.lang.IllegalArgumentException' threw an unexpected exception: java.lang.ExceptionInInitializerError at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:94) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mo开发者_运维技巧rtbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: java.lang.ExceptionInInitializerError at com.myday.server.AreaServiceImpl.greetServer(AreaServiceImpl.java:19) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569) ... 34 more Caused by: javax.persistence.PersistenceException: Provider error. Provider: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider at javax.persistence.Persistence.createFactory(Persistence.java:176) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:112) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:66) at com.myday.server.EMF.(EMF.java:7) ... 41 more Caused by: org.datanucleus.exceptions.NucleusUserException: Class "transactions-optional" found to be part of persistence-unit "{1}" so loading it in case it is persistable at org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:787) at org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:488) at org.datanucleus.jpa.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:355) at org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.(DatastoreEntityManagerFactory.java:63) at org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider.createEntityManagerFactory(DatastorePersistenceProvider.java:35) at javax.persistence.Persistence.createFactory(Persistence.java:172) ... 44 more Caused by: org.datanucleus.exceptions.ClassNotResolvedException: Class "com.myday.shared.AreaModel" 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) ... 49 more


I Use Eclipse V3.6, GAE V 1.5

thanks Ragu


Finally i got the solution.

The Problem is gxt-xx.jar is not in folder war\WEB-INF\lib. I copied gxt-xx.jar file into war\WEB-INF\lib folder and everything working good.

By default, In Eclipse GAE gxt-xx.jar file not added in war\WEB-INF\lib folder in my experience.

Thanks to all

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜