You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/07/25 03:19:22 UTC

[GitHub] [incubator-shardingsphere] wanglichao1 opened a new issue #2757: java.lang.ClassCastException: [B cannot be cast to java.lang.Boolean

wanglichao1 opened a new issue #2757: java.lang.ClassCastException: [B cannot be cast to java.lang.Boolean
URL: https://github.com/apache/incubator-shardingsphere/issues/2757
 
 
   I use the version 4.0.0-RC2. When select result convert bit to boolean throw exception:
   `Caused by: java.lang.ClassCastException: [B cannot be cast to java.lang.Boolean
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.resultset.ShardingResultSet.getBoolean(ShardingResultSet.java:71) ~[sharding-jdbc-core-4.0.0-RC2.jar!/:4.0.0-RC2]
   	at org.hibernate.type.descriptor.sql.BooleanTypeDescriptor$2.doExtract(BooleanTypeDescriptor.java:59) ~[hibernate-core-5.3.10.Final.jar!/:5.3.10.Final]
   	at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47) ~[hibernate-core-5.3.10.Final.jar!/:5.3.10.Final]
   	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257) ~[hibernate-core-5.3.10.Final.jar!/:5.3.10.Final]
   	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) ~[hibernate-core-5.3.10.Final.jar!/:5.3.10.Final]
   	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:243) ~[hibernate-core-5.3.10.Final.jar!/:5.3.10.Final]
   	at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:329) ~[hibernate-core-5.3.10.Final.jar!/:5.3.10.Final]
   	at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:3012) ~[hibernate-core-5.3.10.Final.jar!/:5.3.10.Final]
   `
   my tableļ¼š
   CREATE TABLE `topic` (
     `id` bigint(20) NOT NULL AUTO_INCREMENT,
     `create_date` datetime NOT NULL,
     `modify_date` datetime DEFAULT NULL,
     `order_list` bigint(20) DEFAULT NULL,
     `clazz_id` bigint(20) NOT NULL,
     `collect_count` int(11) DEFAULT NULL,
     `comment_count` int(11) DEFAULT NULL,
     `content` varchar(500) NOT NULL,
     `istop` bit(1) DEFAULT NULL,
     `like_count` int(11) DEFAULT NULL,
     `organization_id` bigint(20) NOT NULL,
     `picture_batch_id` bigint(20) DEFAULT NULL,
     `user_id` bigint(20) NOT NULL,
     `weight` bigint(20) DEFAULT NULL,
     `ext_object_id` bigint(20) DEFAULT NULL,
     `ext_type` varchar(255) DEFAULT NULL,
     `video_batch_id` bigint(20) DEFAULT NULL,
     PRIMARY KEY (`id`) USING BTREE,
     KEY `idx_clazzid_orderlist` (`clazz_id`,`order_list`) USING BTREE,
     KEY `idx_userid` (`user_id`) USING BTREE
   ) ENGINE=InnoDB AUTO_INCREMENT=2811 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
   
   The column "istop" is Boolean in my entity,The table is auto created by hibernate5.3.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services