mycat吧 关注:903贴子:445
  • 5回复贴,共1

mycat解析hibernate的语句遇到日期格式的怎么设置

只看楼主收藏回复

mycat解析hibernate的语句遇到日期格式的怎么设置? 实体映射的字段是date类型,现在通过mycat一解析竟然报错了,


IP属地:河南1楼2019-01-08 13:02回复
    oracle数据库


    IP属地:河南2楼2019-01-08 13:03
    回复
      con:JDBCConnection [id=271,autocommit=false,pool=io.mycat.backend.jdbc.JDBCDatasource@45d7d2e1, schema=db1, dbType=ORACLE, oldSchema=db1, packetId=-94, txIsolation=0, running=false, borrowed=true, host=null, port=-1, con=oracle.jdbc.driver.T4CConnection@6f8f38f7, respHandler=SingleNodeHandler [node=dn1{insert into COC_BUSINESSLOGITEM (BUSINESS_TYPE, CLIENT_IP, EVENT_TYPE, EXCEPTION_TYPE, LOG_LEVEL_TYPE, LOG_TIME, LOG_TYPE, MENU, MESSAGE, OPERATOR_ACCOUNT, OPER_STATE, SUBSYSTEM, USER_ID, ID) values ('SYSTEMMANAGE', '192.168.0.31', 'UPDATE', 'OTHER_EXCEPTION', 'WARN', '2019-01-07 16:40:19.09', 'SYSTEMLEVEL', '登陆', 'JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [HY000]; error code [1830]; ORA-01830: ?????????????????????????????; nested exception is org.hibernate.exception.GenericJDBCException: ORA-01830: ?????????????????????????????', 'dfsoft', 0, 'COC', '4028803b383cb29301383cb8b6dd0001', '4028809f68276d130168277841920001')}, packetId=1], attachement=dn1{insert into COC_BUSINESSLOGITEM (BUSINESS_TYPE, CLIENT_IP, EVENT_TYPE, EXCEPTION_TYPE, LOG_LEVEL_TYPE, LOG_TIME, LOG_TYPE, MENU, MESSAGE, OPERATOR_ACCOUNT, OPER_STATE, SUBSYSTEM, USER_ID, ID) values ('SYSTEMMANAGE', '192.168.0.31', 'UPDATE', 'OTHER_EXCEPTION', 'WARN', '2019-01-07 16:40:19.09', 'SYSTEMLEVEL', '登陆', 'JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [HY000]; error code [1830]; ORA-01830: ?????????????????????????????; nested exception is org.hibernate.exception.GenericJDBCException: ORA-01830: ?????????????????????????????', 'dfsoft', 0, 'COC', '4028803b383cb29301383cb8b6dd0001', '4028809f68276d130168277841920001')}, headerOutputed=false, modifiedSQLExecuted=true, startTime=1546849890528, lastTime=1546850419093, isSpark=false, processor=io.mycat.net.NIOProcessor@73a5f2b] frontend host:127.0.0.1/60413/root (io.mycat.backend.mysql.nio.handler.SingleNodeHandler:SingleNodeHandler.java:249)


      IP属地:河南3楼2019-01-08 13:03
      回复
        该楼层疑似违规已被系统折叠 查看此楼


        IP属地:河南4楼2019-01-08 13:05
        回复
          两种可能, 一种mycat版本太低,第二mybatis 配置文件没有配对类型 #{updateDate,jdbcType=DATE}


          5楼2019-07-18 14:34
          回复
            楼主请问您两个问题,有空帮忙解答下
            1、比如原数据有100张表,其中的10张表需要单库分表,那其他的90张表都需要配置到schema.xml中,以后是不是新增表都得新增配置文件;
            2、原表user,单库分成了user1、user2、user3三张表,那对应的Java映射实体,比说@Table(name = "user1")这种要怎么映射或者配置


            IP属地:浙江6楼2020-05-25 17:32
            回复