All I'm doing is persisting an entity in the datastore. No biggie. And
now I get this super weird error. What is the deal here?

I have no idea how to fix this, especially when the stack trace says
that some code is calling some code "which should be impossible." Has
anyone run into this problem and / or know how to fix?

The culprit code:

                        Message message = new Message();
                        message.setActionPlan(actionPlan.getKey());
                        message.setBody(new Text(body));
                        message.setCoach(actionPlan.getActionPlanScript());
                        message.setCoachName(actionPlanScript.getName());
                        message.setMedium(Notifications.Medium.ANDROID);
                        message.setSubject(subject);
                        message.setUser(user.getId());

                        messageManager.saveMessage(message);



Here's the stack trace:

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.todoroo.client.ActionPlanScriptUploadService.uploadActionPlanScript
(java.lang.Long,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)'
threw an unexpected exception:
org.mozilla.javascript.WrappedException: Wrapped
javax.persistence.PersistenceException: Somehow
org.datanucleus.sco.UnsetOwners.storeStringField() was called, which
should have been impossible (SimpleShort#5)
        at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
(RPC.java:360)
        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
(RPC.java:546)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:166)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:86)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
        at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
(SaveSessionFilter.java:35)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
        at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
        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.runtime.jetty.AppVersionHandlerMap.handle
(AppVersionHandlerMap.java:237)
        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.headerComplete
(HttpConnection.java:830)
        at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
(RpcRequestParser.java:76)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
        at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest
(JettyServletEngineAdapter.java:139)
        at com.google.apphosting.runtime.JavaRuntime.handleRequest
(JavaRuntime.java:235)
        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:4823)
        at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:4821)
        at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
(BlockingApplicationHandler.java:24)
        at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
359)
        at com.google.net.rpc.impl.Server$2.run(Server.java:820)
        at com.google.tracing.LocalTraceSpanRunnable.run
(LocalTraceSpanRunnable.java:56)
        at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
(LocalTraceSpanBuilder.java:516)
        at com.google.net.rpc.impl.Server.startRpc(Server.java:775)
        at com.google.net.rpc.impl.Server.processRequest(Server.java:348)
        at com.google.net.rpc.impl.ServerConnection.messageReceived
(ServerConnection.java:436)
        at com.google.net.rpc.impl.RpcConnection.parseMessages
(RpcConnection.java:319)
        at com.google.net.rpc.impl.RpcConnection.dataReceived
(RpcConnection.java:290)
        at com.google.net.async.Connection.handleReadEvent(Connection.java:
428)
        at com.google.net.async.EventDispatcher.processNetworkEvents
(EventDispatcher.java:762)
        at com.google.net.async.EventDispatcher.internalLoop
(EventDispatcher.java:207)
        at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
101)
        at com.google.net.rpc.RpcService.runUntilServerShutdown
(RpcService.java:251)
        at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run
(JavaRuntime.java:374)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.mozilla.javascript.WrappedException: Wrapped
javax.persistence.PersistenceException: Somehow
org.datanucleus.sco.UnsetOwners.storeStringField() was called, which
should have been impossible (SimpleShort#5)
        at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:
1782)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
        at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:
247)
        at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:
76)
        at org.mozilla.javascript.gen.SimpleShort_2._c_anonymous_2
(SimpleShort:5)
        at org.mozilla.javascript.gen.SimpleShort_2.call(SimpleShort)
        at org.mozilla.javascript.ContextFactory.doTopCall
(ContextFactory.java:426)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:
3092)
        at org.mozilla.javascript.gen.SimpleShort_2.call(SimpleShort)
        at com.todoroo.service.impl.JavaScriptManagerImpl.callActionPlanFn
(JavaScriptManagerImpl.java:201)
        at
com.todoroo.service.impl.JavaScriptManagerImpl.callActionPlanTransitionFn
(JavaScriptManagerImpl.java:162)
        at
com.todoroo.service.impl.JavaScriptManagerImpl.callActionPlanForFirstTime
(JavaScriptManagerImpl.java:155)
        at
com.todoroo.server.ActionPlanScriptUploadServiceImpl.uploadActionPlanScript
(ActionPlanScriptUploadServiceImpl.java:80)
        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.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_
$3.run(Method_.java:149)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke
(Method_.java:147)
        at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke
(Method_.java:120)
        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
(RPC.java:527)
        ... 43 more
Caused by: javax.persistence.PersistenceException: Somehow
org.datanucleus.sco.UnsetOwners.storeStringField() was called, which
should have been impossible
        at org.datanucleus.jpa.NucleusJPAHelper.getJPAExceptionForJDOException
(NucleusJPAHelper.java:214)
        at org.datanucleus.jpa.EntityManagerImpl.close(EntityManagerImpl.java:
157)
        at org.datanucleus.store.appengine.jpa.DatastoreEntityManager.close
(DatastoreEntityManager.java:54)
        at com.todoroo.dao.impl.GenericDaoImpl.makePersistent
(GenericDaoImpl.java:173)
        at com.todoroo.dao.impl.GenericDaoImpl.makePersistent
(GenericDaoImpl.java:181)
        at com.todoroo.service.impl.MessageManagerImpl.saveMessage
(MessageManagerImpl.java:44)
        at
com.todoroo.service.impl.JavaScriptManagerImpl.createShortNotification
(JavaScriptManagerImpl.java:600)
        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.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_
$3.run(Method_.java:149)
        at java.security.AccessController.doPrivileged(Native Method)
        at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke
(Method_.java:147)
        at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke
(Method_.java:120)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
        ... 63 more
Caused by: org.datanucleus.exceptions.NucleusException: Somehow
org.datanucleus.sco.UnsetOwners.storeStringField() was called, which
should have been impossible
        at
org.datanucleus.store.fieldmanager.AbstractFieldManager.storeStringField
(AbstractFieldManager.java:123)
        at org.datanucleus.state.AbstractStateManager.providedStringFie...



Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to