Java报错
kyrie_rlving
你不喜欢走路是因为没有一双挚爱的鞋
展开
-
404报错:The origin server did not find a current representation for the target resource解决的两种办法
The origin server did not find a current representation for the target resource or is not willing to disclose that one exists 我的环境是eclipse+tomcat,在运行这个Javaweb项目之前我还运行了另一个web项目并且没有出现这个报错,然后关闭了另一个项...原创 2020-01-12 12:45:24 · 26880 阅读 · 1 评论 -
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected an int but was STRING
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected an int but was STRING at line 1 column 144。报错原因是因为:输入的数据类型要求是int,但是你输入的String,然后gson解析时发生错误。...原创 2018-11-18 16:36:29 · 1797 阅读 · 0 评论 -
eclipse+tomcat搭建服务器遇到的坑:运行整个项目不能连接数据库,单独的测试类却能够连接数据库
我的连接数据库类中的URL长这样的:这个类其他的代码都没有问题,因为我用测试类测试过这个连接数库类,能够成功连接。mysql-conntector版本和mysql版本也能够兼容,其他的类也都没问题,因为整个项目能够运行。但是运行项目一涉及数据库就报错。我的之前在捕获异常的时候在catch块中只是用system .out.println(“数据库连接失败!”);输出了错误,并没有报错错误的原因,...原创 2018-11-18 11:57:31 · 3098 阅读 · 1 评论 -
java.sql.SQLException: null, message from server: "Host 'macbookemacbook' is not allowed to connect
java 连接数据库的时候报这个错误:java.sql.SQLException: null, message from server: "Host 'macbookemacbook' is not allowed to connect最后才发现我的URL有问题URL=“jdbc:mysql://192.148.43.6:3306/SC“改为:URL=“jdbc:mysql://loc...原创 2019-01-11 20:33:36 · 563 阅读 · 0 评论 -
The origin server did not find a current representation for the target resource or is not willing to
404报错The origin server did not find a current representation for the target resource or is not willing to disclose that one exists我的报错原因是web.xml存放的目录不对,一定要存放在WEB-INF下面。...原创 2019-06-18 16:41:18 · 115 阅读 · 0 评论 -
The origin server did not find a current representation for the target resource or is not willing to
运行Java web项目出现报错: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.是因为我修改了DD中的配置,然后并没有刷新服务器。改正方法:重新启动服务器,然后运行网页即可...原创 2019-07-12 15:07:06 · 183 阅读 · 0 评论