在注册我的网络应用程序时出现错误,Java。

huangapple go评论64阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年10月1日 20:09:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/64155103.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定