[TUIGWAA-78] ページ編集におけるプレビュー画面表示のさいに発生するNullPointerException(記事76,77を包含している可能性大) Created: 08/Sep/06  Updated: 27/Sep/06  Resolved: 27/Sep/06

Status: Resolved
Project: Tuigwaa
Component/s: None
Affects Version/s: 0.9.1
Fix Version/s: 1.0

Type: Bug Priority: Major
Reporter: Terashi Yoshihiko Assignee: takishita
Resolution: Fixed Votes: 0
Labels: None


 Description   

記事76,及び77の内容と同様,ページ編集画面において,「集計値の挿入」や「テーブルの挿入」などといった他のプラグインを挿入し,プレビュー画面を表示した場合も同様に NullPointerException が発生する.

関連記事:
76 https://www.seasar.org/issues/browse/TUIGWAA-76
77 https://www.seasar.org/issues/browse/TUIGWAA-77

以下,「集計値の挿入」を挿入したさいに出力されたログを記載する.

[[ ログ ]]
java.lang.NullPointerException
at org.seasar.tuigwaa.model.ModelServiceImpl.getEntity(ModelServiceImpl.java:204)
at org.seasar.tuigwaa.database.function.AbstractExeFunction.getEntity(AbstractExeFunction.java:75)
at org.seasar.tuigwaa.database.function.AbstractCriteriaExeFunction.createHibernateCriteria(AbstractCriteriaExeFunction.java:33)
at org.seasar.tuigwaa.database.function.CriteriaExeFunction.evaluate(CriteriaExeFunction.java:113)
at org.seasar.tuigwaa.database.function.CriteriaExeFunction$$EnhancedByS2AOP$$f596b2.evaluate$$invokeSuperMethod$$(CriteriaExeFunction$$EnhancedByS2AOP$$f596b2.java)
at org.seasar.tuigwaa.database.function.CriteriaExeFunction$$EnhancedByS2AOP$$f596b2$$MethodInvocation$$evaluate0.proceed(MethodInvocationClassGenerator.java)
at org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:40)
at org.seasar.tuigwaa.database.function.CriteriaExeFunction$$EnhancedByS2AOP$$f596b2$$MethodInvocation$$evaluate0.proceed(MethodInvocationClassGenerator.java)
at org.seasar.tuigwaa.database.function.CriteriaExeFunction$$EnhancedByS2AOP$$f596b2.evaluate(CriteriaExeFunction$$EnhancedByS2AOP$$f596b2.java)
at org.seasar.tuigwaa.model.DataServiceImpl.doFind(DataServiceImpl.java:185)
at org.seasar.tuigwaa.model.DataServiceImpl.getValue(DataServiceImpl.java:104)
at org.seasar.tuigwaa.model.DataServiceImpl$$EnhancedByS2AOP$$1cb4a6a.getValue$$invokeSuperMethod$$(DataServiceImpl$$EnhancedByS2AOP$$1cb4a6a.java)
at org.seasar.tuigwaa.model.DataServiceImpl$$EnhancedByS2AOP$$1cb4a6a$$MethodInvocation$$getValue1.proceed(MethodInvocationClassGenerator.java)
at org.seasar.tuigwaa.logic.aop.MethodDecorateInterceptorImpl.invoke(MethodDecorateInterceptorImpl.java:25)
at org.seasar.tuigwaa.model.DataServiceImpl$$EnhancedByS2AOP$$1cb4a6a$$MethodInvocation$$getValue1.proceed(MethodInvocationClassGenerator.java)
at org.seasar.tuigwaa.model.DataServiceImpl$$EnhancedByS2AOP$$1cb4a6a.getValue(DataServiceImpl$$EnhancedByS2AOP$$1cb4a6a.java)
at org.seasar.tuigwaa.plugin.database.ValuePlugin.doHTMLView(ValuePlugin.java:37)
at org.seasar.tuigwaa.plugin.AbstractPlugin.service(AbstractPlugin.java:100)
at org.seasar.tuigwaa.cms.core.wiki.base.HTMLWikiVisitor.visit(HTMLWikiVisitor.java:666)
at org.seasar.tuigwaa.cms.core.wiki.engine.WikiInlinePlugin.jjtAccept(WikiInlinePlugin.java:18)
at org.seasar.tuigwaa.cms.core.wiki.base.HTMLWikiVisitor.visit(HTMLWikiVisitor.java:155)
at org.seasar.tuigwaa.cms.core.wiki.engine.WikiParagraph.jjtAccept(WikiParagraph.java:17)
at org.seasar.tuigwaa.cms.core.wiki.base.HTMLWikiVisitor.visit(HTMLWikiVisitor.java:122)
at org.seasar.tuigwaa.cms.core.wiki.engine.WikiGenerateTree.jjtAccept(WikiGenerateTree.java:21)
at org.seasar.tuigwaa.cms.core.wiki.WikiEngine.service(WikiEngine.java:43)
at org.seasar.tuigwaa.cms.core.CmsContainer.service(CmsContainer.java:45)
at org.seasar.tuigwaa.cms.ContentsServiceImpl.doConvert(ContentsServiceImpl.java:172)
at org.seasar.tuigwaa.cms.ContentsServiceImpl.convert(ContentsServiceImpl.java:152)
at org.seasar.tuigwaa.cms.ContentsServiceImpl.convert(ContentsServiceImpl.java:141)
at org.seasar.tuigwaa.controller.PageForm.getPreviewHTMLByAjax(PageForm.java:78)
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.metaparadigm.jsonrpc.JSONRPCBridge.call(JSONRPCBridge.java:934)
at com.metaparadigm.jsonrpc.JSONRPCServlet.service(JSONRPCServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.seasar.tuigwaa.util.filter.ForwardFilter.doFilter(ForwardFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.seasar.struts.filter.S2StrutsFilter.doFilter(S2StrutsFilter.java:45)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)



 Comments   
Comment by takishita [ 21/Sep/06 ]

エラーハンドリングとあわせて、INFO レベルで出る程度に修正しましょう。

Comment by takishita [ 27/Sep/06 ]

ModelServiceImple#getEntity
ModelServiceImple#getEntityByDisplayName

にて、domain が null である場合に、
TgwRuntimeException をスローするように修正。

同時に、

HTMLWikiVisitor の visit メソッド内で捕捉、ロギングする方針で対応した。

Generated at Tue Apr 20 02:54:11 JST 2021 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.