title: How do I start debugging this JDO exception?
body: <p>I get this set of exceptions from time to time when running my application in hosted mode in Eclipse.  What's strange about it, is that it doesn't happen consistently.  It will happen occasionally after recompiling and restarting the application.  Restarting Eclipse will often clear it up (without a code change).  does anyone have any thoughts on what might be going on here?  Or even where I'd start looking?</p>
  
  <pre>
  [ERROR] javax.servlet.ServletContext log: Exception while dispatching incoming RPC call
  com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.grgcomponents.coatl.client.auth.TwitterUser com.grgcomponents.coatl.client.auth.TwitterLoginService.getLoggedInUser(java.lang.String) throws java.lang.IllegalArgumentException' threw an unexpected exception: java.lang.UnsupportedOperationException
      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:207)
      at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:243)
      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.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 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:349)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      at org.mortbay.jetty.Server.handle(Server.java:326)
      at org.mortbay.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.UnsupportedOperationException
      at org.datanucleus.store.appengine.EntityUtils.getPropertyName(EntityUtils.java:62)
      at org.datanucleus.store.appengine.DatastoreFieldManager.getPropertyName(DatastoreFieldManager.java:1073)
      at org.datanucleus.store.appengine.DatastoreFieldManager.fetchObjectField(DatastoreFieldManager.java:309)
      at org.datanucleus.store.appengine.DatastoreFieldManager.fetchLongField(DatastoreFieldManager.java:429)
      at org.datanucleus.state.AbstractStateManager.replacingLongField(AbstractStateManager.java:1148)
      at com.grgcomponents.coatl.server.persisted.TwitterOAuthTokens.jdoReplaceField(TwitterOAuthTokens.java)
      at com.grgcomponents.coatl.server.persisted.TwitterOAuthTokens.jdoReplaceFields(TwitterOAuthTokens.java)
      at org.datanucleus.state.JDOStateManagerImpl.replaceFields(JDOStateManagerImpl.java:2772)
      at org.datanucleus.state.JDOStateManagerImpl.replaceFields(JDOStateManagerImpl.java:2791)
      at org.datanucleus.store.appengine.DatastorePersistenceHandler.fetchObject(DatastorePersistenceHandler.java:480)
      at org.datanucleus.state.JDOStateManagerImpl.validate(JDOStateManagerImpl.java:4263)
      at org.datanucleus.ObjectManagerImpl.findObject(ObjectManagerImpl.java:2444)
      at org.datanucleus.jpa.EntityManagerImpl.find(EntityManagerImpl.java:234)
      at org.datanucleus.store.appengine.jpa.DatastoreEntityManager.find(DatastoreEntityManager.java:56)
      at com.grgcomponents.coatl.server.auth.TwitterLoginServiceImpl.getCurrentUser(TwitterLoginServiceImpl.java:45)
      at com.grgcomponents.coatl.server.auth.TwitterLoginServiceImpl.getLoggedInUser(TwitterLoginServiceImpl.java:30)
      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.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100)
      at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
      ... 30 more
  
  
  [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.grgcomponents.coatl.client.preferences.UserSettingsService.getSetting(java.lang.String,java.lang.String)' threw an unexpected exception: java.lang.UnsupportedOperationException
      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:207)
      at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:243)
      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.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 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:349)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      at org.mortbay.jetty.Server.handle(Server.java:326)
      at org.mortbay.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.QueuedThreacom.google.gwt.user.client.rpc.StatusCodeException: 500 The call failed on the server; see server log for details
      at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:192)
      at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
      at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
      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.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
      at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
      at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
      at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
      at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
      at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
      at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
      at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
      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.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
      at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
      at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
      at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
      at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
      at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
      at java.lang.Thread.run(Thread.java:680)
  dPool$PoolThread.run(QueuedThreadPool.java:582)
  Caused by: java.lang.UnsupportedOperationException
      at org.datanucleus.store.appengine.EntityUtils.getPropertyName(EntityUtils.java:62)
      at org.datanucleus.store.appengine.DatastoreFieldManager.getPropertyName(DatastoreFieldManager.java:1073)
      at org.datanucleus.store.appengine.DatastoreFieldManager.fetchObjectField(DatastoreFieldManager.java:309)
      at org.datanucleus.store.appengine.DatastoreFieldManager.fetchLongField(DatastoreFieldManager.java:429)
      at org.datanucleus.state.AbstractStateManager.replacingLongField(AbstractStateManager.java:1148)
      at com.grgcomponents.coatl.server.persisted.TwitterOAuthTokens.jdoReplaceField(TwitterOAuthTokens.java)
      at com.grgcomponents.coatl.server.persisted.TwitterOAuthTokens.jdoReplaceFields(TwitterOAuthTokens.java)
      at org.datanucleus.state.JDOStateManagerImpl.replaceFields(JDOStateManagerImpl.java:2772)
      at org.datanucleus.state.JDOStateManagerImpl.replaceFields(JDOStateManagerImpl.java:2791)
      at org.datanucleus.store.appengine.DatastorePersistenceHandler.fetchObject(DatastorePersistenceHandler.java:480)
      at org.datanucleus.state.JDOStateManagerImpl.validate(JDOStateManagerImpl.java:4263)
      at org.datanucleus.ObjectManagerImpl.findObject(ObjectManagerImpl.java:2444)
      at org.datanucleus.jpa.EntityManagerImpl.find(EntityManagerImpl.java:234)
      at org.datanucleus.store.appengine.jpa.DatastoreEntityManager.find(DatastoreEntityManager.java:56)
      at com.grgcomponents.coatl.server.UserUtil.getTwitter(UserUtil.java:40)
      at com.grgcomponents.coatl.server.UserUtil.getUserSetting(UserUtil.java:62)
      at com.grgcomponents.coatl.server.preferences.UserSettingsServiceImpl.getSetting(UserSettingsServiceImpl.java:14)
      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.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100)
      at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
      ... 30 more
  </pre>
  
  <p>Here's the class that I'm trying to persist:</p>
  
  <pre><code>package com.grgcomponents.coatl.server.persisted;
  
  import javax.persistence.Entity;
  import javax.persistence.Id;
  
  @Entity
  public class TwitterOAuthTokens {
  @Id
  private String loginManagerCookie;
  
  private String requestTokenKey;
  
  private String requestTokenSecret;
  
  private String userToken;
  
  private String userTokenSecret;
  
  private long lastUsed;
  
  public String getLoginManagerCookie() {
      return loginManagerCookie;
  }
  
  public void setLoginManagerCookie(String loginManagerCookie) {
      this.loginManagerCookie = loginManagerCookie;
  }
  
  public String getUserToken() {
      return userToken;
  }
  
  public void setUserToken(String userToken) {
      this.userToken = userToken;
  }
  
  public String getUserTokenSecret() {
      return userTokenSecret;
  }
  
  public void setUserTokenSecret(String userTokenSecret) {
      this.userTokenSecret = userTokenSecret;
  }
  
  public String getRequestTokenKey() {
      return requestTokenKey;
  }
  
  public void setRequestTokenKey(String requestTokenKey) {
      this.requestTokenKey = requestTokenKey;
  }
  
  public String getRequestTokenSecret() {
      return requestTokenSecret;
  }
  
  public void setRequestTokenSecret(String requestTokenSecret) {
      this.requestTokenSecret = requestTokenSecret;
  }
  
  public long getLastUsed() {
      return lastUsed;
  }
  
  public void setLastUsed(long lastUsed) {
      this.lastUsed = lastUsed;
  }
  
  }
  </code></pre>
  
  <p>Here's the call that actually appears to be failing (We enter in getTwitter( String ), and the failure occurs on the last line:</p>
  
  <pre><code>public static Twitter getTwitter( String loginManagerId )
  {
      if( loginManagerId == null )
          return null;
  
      EntityManager em = CoatlEntityManagerFactory.getDefault()
              .createEntityManager();
  
      return getTwitter( loginManagerId, em );
  }
  
  public static Twitter getTwitter( String loginManagerId, EntityManager em )
  {
      if( loginManagerId == null )
          return null;
  
      TwitterOAuthTokens storedTokens = em.find( TwitterOAuthTokens.class,
              loginManagerId );
  </code></pre>