编译后点击注册,报错
发表在JavaWeb图书答疑 2018-12-19 《JavaWeb项目开发实战入门》第6章 铭成在线考试系统
是否精华
版块置顶:


HTTP Status 404 – Not Found


Type Status Report

Message /mrks/login/register.do

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.


Apache Tomcat/8.5.35

我直接复制光盘里的源代码,修改过数据库密码后,运行程序,然后点击注册,出现如上所示,该怎么处理故障。2.我输入数据库里初始的用户名密码后,出现用户名密码错误提示,怎么处理。

2018-12-19 15:35:13编辑
分享到:
精彩评论 22
happyboy_1544184024
学分:18 LV2
2018-12-21
11L

happyboy_1544184024 发表于2018-12-21 14:38

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

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

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

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:650)

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:800)

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

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

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

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

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

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

at java.base/java.lang.Thread.run(Thread.java:834)

1

null

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '???' in 'field list'

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)

at com.mysql.jdbc.Util.getInstance(Util.java:384)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)

at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2212)

at com.mrkj.ygl.service.SystemService.selectUserInfoBy用户名(SystemService.java:30)

at com.mrkj.ygl.servlet3.system.SystemLogin.doPost(SystemLogin.java:78)

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

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


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:52)

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

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

at com.mrkj.ygl.filter.URLEncodeFilter.doFilter(URLEncodeFilter.java:25)

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:198)

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

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

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:650)

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:800)

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

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

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

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

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

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

at java.base/java.lang.Thread.run(Thread.java:834)

1

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '???' in 'field list'

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)

at com.mysql.jdbc.Util.getInstance(Util.java:384)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)

at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2212)

at com.mrkj.ygl.service.SystemService.selectUserInfoBy用户名(SystemService.java:30)

at com.mrkj.ygl.servlet3.system.SystemLogin.doPost(SystemLogin.java:78)

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

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

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:52)

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

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

at com.mrkj.ygl.filter.URLEncodeFilter.doFilter(URLEncodeFilter.java:25)

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:198)

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

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

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:650)

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:800)

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

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

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

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

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

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

at java.base/java.lang.Thread.run(Thread.java:834)

1


无语_mrkj
学分:3155 LV11
2018-12-21
12L

应该是数据库的问题,您的MySQL是什么版本的?是从MySQL的官网中下载的吗?

您有没有设置数据库的编码为UTF-8呢?或者在安装MySQL时指定的数据库默认编码是什么呢?

happyboy_1544184024
学分:18 LV2
2018-12-21
13L

无语_mrkj 发表于2018-12-21 15:24

应该是数据库的问题,您的MySQL是什么版本的?是从MySQL的官网中下载的吗?

您有没有设置数据库的编码为UTF-8呢?或者在安装MySQL时指定的数据库默认编码是什么呢?

MySQL是从官网下载的。

happyboy_1544184024
学分:18 LV2
2018-12-21
14L

happyboy_1544184024 发表于2018-12-21 18:54

MySQL是从官网下载的。

我应该如何解决问题呢

无语_mrkj
学分:3155 LV11
2018-12-24
15L

从您输出的截图看数据库的编码也是程序中使用的UTF-8编码。那您的项目是什么编码呢?您按以下步骤查看一下:

在Eclipse中,项目名称节点上单击鼠标右键,在弹出的快捷菜单中选择Properties菜单项。

然后在弹出的对话框中,选择Resource节点,在右侧看一下Text file encoding区域内,看一下使用的编码是否为UTF-8,如果不是,选中Other前面的单选按钮,再在右侧的下拉列表中选择UTF-8,再单击Apply and Close按钮试试。

happyboy_1544184024
学分:18 LV2
2018-12-24
16L

无语_mrkj 发表于2018-12-24 09:49

从您输出的截图看数据库的编码也是程序中使用的UTF-8编码。那您的项目是什么编码呢?您按以下步骤查看一下:

在Eclipse中,项目名称节点上单击鼠标右键,在弹出的快捷菜单中选择Properties菜单项。

然后在弹出的对话框中,选择Resource节点,在右侧看一下Text file encoding区域内,看一下使用的编码是否为UTF-8,如果不是,选中Other前面的单选按钮,再在右侧的下拉列表中选择UTF-8,再单击Apply and Close按钮试试。

wenti.png


happyboy_1544184024
学分:18 LV2
2018-12-24
17L

happyboy_1544184024 发表于2018-12-24 11:08

wenti.png


这里没问题,老师啥时候帮我远程一下吧,这样效率高,要不反反复复一直无法解决我的问题。

无语_mrkj
学分:3155 LV11
2018-12-25
18L

您再试试在数据库连接文件中,url变量的后面加上?useUnicode=true&characterEncoding=utf-8试试。

也就是在mrks和右侧的双引号中间添加。

如果还是不行,就只能换成英文字段的

了。具体内容请下载附件。

mrks.rar

happyboy_1544184024
学分:18 LV2
2018-12-25
19L

无语_mrkj 发表于2018-12-25 17:29

您再试试在数据库连接文件中,url变量的后面加上?useUnicode=true&characterEncoding=utf-8试试。

也就是在mrks和右侧的双引号中间添加。

如果还是不行,就只能换成英文字段的

了。具体内容请下载附件。

mrks.rar

谢谢老师,你发的可以正常注册。

happyboy_1544184024
学分:18 LV2
2018-12-25
20L

happyboy_1544184024 发表于2018-12-25 17:55

谢谢老师,你发的可以正常注册。

页面查号.png

老师好,这里出现一个错号怎么办?我的Tomcat ,,JDK已经都调整过了

首页上一页 123 下一页尾页 22 条记录 2/3页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照