
Exception
hanchao5272
路漫漫其修远兮,吾将上下而求索。https://hanchao.blog.youkuaiyun.com/
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
1.报错信息java.lang.IllegalArgumentException: Malformed \uxxxx encoding. at java.util.Properties.loadConvert(Unknown Source) at java.util.Properties.load0(Unknown Source) at java.util.Prop原创 2018-01-13 14:42:37 · 6593 阅读 · 0 评论 -
Spring MVC Content type 'application/x-www-form-urlencoded' not supported
这是很久之前遇到的一个问题,大概是前台传递JSON,后台无法正常接收。这里记录一下解决方法:通过consumes 指定处理请求的提交内容类型(Content-Type)。@PostMapping(value = "/book/set/",consumes = "application/json")原创 2018-02-07 11:06:33 · 43625 阅读 · 2 评论 -
RetentionPolicy/ ElementType cannot be resolved to a variable
这是很久之前遇到的一个问题。当时是在自定义注解,在定义@Target(value=ElementType.FIELD)和@Retention (value=RetentionPolicy.RUNTIME)类时报错。解决办法(手动导入类路径):import java.lang.annotation.RetentionPolicy;import java.lang.annotatio原创 2018-02-07 11:13:26 · 3999 阅读 · 4 评论 -
IllegalStateException: Errors/BindingResult argument declared without preceding model attribute. Che
这是在很久之前遇到的一个错误。错误分析Spring规定:Errors接口或者BindingResult对象应该刚好紧跟在@ModelAttribute声明的对象后面,这样程序才能正确的完成绑定。解决方法如上所述,将BindingResult对象放在@ModelAttribute声明的对象后面。@PostMapping(value = "/book/")public Strin原创 2018-02-07 11:25:02 · 2009 阅读 · 0 评论 -
No appenders could be found for logger.Please initialize the log4j system properly.
1.错误信息log4j:WARN No appenders could be found for logger.log4j:WARN Please initialize the log4j system properly.2.错误分析从警告信息分析:log4j没有日志记录载体log4j没有进行初始化原因:log4j的配置不正确3.错误解决二选一:在...原创 2018-02-27 10:48:08 · 1402 阅读 · 0 评论 -
日期转换:Cannot format given Object as a Date (SimpleDateFormat的parse和format)
1.错误信息Exception in thread "main" java.lang.IllegalArgumentException: Cannot format given Object as a Date at java.text.DateFormat.format(Unknown Source) at java.text.Format.format(Unknown ...原创 2018-02-27 17:12:57 · 26303 阅读 · 0 评论 -
文件上传:java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory
1.错误信息二月 08, 2018 5:25:39 下午 org.apache.catalina.core.StandardContext loadOnStartup严重: Servlet threw load() exceptionjava.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFact...原创 2018-02-08 17:32:52 · 2580 阅读 · 0 评论 -
Java反射操作私有成员变量 Class can not access a member with modifiers "private"
1.错误信息相关代码:User user1 = new User("王五", 111111);LOGGER.info("user1.password = " + pwdFiled.getInt(user1));pwdFiled.setInt(user1, 321);LOGGER.info("user1.password = " + pwdFiled.getInt(user1));...原创 2018-03-04 11:12:50 · 29754 阅读 · 2 评论 -
SVN工具03:SVN服务端安装2503、2502问题
超级连接:SVN配置与使用说明-序章在安装SVN服务端msi的时候,会遇到2503、2502问题。此类问题是由于用户的权限不足造成的,有以下几种解决方式:方式一:管理员运行(临时解决方案)右键点击安装包–>管理员身份运行。方式二:修改配置(永久解决方案)第一步: Win+R 打开运行窗口,输入gpedit.msc 进入本机计算机 策略。第二步: 点击 ...原创 2018-03-19 13:52:21 · 1851 阅读 · 0 评论 -
Ubuntu做Tomcat服务:insserv: warning: script 'tomcat' missing LSB tags and overrides
在Ubuntu上对tomcat做服务时,遇到报错信息。当时我的/etc/init.d/tomcat追加的配置如下:#!/bin/sh#chkconfig:2345 10 90#description:Tomcat ServiceCATALINA_HOME=/usr/local/apache-tomcat-7.0.82JAVA_HOME=/usr/local/jdk1.8.0_1...原创 2018-04-04 16:42:12 · 3962 阅读 · 4 评论 -
Host '****' is not allowed to connect to this MySQL server
错误信息今天在VMWare上的Ubuntu上配置Solr服务时报错:Caused by: java.sql.SQLException: null, message from server: "Host 'DESKTOP-FG4HTMB' is not allowed to connect to this MySQL server" at com.mysql.jdbc.SQLErr...原创 2018-04-17 18:14:07 · 1191 阅读 · 0 评论 -
记一次AES解密出错:Cannot find any provider supporting DES/ECB/PKCS5Padding
错误信息今天同事说解密服务出错了,并给我发了日志,日志如下:java.security.NoSuchAlgorithmException: Cannot find any provider supporting DES/ECB/PKCS5Padding at javax.crypto.Cipher.getInstance(DashoA6275) ...错误解决...原创 2018-04-13 14:25:56 · 9773 阅读 · 3 评论 -
java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
这是很久之前遇到的一个问题,这里记录一下解决方法:dependency> groupId>commons-iogroupId> artifactId>commons-ioartifactId> version>${commons-io.version}version>dependency>原创 2018-02-07 11:02:18 · 4484 阅读 · 0 评论 -
org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
今天构建SSM项目时,将JDK由1.8降低至1.6,然后报错org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0。1.错误信息错误详细信息如下"C:\Program Files\Java\jdk1.6.0_45\bin\java" -Dmaven.multiModuleProjectDirect...原创 2018-02-26 17:10:14 · 1770 阅读 · 0 评论 -
Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource] for ... 'dataSource'
1.错误信息Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource] for bean with name 'dataSource'2.错误分析缺少spring-jdbc相关Jar包。3.问题解决dependency> groupId>org.springframe原创 2018-02-06 14:30:33 · 9680 阅读 · 0 评论 -
MySql:Establishing SSL connection without server's identity verification is not recommended
1.全部警告信息Wed Jan 10 21:13:40 CST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL conn原创 2018-01-10 21:19:39 · 6531 阅读 · 6 评论 -
Redis:WRONGTYPE Operation against a key holding the wrong kind of value
相关连接:通过Canal保证某网站的Redis与MySql的数据自动同步1.错误信息redis.clients.jedis.exceptions.JedisDataException: WRONGTYPE Operation against a key holding the wrong kind of value2.分析当前程序中key的操作类型,并不与redis库...原创 2018-01-13 14:46:17 · 99186 阅读 · 7 评论 -
Mysql:开启了log-bin的MySQL Server中创建FUNCTION
1.错误信息在开启了bin-log模式的Mysql服务中,创建Function失败。Error Code: 1418. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want原创 2018-01-13 14:48:58 · 1033 阅读 · 0 评论 -
HTTP Status 415 Unsupported Media Type [Spring MVC @RequestBody传递Json数据 ]
1.错误信息415 Unsupported Media TypeThe server refused this request because the request entity is in a format not supported by the requested resource for the requested method.2.解决2.1.mvc:an原创 2018-01-14 17:45:31 · 3711 阅读 · 0 评论 -
PL/SQL Developer:ORA-12154 TNS: Could not resolve the connect identifier specified
1.问题描述PL/SQL登录时报错ORA-12154 TNS: Could not resolve the connect identifier specifiedps:D:\oracle\product\10.2.0\client_2\NETWORK\ADMIN\tnsnames.ora已经存在。2.分析PL/SQL Developer通过TNS_ADMIN找不到tn原创 2018-01-17 14:26:30 · 1180 阅读 · 0 评论 -
javax.validation : HV000030: No validator could be found for type: java.lang.Integer
1.错误信息严重: Servlet.service() for servlet [spring-mvc] in context with path [] threw exception [Request processing failed; nested exception is javax.validation.UnexpectedTypeException: HV000030: No va原创 2018-01-17 22:28:47 · 2613 阅读 · 0 评论 -
Spring MVC传参:Cannot construct instance of xxxxx(no Creators, like default construct, exist)
1.错误信息严重: Servlet.service() for servlet [spring-mvc] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.http.converter.HttpMessageConversio原创 2018-01-21 10:43:24 · 36166 阅读 · 15 评论 -
文件下载:java.lang.IllegalStateException: getOutputStream() has already been called for this response
1.报错信息一月 24, 2018 10:23:47 下午 org.apache.catalina.core.ApplicationDispatcher invoke严重: Servlet.service() for servlet jsp threw exceptionjava.lang.IllegalStateException: getOutputStream() has alr原创 2018-01-24 22:33:32 · 2339 阅读 · 0 评论 -
org.xml.sax.SAXParseException; 引用了实体 "nbsp", 但未声明它。
1.错误信息org.xml.sax.SAXParseException; 引用了实体 "nbsp", 但未声明它。2.错误分析同事最近在开发一个功能:通过JDOM解析第三方服务发送过来的xml文件流。 主要代码模拟如下://模拟xml流//String xml = "zhangsanlisi";String xml = "zhangsan lisi";原创 2018-02-05 15:36:17 · 12907 阅读 · 3 评论 -
MyBatis Generator报错:Cannot instantiate object of type
1.错误信息[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project myssm: Execution default-cli of goal org.mybatis.generator:mybatis...原创 2018-02-10 10:43:03 · 28652 阅读 · 1 评论 -
MyBatis Generator在pom.xml中配置的configuration无效(configurationFile、overwrite等)
MyBatis Generator:MyBatis代码自动生成插件,下文简称MBG。 关于MBG的用法,可以参考: MyBatis代码实例系列-08:通过Maven运行 MyBatis Generator,以及MyBatis Generator的扩展用法—生成中文注释和Mapper重命名为Dao1.错误信息在pom.xml中,在配置MBG插件时,可以通过configuration标...原创 2018-02-10 11:03:03 · 8933 阅读 · 0 评论 -
Spring 注解:element 'annotation-config' and its parser class are only available on JDK 1.5 and higher
1.分析spring2.5.6能够检测JDK版本为1.5/1.6/1.7,项目如果使用jdk1.8,则jdk版本无法被检测出来。2.解决2.1. 降低JDK版本jdk1.8 –>jdk 1.72.2.移除spring-x.y.z.jar包spring-core-x.y.z.jar和spring-x.y.z.jar中都有自动检测jdk的类。 spring-x.y原创 2018-01-07 16:51:20 · 1034 阅读 · 0 评论