为了账号安全,请及时绑定邮箱和手机立即绑定

查询页面空白,后台java.lang.NullPointerException

https://img1.sycdn.imooc.com//5adbf504000121a413660768.jpg


信息: Server startup in 10397 ms

java.lang.NullPointerException

at com.imooc.page.model.Student.<init>(Student.java:35)

at com.imooc.page.dao.SubListStudentDaoimpl.getAllStudent(SubListStudentDaoimpl.java:55)

at com.imooc.page.dao.SubListStudentDaoimpl.findStudent(SubListStudentDaoimpl.java:18)

at com.imooc.page.service.SublistStudentServiceImpl.findStudent(SublistStudentServiceImpl.java:19)

at com.imooc.page.servlet.SublistServlet.doPost(SublistServlet.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:501)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Unknown Source)

 

代码应该和老师的是一模一样,tomcat是apache-tomcat-9.0.2


正在回答

1 回答

代码贴出来,可能是哪里大小写之类的弄错了

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

查询页面空白,后台java.lang.NullPointerException

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信