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

正在回答

1 回答

我的可以实现但是提示logger这个对象空指针    这个Logger对象如何实例化

2017-06-19 10:50:13,034[http-bio-8080-exec-3]DEBUG [Message.selectbycommand]-==>  Preparing: SELECT ID,COMMAND,DESCRIPTION,CONTENT FROM message where 1=1 
2017-06-19 10:50:13,036[http-bio-8080-exec-3]DEBUG [Message.selectbycommand]-==> Parameters: 
2017-06-19 10:50:13,043[http-bio-8080-exec-3]DEBUG [Message.selectbycommand]-<==      Total: 6
六月 19, 2017 10:50:13 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [ListServlet] in context with path [/Mybatis] threw exception
java.lang.NullPointerException
	at Com.DAO.Service.selectbycommand(Service.java:40)
	at Com.Servlet.ListServlet.doGet(ListServlet.java:34)
	at Com.Servlet.ListServlet.doPost(ListServlet.java:49)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)


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

举报

0/150
提交
取消

老师这个在类里面是如何写的 logger

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