hibernate 执行插入失败!该怎么处理
hibernate 执行插入失败!
请教各位大神,是什么原因?附上执行报告:
2015-5-14 11:34:37 org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
2015-5-14 11:34:37 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.3.9.Final}
2015-5-14 11:34:37 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
2015-5-14 11:34:37 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
2015-5-14 11:34:37 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
2015-5-14 11:34:37 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
2015-5-14 11:34:37 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: com/jingma/msg/bean/Smsmt.hbm.xml
2015-5-14 11:34:37 org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator instantiateC3p0Provider
WARN: HHH000022: c3p0 properties were encountered, but the c3p0 provider class was not found on the classpath; these properties are going to be ignored.
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH000402: Using Hibernate built-in connection pool (not for production use!)
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000401: using driver [oracle.jdbc.driver.OracleDriver] at URL [jdbc:oracle:thin:@192.12.10.181:1521:orcl]
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000046: Connection properties: {user=esk, password=****}
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000006: Autocommit mode: false
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
2015-5-14 11:34:38 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
2015-5-14 11:34:38 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
2015-5-14 11:34:38 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
2015-5-14 11:34:38 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
2015-5-14 11:34:38 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000228: Running hbm2ddl schema update
2015-5-14 11:34:38 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000102: Fetching database metadata
2015-5-14 11:34:38 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000396: Updating schema
2015-5-14 11:34:39 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000261: Table found: ESK.SMS_MT
2015-5-14 11:34:39 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000037: Columns: [business_begintime, smsid, isneedreport, sms_sign, extcode, presend_time, send_userid, message, mt_id, valid_time, orgid, destaddr, priorty, business_id, create_time, business_endtime, channel]
2015-5-14 11:34:39 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000108: Foreign keys: []
2015-5-14 11:34:39 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000126: Indexes: [idx_sms_mt_priorty, sys_c0011145]
2015-5-14 11:34:39 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000232: Schema update complete
Hibernate:
select
MT_ID.nextval
from
dual
Hibernate:
insert
into
SMS_MT
(SMSID, DESTADDR, MESSAGE, ORGID, SEND_USERID, PRESEND_TIME, MT_ID)
values
(?, ?, ?, ?, ?, ?, ?)
2015-5-14 11:34:39 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl stop
INFO: HHH000030: Cleaning up connection pool [jdbc:oracle:thin:@192.12.10.181:1521:orcl]
------解决思路----------------------
没有看到错误信息,你有检查数据库里面有没有新增的资料吗?
------解决思路----------------------
Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
java通过jdbc连接sqlserver和oracle时出现这个异常。
虽然抛出这个异常,但对整个应用没有影响。
这个异常产生的原因是jar包的版本不对。
连接oracle10g的jdbc用ojdbc6.jar(1942k),
连接sqlserver2008用sqljdbc.jar(570k),
而不用sqljdbc4.jar(567k)。
postgres用postgresql-8.2-504.jdbc3.jar
请教各位大神,是什么原因?附上执行报告:
2015-5-14 11:34:37 org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.5.Final}
2015-5-14 11:34:37 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.3.9.Final}
2015-5-14 11:34:37 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
2015-5-14 11:34:37 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
2015-5-14 11:34:37 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
2015-5-14 11:34:37 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
2015-5-14 11:34:37 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: com/jingma/msg/bean/Smsmt.hbm.xml
2015-5-14 11:34:37 org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator instantiateC3p0Provider
WARN: HHH000022: c3p0 properties were encountered, but the c3p0 provider class was not found on the classpath; these properties are going to be ignored.
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH000402: Using Hibernate built-in connection pool (not for production use!)
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000401: using driver [oracle.jdbc.driver.OracleDriver] at URL [jdbc:oracle:thin:@192.12.10.181:1521:orcl]
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000046: Connection properties: {user=esk, password=****}
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH000006: Autocommit mode: false
2015-5-14 11:34:37 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
2015-5-14 11:34:38 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
2015-5-14 11:34:38 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
2015-5-14 11:34:38 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
2015-5-14 11:34:38 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
2015-5-14 11:34:38 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000228: Running hbm2ddl schema update
2015-5-14 11:34:38 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000102: Fetching database metadata
2015-5-14 11:34:38 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000396: Updating schema
2015-5-14 11:34:39 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000261: Table found: ESK.SMS_MT
2015-5-14 11:34:39 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000037: Columns: [business_begintime, smsid, isneedreport, sms_sign, extcode, presend_time, send_userid, message, mt_id, valid_time, orgid, destaddr, priorty, business_id, create_time, business_endtime, channel]
2015-5-14 11:34:39 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000108: Foreign keys: []
2015-5-14 11:34:39 org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000126: Indexes: [idx_sms_mt_priorty, sys_c0011145]
2015-5-14 11:34:39 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000232: Schema update complete
Hibernate:
select
MT_ID.nextval
from
dual
Hibernate:
insert
into
SMS_MT
(SMSID, DESTADDR, MESSAGE, ORGID, SEND_USERID, PRESEND_TIME, MT_ID)
values
(?, ?, ?, ?, ?, ?, ?)
2015-5-14 11:34:39 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl stop
INFO: HHH000030: Cleaning up connection pool [jdbc:oracle:thin:@192.12.10.181:1521:orcl]
------解决思路----------------------
没有看到错误信息,你有检查数据库里面有没有新增的资料吗?
------解决思路----------------------
Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
java通过jdbc连接sqlserver和oracle时出现这个异常。
虽然抛出这个异常,但对整个应用没有影响。
这个异常产生的原因是jar包的版本不对。
连接oracle10g的jdbc用ojdbc6.jar(1942k),
连接sqlserver2008用sqljdbc.jar(570k),
而不用sqljdbc4.jar(567k)。
postgres用postgresql-8.2-504.jdbc3.jar