Caused by: java.sql.SQLException: Column 'show_type' not found

今天在处理个问题的时候遇到了这么个bug,难住了老半天.网上找了挺多资料.这是因为hibernate在别名上的不支持.处理方案是在jdbc数据库连接上计入了这么个配置.

绿色的相当于是个连接符.

url="jdbc:mysql://localhost:3306/game_center?useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true"

参考的博文是:http://blog.csdn.net/tang745163962/article/details/41726443

Caused by: java.sql.SQLException: Column 'show_type' not found

时间: 2024-11-05 17:25:44

Caused by: java.sql.SQLException: Column 'show_type' not found的相关文章

hibernate 出现Caused by: java.sql.SQLException: Column 'id' not found.异常

用hibernate进行映射查询时,出现Caused by: java.sql.SQLException: Column 'id' not found 异常,检查数据库表及映射都有id且已经正确映射,google后发现原因为: Your query doesn't return a field named id即查询sql中没有查询出主键id列,但返回结果集中用到,故出现异常特此记录. 详细解答见下: http://stackoverflow.com/questions/34164411/cau

Caused by: java.sql.SQLException: Operand should contain 1 column(s)

1.错误描述 [ERROR:]2015-05-05 15:48:55,847 [异常拦截] org.hibernate.exception.DataException: error executing work at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:135) at org.hibernate.exception.internal.

mysql 保存emoji时报,数据库报错:Caused by: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x82\xF0\x9F...' for column 'review' at row 1

错误原因:我们可以看到错误提示中的字符0xF0 0x9F 0x98 0x84 ,这对应UTF-8编码格式中的4字节编码(UTF-8编码规范).正常的汉字一般不会超过3个字节,为什么为出现4个字节呢?实际上是它对应的是智能手机输入法中的表情.那为什么会报错呢?因为mysql中的utf-8并不是真正意义上的utf-8,它只能存储1~3个字节长度的utf-8编码,如果想存储4个字节的必须用utf8mb4类型.不而要使用utf8mb4类型,首先要保证Mysql版本要不低于 MySQL 5.5.3. 常用

Caused by: java.sql.SQLException: Incorrect integer value: '' for column 'clientId' at row 41

1.错误描述 [ERROR:]2015-06-10 13:48:26,253 [异常拦截] oa.exception.ExceptionHandler org.hibernate.exception.GenericJDBCException: error executing work at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.jav

ibatis 更改resultmap后 java.sql.SQLException: Column 'del_status' not found.

当在resultmap中增加字段后,查询语句也必须增加相应字段,否则会报错, java.sql.SQLException: Column 'del_status' not found. 因为查询结果与resultmap对应不上,ibatis在查询获得结果集中找不到resultmap的对应字段, 我是在resultmap中增加字段,但select语句中并没有增加,折腾了半天 如果属性类型为基本类型而非包装类型,并且数据库中数据为null,那么就会报错 Caused by: java.lang.Ru

Hibernate中Caused by: java.sql.SQLException: Field 'address_id'doesn't have a default value

在学习Hibernate中,相信很多人都遇到过: Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute statement Caused by: java.sql.SQLException: Field 'address_id' doesn't have a default value 很是纳闷,明明我的address_id是主键,为毛还提示我不存在默认值?主

Caused by: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0

1.错误描述 org.hibernate.exception.GenericJDBCException: error executing work at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(Sql

解决sqoop导入报错:Caused by: java.sql.SQLException: Protocol violation

报错信息: 2017-06-15 15:02:15,374 INFO [main] org.apache.hadoop.mapred.MapTask: Ignoring exception during close for [email protected]0 java.io.IOException: java.sql.SQLException: Protocol violation at org.apache.sqoop.mapreduce.db.DBRecordReader.close(DB

java.sql.SQLException:Column count doesn't match value count at row 1

1.错误描述 java.sql.SQLException:Column count doesn't match value count at row 1 2.错误原因     在插入数据时,插入的字段个数跟数据库表字段个数不一致 insert into student(sno,sname,sage,ssex) values(1,'张三丰','man'); 3.解决办法     保证插入数据字段个数跟数据库表中的字段个数一致 insert into student(sno,sname,sage,s