
踩坑记录
也许我太傻
一步一印,才能看到自己想要的风景。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
实现table框内的数字和字母自动换行
在实际操作中,如果表格中显示的内容不是中文时,而是纯数字或英文时,默认是不换行的,而汉字是换自动换行的。我们可以对表格添加一个属性:就可以实现英数字也可以自动换行转载 2017-08-29 17:59:47 · 1579 阅读 · 0 评论 -
Every derived table must have its own alias
错误详细堆栈信息:Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Every derived table must have its own alias at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Meth原创 2018-01-26 19:33:19 · 356 阅读 · 0 评论 -
Duplicate entry for key 'PRIMARY'
错误场景: 更新同事代码之后启动报错,代码中的bug 具体的堆栈信息:com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '1' for key 'PRIMARY'at sun.reflect.NativeConstructorAccesso...原创 2018-03-19 15:10:55 · 96565 阅读 · 3 评论 -
Unsupported major.minor version
详细堆栈信息: Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassL...原创 2018-03-06 17:54:23 · 283 阅读 · 0 评论 -
java.lang.IllegalStateException:No typehandler found for property
错误场景: 搭建ssm项目启动报错详细的堆栈信息:No typehandler found for property lvlReward at org.apache.ibatis.mapping.ResultMapping$Builder.validate(ResultMapping.java:151) at org.apache.ibatis.mapping.Res...原创 2018-03-14 11:34:23 · 26728 阅读 · 2 评论 -
java.lang.IllegalArgumentException: Comparison method violates its general contract!
背景 16号为了统一线上服务器运行环境,将两台服务器的Tomcat6+JDK6升级到Tomcat7+JDK7,本以为很简单的事情,升级后自己验证也没问题,没想到却悲剧了。升级后,过了半小时运营就找过来反馈问题,部分角色无法登陆系统,由于异常日志没有输出,没有找到问题,无奈回滚。今天我们就来说说JDK6升级到JDK7会遇到的坑。本文为了方便搜索,就直接以异常信息作为文章标题了。复现 回滚后,...转载 2018-04-09 11:04:39 · 916 阅读 · 0 评论 -
1215 - Cannot add foreign key constraint
问题场景:MySQL两张表想要进行外键关联,sql语句正确,但出现上述错误原因分析: 创建外键错误的原因大概有一下几个原因: 1、关联的两个字段的字段的类型不一致 2、设置外键删除时set null 3、两张表的引擎不一致解决方式: 1、保证关联的两个字段的字段类型一致,当然字段约束不同时也不能创建成功,但报的不是这个错误 2、默认即可 3、查看两张表的引擎是否相同,有两种方式...原创 2018-04-03 15:01:19 · 21416 阅读 · 6 评论 -
java.sql.SQLException: Generated keys not requested.
问题场景:使用jdbc访问mysql想要实现主键的返回,出现错误具体堆栈信息:java.sql.SQLException: Generated keys not requested. You need to specify Statement.RETURN_GENERATED_KEYS to Statement.executeUpdate(), Statement.executeLa...原创 2018-04-19 11:15:37 · 1991 阅读 · 0 评论 -
java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>(Unknown Source)
问题场景 学习lucene搭建spring出现,环境 spring3.2,jdk1.8,tomcat8。具体堆栈信息java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>(Unknown Source) at org.springframework.as...原创 2018-06-26 11:04:53 · 1246 阅读 · 0 评论 -
解决Spring Boot 使用Maven打包之后运行jar找不到主属性清单的问题
环境:使用springboot搭建环境使用官方配置打包 错误信息:没有主清单属性错误原因: 采用的是官方配置,但是去除了parent标签改为自己引入,打包的插件没有做相应的修改&amp;lt;plugin&amp;gt; &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt; &转载 2018-07-31 19:30:17 · 1381 阅读 · 0 评论 -
No qualifying bean of type RedisTemplate available
错误场景 springboot项目使用redisTemplate进行自动注入的时候失败具体的堆栈信息2018-08-23 16:49:10.490 [ main ] [ERROR] - o.springframework.test.context.TestContextManager:250 - Caught exception while allowing TestExecuti...原创 2018-08-23 16:52:58 · 5715 阅读 · 0 评论 -
eclipse保存个人配置
点击 Eclipse 菜单栏 File -> Export… -> General -> Preferences,弹出 Export Preferences 窗口,勾选需要导出的配置项,选择文件保存位置 后续需要使用保存的首选项配置只需点击 Eclipse 菜单栏 File -> Import… -> General -> Preferences,选择相关的配置文件导入即可原创 2018-01-25 10:11:33 · 2475 阅读 · 0 评论 -
Address already in use: JVM_Bind <null>
完整堆栈信息:at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:407) at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:623) at org.apache.coyote.AbstractProtoc原创 2018-01-24 17:55:19 · 417 阅读 · 0 评论 -
java.lang.UnsatisfiedLinkError: no resin_os in java.library.path
运行新项目时候服务器出现问题,具体出现的错误如下:[17-09-12 09:37:29.190] {resin-35} WebApp[production/webapp/default/ROOT] active[17-09-12 09:37:29.417] {resin-36} WebApp[production/webapp/default/resin-doc] active[17-09-12原创 2017-09-12 10:00:20 · 7992 阅读 · 0 评论 -
java.Net.UnknownHostException异常处理方法
同事新分的测试机resin启动的时候出现了Java.NET.UnknownHostException异常,问题原因是在系统的 /etc/Hostname中配置了主机名,而在/etc/hosts文件中没有相应的配置。简单的解决办法是对应关系配好就可以,甚至除/etc/Hostname这个文件也可以。 深层的原因: 在大多数Linux操作系统中,都是以/etc/hosts中的配置查找主机名...转载 2017-08-09 11:39:59 · 87488 阅读 · 0 评论 -
jsp页面获取服务器时间
今天在处理页面日历控件的时候发现了一个小小的问题,在jsp页面中我们可以用new Date()的形式获取当前的日期,但是用这种形式获取的日期取的是页面所运行的机器的系统时间(简单来说,网页在a电脑上运行,new Date()的日期与a电脑的系统时间匹配,网页在b电脑上运行,new Date()获取的时间与b电脑的系统时间是匹配的),这样的方式获取时间的话会出现一定的问题:假如,用户的电脑时间与服务原创 2017-08-11 17:16:39 · 3858 阅读 · 0 评论 -
解决dubbo问题:forbid consumer
线下环境经常出现类似这种异常:com.alibaba.dubbo.rpc.RpcException: Forbid consumer 10.0.53.69 access service com.kuaidadi.op.api.pay.service.PayChannelConfigRemoteService from registry 10.0.50.150:2181 use dubbo versi转载 2017-08-22 14:46:17 · 5050 阅读 · 2 评论 -
PrintWriter与ServletOutputStream的区别
1. PrintWriter是以字符为单位,对所有的信息进行处理,而ServletOutputStream仅对二进制的资料进行处理。 2. PrintWriter在输出字符文本时内部需要将字符串转换成某种字符集编码的字节数组,使用他的好处就是不需要自己来完成从字符串到字节数组的转换。 转换的字符集编码是通过设置setContentTpye或setCharacterEncoding或setLoc原创 2017-10-10 15:37:19 · 347 阅读 · 0 评论 -
Unexpected internal error near index 1 \ ^错误
文件解析是遇到的一个浏览器的问题,有些浏览器上传文件时文件名只是单纯的文件名,而有些浏览器上传的是文件的全路径名,兼容处理时出现了下面的错误。@Test public void test08(){ String upFileName = "F:\\文档\\我的导图\\Zookeeper.mmap"; String[] split = upFileName.sp原创 2017-11-08 10:30:55 · 9714 阅读 · 2 评论 -
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3:
在学python,使用open(‘C:\Users\Administrator\Desktop\新建文本文档.txt’) 打开文件的时候出现了下面的结果。 结果在试了上面这个文件的时候发现总是报错: SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \u原创 2017-11-20 16:11:39 · 402 阅读 · 0 评论 -
AttributeError: module 'json' has no attribute 'dump'
最近学习python遇到的错误:import jsonnumbers = [2,3,4,5,7,10]filename = 'number.json'with open(filename,'w') as file: json.dump(numbers,file)运行时出现了:AttributeError: module ‘json’ has no attribute ‘dump’ 意为,原创 2017-11-21 11:31:29 · 11433 阅读 · 19 评论 -
java.net.ConnectException: Connection refused: no further information
场景:本地启动maven项目,工程使用spring版本3.1.3,zookeeper版本3.4.6,dubbo的jar包版本2.5.4,jetty版本6.1.26,容器resin-4.0.48,启动时出现错误 具体错误信息:ClientCnxn|Session 0x0 for server null, unexpected error, closing socket connection and原创 2017-12-04 18:01:25 · 5663 阅读 · 0 评论 -
maven工程无依赖jar包的问题
问题场景:公司项目svn导出到本地之后,本身是maven工程,有pom文件,但是没有maven依赖的jar包,开发工具myeclipse 2016 具体情境如图: 错误原因:maven插件不兼容<?xml version="1.0" encoding="UTF-8"?><classpath> <classpathentry kind="src" path="src/main/jav原创 2017-12-05 10:15:40 · 689 阅读 · 0 评论 -
错误:Maven创建An internal error occurred during
场景使用myeclipse创建maven项目出现错误具体错误信息:错误原因:myeclipse的gc的内存占用超过限制,或者换句话说就是内存不足。解决方案:修改eclipse.ini或者myeclipse.ini文件中的一下配置:-Xms512m-Xmx1024m亲着是最小的初始化内存,第二个是最大的战友内存...原创 2018-09-21 15:50:58 · 1435 阅读 · 0 评论