系统起来,页面访问报空指针错.折腾了好几个小时.
原因是因为修改了model中的校验器,然后dorado控件存在bug导致参数丢失. type="range"丢掉了
导致启动ok 访问页面就报空指针错误.
解决思路:
先判断是eclipse的问题,还是代码的问题.
将程序部署到测试环境也报相同的错误,确定为程序的问题.
猜测是某个文件的修改导致,看了下svn的提交日志.各个文件逐一排查.
将soliTool.model.xml 退回到老版本,并且将删掉的java类加回来,页面能正常访问.
定位到这个文件的原因.
<PropertyDef name="start_hour">
<Property name="dataType">Integer</Property>
<Property name="required">true</Property>
<Validator type="range">
<Property name="maxValue">23</Property>
<Property name="minValue">9</Property>
<Property name="maxValueValidateMode">allowEquals</Property>
<Property name="minValueValidateMode">allowEquals</Property>
<Property name="resultMessage">小时区间为9~23</Property>
<Property name="runAt">both</Property>
</Validator>
</PropertyDef>
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at com.bstek.dorado.data.variant.DefaultVariantConvertor$DataTypeReference.convertFromObject(DefaultVariantConvertor.java:75)
at com.bstek.dorado.data.variant.DefaultVariantConvertor.toInt(DefaultVariantConvertor.java:124)
at com.bstek.dorado.data.variant.VariantUtils.toInt(VariantUtils.java:77)
at com.bstek.dorado.view.resolver.PageHeaderOutputter.output(PageHeaderOutputter.java:95)
at com.bstek.dorado.view.resolver.PageOutputUtils.outputHeader(PageOutputUtils.java:64)
at com.bstek.dorado.view.taglib.PageHeaderTag.doEndTag(PageHeaderTag.java:40)
at org.apache.jsp.login_jsp._jspx_meth_d_005fPageHeader_005f0(login_jsp.java:154)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:72)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at com.bstek.dorado.view.resolver.HtmlViewResolver.execute(HtmlViewResolver.java:250)
at com.bstek.dorado.web.resolver.AbstractTextualResolver.doHandleRequest(AbstractTextualResolver.java:128)
at com.bstek.dorado.web.resolver.WebContextSupportedController.handleRequestInternal(WebContextSupportedController.java:68)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.hupun.crm.global.SystemFilter.doFilter(SystemFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.NullPointerException
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:534)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:442)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
at com.bstek.dorado.view.resolver.HtmlViewResolver.execute(HtmlViewResolver.java:250)
at com.bstek.dorado.web.resolver.AbstractTextualResolver.doHandleRequest(AbstractTextualResolver.java:128)
at com.bstek.dorado.web.resolver.WebContextSupportedController.handleRequestInternal(WebContextSupportedController.java:68)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.hupun.crm.global.SystemFilter.doFilter(SystemFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.NullPointerException
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:907)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:840)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:138)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
... 39 more
Caused by: java.lang.NullPointerException
at com.bstek.dorado.data.variant.DefaultVariantConvertor$DataTypeReference.convertFromObject(DefaultVariantConvertor.java:75)
at com.bstek.dorado.data.variant.DefaultVariantConvertor.toInt(DefaultVariantConvertor.java:124)
at com.bstek.dorado.data.variant.VariantUtils.toInt(VariantUtils.java:77)
at com.bstek.dorado.view.resolver.PageHeaderOutputter.output(PageHeaderOutputter.java:95)
at com.bstek.dorado.view.resolver.PageOutputUtils.outputHeader(PageOutputUtils.java:64)
at com.bstek.dorado.view.taglib.PageHeaderTag.doEndTag(PageHeaderTag.java:40)
at org.apache.jsp.login_jsp._jspx_meth_d_005fPageHeader_005f0(login_jsp.java:154)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:72)
... 42 more