jboss上跑一段hibernate程序,老出现
java.lang.NullPointerException错误!
22:43:35,203 INFO [STDOUT] 22:43:35,203 ERROR [UsertableDAO] find by property name failed
java.lang.
NullPointerException at com.yourcompany.hibernate.UsertableDAO.findByProperty(UsertableDAO.java:83)
at com.yourcompany.hibernate.UsertableDAO.findByUsername(UsertableDAO.java:93)
at com.yourcompany.struts.action.UserLoginAction.execute(UserLoginAction.java:46)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
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:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
22:43:35,203 ERROR [STDERR] java.lang.NullPointerException
22:43:35,203 ERROR [STDERR] at com.yourcompany.hibernate.UsertableDAO.findByProperty(UsertableDAO.java:83)
22:43:35,203 ERROR [STDERR] at com.yourcompany.hibernate.UsertableDAO.findByUsername(UsertableDAO.java:93)
22:43:35,203 ERROR [STDERR] at com.yourcompany.struts.action.UserLoginAction.execute(UserLoginAction.java:46)
22:43:35,203 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
22:43:35,234 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
22:43:35,234 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
22:43:35,234 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
22:43:35,250 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
22:43:35,250 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
22:43:35,250 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDo