openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco de Booij <mdeb...@scarlet.be>
Subject Re: Postgres sequence: current transaction is aborted
Date Mon, 18 Jun 2012 19:13:57 GMT
Hello Kevin,

I hope that it is not an error due to my lack of knowledge/experience. I 
will download the jUnit bucket.

For the openJPA logs I need to figure out where to configure this in 
Tomee. I never used JULI :(

What I see in the postgres log file puzzles me:
2012-06-18 20:17:28 CEST ERROR:  must be owner of relation seq_i18n_codes
2012-06-18 20:17:28 CEST STATEMENT:  ALTER SEQUENCE DOOS.SEQ_I18N_CODES 
INCREMENT BY 50
2012-06-18 20:17:28 CEST ERROR:  current transaction is aborted, 
commands ignored until end of transaction block
2012-06-18 20:17:28 CEST STATEMENT:  SELECT NEXTVAL('DOOS.SEQ_I18N_CODES')
I do not understand where the alter statement comes from. Can this be 
the reason for the error? The user in the datasource has rights to the 
sequence through a role. The sequence is created like:
CREATE SEQUENCE doos.seq_i18n_codes
   INCREMENT 1
   MINVALUE 1
   MAXVALUE 9223372036854775807
   START 1
   CACHE 1;

The stack trace is the easiest part:
18-jun-2012 20:17:28 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with 
path [/doos-web] threw exception [javax.el.ELException: 
DoosRuntimeException ( 
eu.debooy.doosutils.errorhandling.exception.TechnicalException: ERROR: 
current transaction is aborted, commands ignored until end of 
transaction block {prepstmnt 1825309558 SELECT 
NEXTVAL('DOOS.SEQ_I18N_CODES')} [code=0, state=25P02]    layer = 
DoosLayer ( PERSISTENCE    value = N/A )    error = DoosError ( 
eu.debooy.doosutils.errorhandling.exception.base.DoosError@77cb95b3    
code = RUNTIME_EXCEPTION    description = RUNTIME_EXCEPTION ) )] with 
root cause
org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: current 
transaction is aborted, commands ignored until end of transaction block 
{prepstmnt 1825309558 SELECT NEXTVAL('DOOS.SEQ_I18N_CODES')} [code=0, 
state=25P02]
     at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:247)
     at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:231)
     at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:72)
     at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1146)
     at 
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:265)
     at 
org.apache.openjpa.jdbc.sql.PostgresDictionary$PostgresPreparedStatement.executeQuery(PostgresDictionary.java:1019)
     at 
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:265)
     at 
org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1750)
     at 
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:255)
     at 
org.apache.openjpa.jdbc.kernel.NativeJDBCSeq.getSequence(NativeJDBCSeq.java:299)
     at 
org.apache.openjpa.jdbc.kernel.NativeJDBCSeq.allocateInternal(NativeJDBCSeq.java:223)
     at 
org.apache.openjpa.jdbc.kernel.NativeJDBCSeq.nextInternal(NativeJDBCSeq.java:197)
     at 
org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60)
     at 
org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:160)
     at 
org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:144)
     at 
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:756)
     at 
org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:493)
     at 
org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:469)
     at 
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:740)
     at 
org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:135)
     at 
org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:612)
     at 
org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2977)
     at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:40)
     at 
org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:1054)
     at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2112)
     at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2072)
     at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1843)
     at 
org.apache.openjpa.kernel.DelegatingBroker.flush(DelegatingBroker.java:1045)
     at 
org.apache.openjpa.persistence.EntityManagerImpl.flush(EntityManagerImpl.java:663)
     at 
org.apache.openejb.persistence.JtaEntityManager.flush(JtaEntityManager.java:184)
     at eu.debooy.doosutils.access.Dao.create(Dao.java:97)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
     at 
eu.debooy.doosutils.errorhandling.handler.interceptor.PersistenceExceptionHandlerInterceptor.handleException(PersistenceExceptionHandlerInterceptor.java:51)
     at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
     at 
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:176)
     at 
org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:95)
     at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
     at 
org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:129)
     at 
org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:45)
     at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:66)
     at 
org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:72)
     at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
     at 
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138)
     at 
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:226)
     at 
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:178)
     at 
org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:260)
     at 
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:240)
     at 
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:91)
     at 
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:284)
     at 
eu.debooy.doos.access.I18nCodeDao$LocalBeanProxy.create(eu/debooy/doos/access/I18nCodeDao.java)
     at 
eu.debooy.doos.business.I18nCodeManager.createI18nCode(I18nCodeManager.java:53)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
     at 
eu.debooy.doosutils.errorhandling.handler.interceptor.PersistenceExceptionHandlerInterceptor.handleException(PersistenceExceptionHandlerInterceptor.java:51)
     at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
     at 
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:176)
     at 
org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:95)
     at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
     at 
org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:129)
     at 
org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:45)
     at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:66)
     at 
org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:72)
     at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
     at 
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
     at 
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138)
     at 
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:226)
     at 
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:178)
     at 
org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:260)
     at 
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:240)
     at 
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:91)
     at 
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:284)
     at 
eu.debooy.doos.business.I18nCodeManager$LocalBeanProxy.createI18nCode(eu/debooy/doos/business/I18nCodeManager.java)
     at 
eu.debooy.doos.component.I18nCodeComponent.insert(I18nCodeComponent.java:93)
     at 
eu.debooy.doos.web.controller.I18nUploadBean.upload(I18nUploadBean.java:162)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.apache.el.parser.AstValue.invoke(AstValue.java:264)
     at 
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
     at 
org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:96)
     at 
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
     at javax.faces.component.UICommand.broadcast(UICommand.java:120)
     at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1023)
     at 
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:286)
     at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1360)
     at 
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
     at 
org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:38)
     at 
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170)
     at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at 
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357)
     at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
     at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
     at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
     at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
     at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
     at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
     at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
     at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
     at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
     at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
     at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
     at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:662)

Op 18-06-12 15:28, Kevin Sutter schreef:
> Hi Marco,
> That 25P02 state from Postgres is so nebulous...  It really doesn't help
> explain the problem that Postgres is complaining about...  We've had some
> recent activity on the OpenJPA mailing lists related to Postgres and
> Sequences.  It seems that we have varying degrees of success with different
> customers.
>
> Can you post the complete stack when you receive this error?  Have you
> searched the log for other problems leading up to this Error?  Have you
> tried turning on Trace for both OpenJPA and Postgres?  No guarantees, but
> Trace might shed some light on the issue.
>
> The Junit bucket for OpenJPA has various tests relating to Id generation
> and sequences, and these seem to work with Postgres...  So, we might need
> some assistance with narrowing in the test and debug setup to help
> reproduce the problem and eventually solve it.
>
> Thanks,
> Kevin

Mime
View raw message