getPageIterator's result is null, check your ModelListAction subclass
環境:myeclipse+tomcat
應用名:Jdonsample
Jndi: 在tomcat下的conf\Catalina\localhost下放入一個Jdonsample.xml檔案內容如下
<Context path="/Jdonsample" docBase="Jdonsample" debug="99" reloadable="true" crossContext="true" verbosity="DEBUG">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="Jdonsample." suffix=".log" timestamp="true" />
<Resource name="TestDS" auth="Container" type="javax.sql.DataSource" />
<ResourceParams name="TestDS">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/Jdonsample</value>
</parameter>
<parameter>
<name>username</name>
<value>root</value>
</parameter>
<parameter>
<name>password</name>
<value>root</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
</ResourceParams>
</Context>
在web.xml中新增了如下一段
<resource-ref>
<description>MySQL Connection</description>
<res-ref-name>TestDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
jdonframework.xml中的配置修改了以下部分
<component name="messageDao" class="sample.dao.hibernate.MessageDaoHB" >
<constructor value="java:comp/env/TestDS"/>
</component>
執行後,控制檯出現如下錯誤
2006-03-29 10:10:52,438 [Thread-5] DEBUG com.jdon.util.UtilCache - [JdonFramework]found cache configure: cache.default.maxSize = 1000
2006-03-29 10:10:58,366 [Thread-5] ERROR com.jdon.bussinessproxy.target.POJOObjectFactory - [JdonFramework]create error: java.lang.NoClassDefFoundError: org/dom4j/Attribute
2006-03-29 10:10:58,366 [Thread-5] ERROR com.jdon.bussinessproxy.target.DefaultTargetServiceFactory - [JdonFramework]create error: java.lang.Exception: java.lang.NoClassDefFoundError: org/dom4j/Attribute
2006-03-29 10:10:58,386 [Thread-5] ERROR root - com.jdon.aop.interceptor.PoolInterceptor
java.lang.NullPointerException
at com.jdon.aop.interceptor.PoolInterceptor.invoke(PoolInterceptor.java:106)
at com.jdon.aop.reflection.ProxyMethodInvocation.proceed(ProxyMethodInvocation.java:84)
at com.jdon.aop.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:59)
at com.jdon.aop.reflection.ProxyMethodInvocation.proceed(ProxyMethodInvocation.java:84)
at com.jdon.aop.AopClient.invoke(AopClient.java:95)
at com.jdon.bussinessproxy.dyncproxy.DynamicProxyWeaving.invoke(DynamicProxyWeaving.java:61)
at $Proxy0.getAllMessages(Unknown Source)
at sample.web.MessageListAction.getPageIterator(MessageListAction.java:39)
at com.jdon.strutsutil.ModelListAction.execute(ModelListAction.java:65)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:286)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:253)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:256)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:210)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:190)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:175)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:974)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:207)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:637)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:488)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:568)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:631)
at java.lang.Thread.run(Thread.java:534)
2006-03-29 10:10:58,396 [Thread-5] DEBUG com.jdon.bussinessproxy.dyncproxy.DynamicProxyWeaving - [JdonFramework]call method:getAllMessages finish!
2006-03-29 10:10:58,426 [Thread-5] WARN org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class java.lang.Exception
並且在啟動時出現了
<======== Jdon Framework started successfully! =========>
開啟Jdonsample.2006-03-29.log檢視,發現如下提示
2006-03-29 10:10:58 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
java.lang.Exception: getPageIterator's result is null, check your ModelListAction subclass
at com.jdon.strutsutil.ModelListAction.execute(ModelListAction.java:67)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:286)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:253)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:256)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:210)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:190)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:175)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:974)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:207)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:637)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:488)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:568)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:631)
at java.lang.Thread.run(Thread.java:534)
實在不知道什麼原因,請bang老師幫忙
應用名:Jdonsample
Jndi: 在tomcat下的conf\Catalina\localhost下放入一個Jdonsample.xml檔案內容如下
<Context path="/Jdonsample" docBase="Jdonsample" debug="99" reloadable="true" crossContext="true" verbosity="DEBUG">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="Jdonsample." suffix=".log" timestamp="true" />
<Resource name="TestDS" auth="Container" type="javax.sql.DataSource" />
<ResourceParams name="TestDS">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/Jdonsample</value>
</parameter>
<parameter>
<name>username</name>
<value>root</value>
</parameter>
<parameter>
<name>password</name>
<value>root</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
</ResourceParams>
</Context>
在web.xml中新增了如下一段
<resource-ref>
<description>MySQL Connection</description>
<res-ref-name>TestDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
jdonframework.xml中的配置修改了以下部分
<component name="messageDao" class="sample.dao.hibernate.MessageDaoHB" >
<constructor value="java:comp/env/TestDS"/>
</component>
執行後,控制檯出現如下錯誤
2006-03-29 10:10:52,438 [Thread-5] DEBUG com.jdon.util.UtilCache - [JdonFramework]found cache configure: cache.default.maxSize = 1000
2006-03-29 10:10:58,366 [Thread-5] ERROR com.jdon.bussinessproxy.target.POJOObjectFactory - [JdonFramework]create error: java.lang.NoClassDefFoundError: org/dom4j/Attribute
2006-03-29 10:10:58,366 [Thread-5] ERROR com.jdon.bussinessproxy.target.DefaultTargetServiceFactory - [JdonFramework]create error: java.lang.Exception: java.lang.NoClassDefFoundError: org/dom4j/Attribute
2006-03-29 10:10:58,386 [Thread-5] ERROR root - com.jdon.aop.interceptor.PoolInterceptor
java.lang.NullPointerException
at com.jdon.aop.interceptor.PoolInterceptor.invoke(PoolInterceptor.java:106)
at com.jdon.aop.reflection.ProxyMethodInvocation.proceed(ProxyMethodInvocation.java:84)
at com.jdon.aop.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:59)
at com.jdon.aop.reflection.ProxyMethodInvocation.proceed(ProxyMethodInvocation.java:84)
at com.jdon.aop.AopClient.invoke(AopClient.java:95)
at com.jdon.bussinessproxy.dyncproxy.DynamicProxyWeaving.invoke(DynamicProxyWeaving.java:61)
at $Proxy0.getAllMessages(Unknown Source)
at sample.web.MessageListAction.getPageIterator(MessageListAction.java:39)
at com.jdon.strutsutil.ModelListAction.execute(ModelListAction.java:65)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:286)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:253)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:256)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:210)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:190)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:175)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:974)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:207)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:637)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:488)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:568)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:631)
at java.lang.Thread.run(Thread.java:534)
2006-03-29 10:10:58,396 [Thread-5] DEBUG com.jdon.bussinessproxy.dyncproxy.DynamicProxyWeaving - [JdonFramework]call method:getAllMessages finish!
2006-03-29 10:10:58,426 [Thread-5] WARN org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class java.lang.Exception
並且在啟動時出現了
<======== Jdon Framework started successfully! =========>
開啟Jdonsample.2006-03-29.log檢視,發現如下提示
2006-03-29 10:10:58 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
java.lang.Exception: getPageIterator's result is null, check your ModelListAction subclass
at com.jdon.strutsutil.ModelListAction.execute(ModelListAction.java:67)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:286)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:253)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:256)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:210)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:190)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:175)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:974)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:207)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:637)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:488)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:568)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:631)
at java.lang.Thread.run(Thread.java:534)
實在不知道什麼原因,請bang老師幫忙
相關文章
- not null與check is not nullNull
- How to check payroll result is posted?
- CHECK約束中的NULL條件Null
- 錯誤內容:You have an error in your SQL syntax; check the manual that corresponds to your MySQL serverErrorMySqlServer
- Fontconfig head is null, check your fonts or fonts configuration 生產環境Centos伺服器報錯 本地沒問題NullCentOS伺服器
- 關於jdon的PageIterator的getPageIterator方法
- would dispatch back to the current handler URL [/doLogin] again. Check your ViewResolver setup!AIView
- not null constraint和check constriant的問題及分析NullAI
- 登陸peoplesoft報:Site name is not valid. Check your url syntax and try again.AI
- How SAP S/4 HANA Finance improves your Profitability Management?NaN
- Your project's analysis phase should yield three critical documents (轉)Project
- Xcode8 使用 CoreData 建立 NSManageObject subclassXCodeObject
- 12.28--Sean, it's fine. You should check this out.
- 登入 k8s-Dashboard 顯示 Your connection is not privateK8S
- ((NULL) null).printNULL();((NULL) null).printnull();Null
- Your Prediction Gets As Good As Your DataGo
- Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration.iOSError
- Hibernate 與 MySql 資料庫關鍵字衝突You have an error in your SQL syntax; check the manualMySql資料庫Error
- Lesson8 What's your job? 你是做什麼工作的?
- mpi4py安裝報錯error: Cannot compile MPI programs. Check your configuration!!!ErrorCompile
- configure: error: xml2-config not found. Please check your libxml2 installationErrorXML
- print the result sqlSQL
- How SAP S/4 HANA Finance makes your financial planning more agile?NaN
- IS NULL和IS NOT NULLNull
- Your title
- Siebel SIA8.1.1 "_swe._sweapp.S_CAS' is null or not an object.APPNullObject
- PHP之——configure: error: xml2-config not found. Please check your libxml2 installationPHPErrorXML
- jQuery event.resultjQuery
- Oracle Query Result CacheOracle
- onclick="return check()" 和 onclick="check()" 區別
- Prettier your projectProject
- 了不起的 “filter(NULL IS NOT NULL)”FilterNull
- MySQL中is not null和!=null和<>null的區別MySqlNull
- Oracle 11.2.0.1 Result Cache 測試 - 12 DBMS_RESULT_CACHE管理包Oracle
- FileReader result 屬性
- 淺談Oracle Result CacheOracle
- Numercial result of ADFP
- 【NULL】Oracle null值介紹NullOracle