GAEで謎のエラーではまる(ちょい解決)
Ownedな関連が作れるようになったーとおもい調子に乗っていると躓いてしまった。
Categoryの一覧をJSPで表示させようとしたとき、最初の1回目のアクセスは正常に表示されるんだけど、2回目アクセスすると必ず下のエラーがでるようになった。
追記
このエラーの解決方法は↓ここ
Slim3とGAE謎のエラーの件。ちょっと解消 - ありの日記
java.lang.NullPointerException at org.datanucleus.store.appengine.DatastoreRelationFieldManager.lookupParent(DatastoreRelationFieldManager.java:309) at org.datanucleus.store.appengine.DatastoreRelationFieldManager.fetchRelationField(DatastoreRelationFieldManager.java:289) at org.datanucleus.store.appengine.DatastoreFieldManager.fetchObjectField(DatastoreFieldManager.java:271) at org.datanucleus.state.AbstractStateManager.replacingObjectField(AbstractStateManager.java:1197) at com.sample.model.Category.jdoReplaceField(Category.java) at com.sample.model.Category.jdoReplaceFields(Category.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:349) at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo(DatastoreQuery.java:384) at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo(DatastoreQuery.java:345) at org.datanucleus.store.appengine.query.DatastoreQuery.access$700(DatastoreQuery.java:96) at org.datanucleus.store.appengine.query.DatastoreQuery$5.apply(DatastoreQuery.java:454) at org.datanucleus.store.appengine.query.DatastoreQuery$5.apply(DatastoreQuery.java:453) at org.datanucleus.store.appengine.query.StreamingQueryResult.resolveNext(StreamingQueryResult.java:137) at org.datanucleus.store.appengine.query.StreamingQueryResult$1.computeNext(StreamingQueryResult.java:163) at org.datanucleus.store.appengine.query.AbstractIterator.tryToComputeNext(AbstractIterator.java:132) at org.datanucleus.store.appengine.query.AbstractIterator.hasNext(AbstractIterator.java:127) at org.datanucleus.store.appengine.query.StreamingQueryResult$AbstractListIterator.hasNext(StreamingQueryResult.java:229) at org.apache.taglibs.standard.tag.common.core.ForEachSupport$SimpleForEachIterator.hasNext(ForEachSupport.java:105) at org.apache.taglibs.standard.tag.common.core.ForEachSupport.hasNext(ForEachSupport.java:126) at javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(LoopTagSupport.java:233) at org.apache.jsp.data.category.index_jsp._jspx_meth_c_forEach_0(index_jsp.java:116) at org.apache.jsp.data.category.index_jsp._jspService(index_jsp.java:86) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at com.google.appengine.tools.development.PrivilegedJspServlet.access$101(PrivilegedJspServlet.java:23) at com.google.appengine.tools.development.PrivilegedJspServlet$2.run(PrivilegedJspServlet.java:59) at java.security.AccessController.doPrivileged(Native Method) at com.google.appengine.tools.development.PrivilegedJspServlet.service(PrivilegedJspServlet.java:57) 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 org.slim3.controller.FrontController.doFilterInternal(FrontController.java:279) at org.slim3.controller.FrontController.doFilter(FrontController.java:246) at org.slim3.controller.FrontController.doFilter(FrontController.java:213) 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.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:268) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126) at org.slim3.controller.FrontController.doForward(FrontController.java:563) at org.slim3.controller.FrontController.handleNavigation(FrontController.java:503) at org.slim3.controller.FrontController.processController(FrontController.java:460) at org.slim3.controller.FrontController.doFilterInternal(FrontController.java:281) at org.slim3.controller.FrontController.doFilter(FrontController.java:246) at org.slim3.controller.FrontController.doFilter(FrontController.java:213) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.slim3.jdo.JDOFilter.doFilter(JDOFilter.java:63) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.slim3.controller.HotReloadingFilter.doFilter(HotReloadingFilter.java:160) 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 com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:124) 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.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:313) 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 org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
lookupParentってのがあるからCategoryの親クラスのフィールドにアクセスしようとしてエラーなのかなー。たしかにJSPでは、Categoryの親クラスのフィールドにアクセスしようとしてたからとりあえずその部分削除してやってみたけどダメ。
うーん。明日中には解決させたい。今日はもうだめぽ。