英文:
Error when signing up to my web application java
问题
我有一个Java Web应用程序,允许用户搜索内容,当我尝试注册新用户时,会收到以下消息!
HTTP状态500 - 内部服务器错误
类型异常报告
描述 服务器遇到意外情况,阻止其完成请求。
异常
java.lang.NullPointerException
DBConnector.queries.selectUserNamePass(queries.java:30)
Users.signupS.processRequest(signupS.java:42)
Users.signupS.doPost(signupS.java:109)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
有人知道如何解决吗?
英文:
I have a java web application that allows users to search contents, when i try to sign-up a new user i get the following message!
HTTP Status 500 – Internal Server Error
Type Exception Report
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
java.lang.NullPointerException
DBConnector.queries.selectUserNamePass(queries.java:30)
Users.signupS.processRequest(signupS.java:42)
Users.signupS.doPost(signupS.java:109)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
any one has an idea how to solve it?
答案1
得分: 1
以下是翻译好的内容:
你有:
java.lang.NullPointerException
DBConnector.queries.selectUserNamePass(queries.java:30)
因此打开这个类。在第30行或之前的位置设置一个断点。然后以调试模式运行你的应用程序,逐步执行(按F8键)。你将会找到引发空指针异常的原因。
英文:
You have:
java.lang.NullPointerException
DBConnector.queries.selectUserNamePass(queries.java:30)
So open this class. Put a breakpoint on line 30, or before it. Then run your application in debug mode, step by step (F8 key). And you will find what cause NullPointerException.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论