今天在测试Hibrnate的多线程时,遇到如下错误:
java.sql.SQLException: ORA-00604: 递归 SQL 级别 1 出现错误 ORA-00001: 违反唯一约束条件 (TRACE_FILES.AVAIL_TRACE_FILES_PK) ORA-06512: 在 line 7
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:141)
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:465)
at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:1228)
at org.hibernate.connection.DriverManagerConnectionProvider.closeConnection(DriverManagerConnectionProvider.java:137)
at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:451)
at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:406)
at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:293)
at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:221)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:119)
at com.teapot.hello.TxMessage.InsertMessage(TxMessage.java:30)
at com.teapot.hello.TxMessage.run(TxMessage.java:36)
at java.lang.Thread.run(Thread.java:595)
SQL Error: 604, SQLState: 60000
ORA-00604: 递归 SQL 级别 1 出现错误 ORA-00001: 违反唯一约束条件 (TRACE_FILES.AVAIL_TRACE_FILES_PK) ORA-06512: 在 line 7
在Oracle的alert警告日志文件中:报错如下:
Errors in file d:\oracle\product\10.2.0\admin\orcl\udump\orcl_ora_7572.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [unable_to_trans_pc] [PC:0x7C931689] [ADDR:0x0] [UNABLE_TO_READ] []
看看07445的错误解释:
07445, 00000, "exception encountered: core dump [%s] [%s] [%s] [%s] [%s] [%s]"
// *Cause: An OS exception occurred which should result in the creation of a
// core file. This is an internal error.
// *Action: Contact your customer support representative.
重启数据库,检查数据的参数
SYS@ORCL> show parameter sga
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 300M
sga_target big integer 300M
SYS@ORCL> show parameter shared
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
max_shared_servers integer
shared_memory_address integer 0
shared_pool_reserved_size big integer 5033164
shared_pool_size big integer 0
shared_server_sessions integer
shared_servers integer 0
SYS@ORCL> show parameter db_cache
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_cache_advice string ON
db_cache_size big integer 0
如上参数:shared_pool_size,db_cache_size都是0
修改过来:
SYS@ORCL> alter system set shared_pool_size=48M
2 ;
系统已更改。
SYS@ORCL> alter system set db_cache_size=150M;
系统已更改。
再进行测试,Hibrnate运行正常
阅读(1757) | 评论(0) | 转发(0) |