我需要一些帮助,让我告诉你我的上下文,我们有两个测试环境,其中一个 Web 应用程序被定向到 postgres 中的一个数据库,应用程序在这里运行得很好,在另一个环境中我们有两个数据库从属一台和主一台,在应用程序中显示与数据库相关的错误。
有一个名为讨论的表,另一个名为 network_discussion,当我立即保存讨论时,我保存到 network_discussion,但在第二个环境中不起作用,我认为这与 GRANT 访问有关,但显然不是,这是错误跟踪:
2012-09-15 15:10:27,162|TP-Processor12|ERROR|mp_sites|web|mpmvstage|/home/matchpoint-web/yfroot||Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into users.network_discussion (network_id, user_discussion_id, title, last_updated_dt, id) values (?, ?, ?, ?, ?)]; SQL state [null]; error code [0]; Batch entry 0 insert into users.network_discussion (network_id, user_discussion_id, title, last_updated_dt, id) values (33214047252677632, 33495522229786655, company-corp.com_newdisa, 2012-09-15 15:10:27.153000 -07:00, 33495522229786656) was aborted. Call getNextException to see the cause.; nested exception is java.sql.BatchUpdateException: Batch entry 0 insert into users.network_discussion (network_id, user_discussion_id, title, last_updated_dt, id) values (33214047252677632, 33495522229786655, company-corp.com_newdisa, 2012-09-15 15:10:27.153000 -07:00, 33495522229786656) was aborted. Call getNextException to see the cause.
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into users.network_discussion (network_id, user_discussion_id, title, last_updated_dt, id) values (?, ?, ?, ?, ?)]; SQL state [null]; error code [0]; Batch entry 0 insert into users.network_discussion (network_id, user_discussion_id, title, last_updated_dt, id) values (33214047252677632, 33495522229786655, company-corp.com_newdisa, 2012-09-15 15:10:27.153000 -07:00, 33495522229786656) was aborted. Call getNextException to see the cause.; nested exception is java.sql.BatchUpdateException: Batch entry 0 insert into users.network_discussion (network_id, user_discussion_id, title, last_updated_dt, id) values (33214047252677632, 33495522229786655, company-corp.com_newdisa, 2012-09-15 15:10:27.153000 -07:00, 33495522229786656) was aborted. Call getNextException to see the cause.
java.sql.BatchUpdateException: Batch entry 0 insert into users.network_discussion (network_id, user_discussion_id, title, last_updated_dt, id) values (33214047252677632, 33495522229786655, company-corp.com_newdisa, 2012-09-15 15:10:27.153000 -07:00, 33495522229786656) was aborted. Call getNextException to see the cause.
at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2512)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1314)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:347)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2574)
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:584)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:500)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:473)
at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:267)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:623)
at com.netblue.matchpoint.service.DiscussionService$$EnhancerByCGLIB$$b685dad0.addOrGetDiscussions(<generated>)
at com.netblue.matchpoint.filter.DiscussionFilter.doFilter(DiscussionFilter.java:30)
at com.netblue.matchpoint.sitecontroller.MpBaseSiteController.getFilteredParams(MpBaseSiteContr
它继续,我的意思是错误跟踪继续更多,所以给我一个想法的任何帮助都会很棒,我已经在谷歌中跟踪了这个,但没有结果,谢谢。