as a workaround i removed the jdoconfig.xml file from the src/WEB-INF
directory and from the war/WEB-INF/classes/META-INF directory. then i
instantiated the persistence manager factory by using a map like the
following:
final Map<String, String> map = new HashMap<String, String>();
map.put("javax.jdo.PersistenceManagerFactoryClass",
"org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory");
map.put("javax.jdo.option.ConnectionURL", "appengine");
map.put("javax.jdo.option.NontransactionalRead", "true");
map.put("javax.jdo.option.NontransactionalWrite", "true");
map.put("javax.jdo.option.RetainValues", "true");
map.put("datanucleus.appengine.autoCreateDatastoreTxns",
"true");
pmf = JDOHelper.getPersistenceManagerFactory(map);
this somehow lets the test run successfully but throws the following
exception nevertheless:
[WARN] StandardContext[]Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract crm.client.dto.AbstractDto
crm.client.CommonService.get(int,long)' threw an unexpected exception:
java.lang.NullPointerException: No API environment is registered for
this thread.
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
188)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
224)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at
com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:
288)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:
198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:
929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
799)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
577)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NullPointerException: No API environment is
registered for this thread.
at
com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId(DatastoreApiHelper.java:
74)
at
com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamespace(DatastoreApiHelper.java:
84)
at com.google.appengine.api.datastore.Query.<init>(Query.java:84)
at
org.datanucleus.store.appengine.query.DatastoreQuery.validate(DatastoreQuery.java:
649)
at
org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java:
215)
at
org.datanucleus.store.appengine.query.JDOQLQuery.performExecute(JDOQLQuery.java:
89)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1489)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:
1371)
at org.datanucleus.store.query.Query.execute(Query.java:1344)
at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221)
at
crm.server.AbstractCommonService.getDomainObject(AbstractCommonService.java:
75)
at crm.server.CommonServiceReader.get(CommonServiceReader.java:48)
at crm.server.CommonServiceImpl.get(CommonServiceImpl.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
562)
... 31 more
logging for HtmlUnit thread
[ERROR] Alert: class
com.google.gwt.user.client.rpc.StatusCodeException
another user describes this problem here:
http://www.mail-archive.com/[email protected]/msg02473.html
anyone?
On 2 Jun., 19:16, ingo <[email protected]> wrote:
> hello everyone,
>
> does anyone know the root cause of this problem? i thought the reason
> might be duplicate jdoconfig.xml file. however, it turns out that
> deleting this file from the src/META-INF/ directory is not a good idea
> since it creates even more exceptions:
>
> [WARN] StandardWrapperValve[shell]: Servlet.service() for servlet
> shell threw exception
> java.lang.ExceptionInInitializerError
> at
> crm.server.AbstractCommonService.<clinit>(AbstractCommonService.java:
> 37)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:169)
> at
> com.google.gwt.dev.shell.GWTShellServlet.tryGetOrLoadServlet(GWTShellServle
> t.java:
> 953)
> at
> com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:
> 276)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
> nFilterChain.java:
> 237)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
> hain.java:
> 157)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
> ava:
> 214)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
> xt.java:
> 104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
> at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex
> tValve.java:
> 198)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
> ava:
> 152)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
> xt.java:
> 104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
> 137)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
> xt.java:
> 104)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
> 118)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
> xt.java:
> 102)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a:
> 109)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
> xt.java:
> 104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:
> 929)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
> 160)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
> 799)
> at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
> 577)
> at org.apache.tomcat.util.threads.ThreadPool
> $ControlRunnable.run(ThreadPool.java:683)
> at java.lang.Thread.run(Thread.java:637)
> Caused by: javax.jdo.JDOFatalUserException: A property named
> javax.jdo.PersistenceManagerFactoryClass must be specified, or a jar
> file with
> a META-INF/services/javax.jdo.PersistenceManagerFactory entry must be
> in the classpath, or a property named javax.jdo.option.PersistenceUnit
> Name must be specified.
> NestedThrowables:
> javax.jdo.JDOUserException: You have either specified for this PMF to
> use a "persistence-unit" of "transactions-optional" (yet this doesnt e
> xist!) or you called JDOHelper.getPersistenceManagerFactory with
> "transactions-optional" as the name of a properties file (and this
> doesnt e
> xist in the CLASSPATH)
> at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> 856)
> at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> 1092)
> at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> 914)
> at crm.server.PMF.<clinit>(PMF.java:20)
> ... 30 more
> Caused by: javax.jdo.JDOUserException: You have either specified for
> this PMF to use a "persistence-unit" of "transactions-optional" (yet
> th
> is doesnt exist!) or you called JDOHelper.getPersistenceManagerFactory
> with "transactions-optional" as the name of a properties file (and th
> is doesnt exist in the CLASSPATH)
> at
> org.datanucleus.jdo.JDOPersistenceManagerFactory.initialiseProperties(JDOPe
> rsistenceManagerFactory.java:
> 377)
> at
> org.datanucleus.jdo.JDOPersistenceManagerFactory.<init>(JDOPersistenceManag
> erFactory.java:
> 260)
> at
> org.datanucleus.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFacto
> ry(JDOPersistenceManagerFactory.java:
> 173)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.java:
> 25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at javax.jdo.JDOHelper$16.run(JDOHelper.java:1956)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.jdo.JDOHelper.invoke(JDOHelper.java:1951)
> at
> javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOH
> elper.java:
> 1159)
> at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> 839)
> ... 33 more
> logging for HtmlUnit thread
> [ERROR] Alert: class
> com.google.gwt.user.client.rpc.StatusCodeException
>
> On 2 Jun., 11:54, ingo <[email protected]> wrote:
>
>
>
> > hello everyone,
>
> > i am currently doing the honeycrm projecthttp://code.google.com/p/honeycrm/.
> > i wrote some server side tests that run without any
> > problems:http://code.google.com/p/honeycrm/source/browse/#svn/trunk/src/crm/se...
>
> > now, i would like to test the user interface code (e.g. testing
> > visibility of widgets as well as testing client-server-rpc
> > communication with timeouts). however, i am still unable to run the
> > user interface test code. for example, when i run the ServiceTest case
> > (http://code.google.com/p/honeycrm/source/browse/trunk/src/crm/client/
> > test/ServiceTest.java) i get the following exception:
>
> > Caused by: javax.jdo.JDOFatalUserException: Duplicate PMF name
> > "transactions-optional" found in file:/Users/ingo/svn/honeycrm_all/
> > trunk/src/
> > META-INF/jdoconfig.xml and file:/Users/ingo/svn/honeycrm_all/trunk/war/
> > WEB-INF/classes/META-INF/jdoconfig.xml.
> > at javax.jdo.JDOHelper.getNamedPMFProperties(JDOHelper.java:1300)
> > at javax.jdo.JDOHelper.getPropertiesFromJdoconfig(JDOHelper.java:
> > 1232)
> > at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> > 1079)
> > at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> > 914)
> > at crm.server.PMF.<clinit>(PMF.java:20)
> > ... 30 more
>
> > running the DetailViewTest (http://code.google.com/p/honeycrm/source/
> > browse/trunk/src/crm/client/test/DetailViewTest.java) case throws the
> > following exception (however, it seems like the test code is executed
> > nevertheless since the output is printed properly):
>
> > Starting HTTP on port 0
> > HTTP listening on port 55998
> > Startinghttp://10.10.10.100:55998/crm.Gae.JUnit/junit.html?gwt.codesvr=10.10....
> > on browser FF3
> > Module crm.Gae.JUnit has been loaded
> > All clients connected (Limiting future permutations to: gecko1_8)
> > is not null
> > [WARN] StandardWrapperValve[shell]: Servlet.service() for servlet
> > shell threw exception
> > java.lang.ExceptionInInitializerError
> > at
> > crm.server.AbstractCommonService.<clinit>(AbstractCommonService.java:
> > 37)
> > at java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Class.java:169)
> > at
> > com.google.gwt.dev.shell.GWTShellServlet.tryGetOrLoadServlet(GWTShellServle
> > t.java:
> > 953)
> > at
> > com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:
> > 276)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
> > nFilterChain.java:
> > 237)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
> > hain.java:
> > 157)
> > at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
> > ava:
> > 214)
> > at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
> > xt.java:
> > 104)
> > at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> > at
> > org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex
> > tValve.java:
> > 198)
> > at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
> > ava:
> > 152)
> > at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
> > xt.java:
> > 104)
> > at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> > at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
> > 137)
> > at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
> > xt.java:
> > 104)
> > at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
> > 118)
> > at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
> > xt.java:
> > 102)
> > at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> > at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
> > a:
> > 109)
> > at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
> > xt.java:
> > 104)
> > at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:
> > 929)
> > at
> > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
> > 160)
> > ...
>
> Erfahren Sie mehr »
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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-web-toolkit?hl=en.