Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    via stackoverflow.com by Unknown author

    Upgrade the database driver to the latest and check.

    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.3-1101-jdbc41</version>
    </dependency>
    

    Replace version with the latest driver version.

  2. ,
    Expert tip

    Try downgrading PostgresSQL server to 9.5 or update your PostgresSQL driver to 9.4-1211 with the following command: <postgresql.version>9.4.1211</postgresql.version>

Solutions on the web

via Stack Overflow by Nelly Junior
, 1 year ago
org.postgresql.xa.PGXAException: Error preparing transaction
org.postgresql.util.PSQLException: ERROR: maximum number of prepared transactions reached
  Hint: Increase max_prepared_transactions (currently 1).	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:321)	at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:297)	at org.postgresql.xa.PGXAConnection.prepare(PGXAConnection.java:326)	at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.prepare(XAManagedConnection.java:330)	at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.prepare(XAResourceWrapperImpl.java:177)	at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelPrepare(XAResourceRecord.java:210)	at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2586)	at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2536)	at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2097)	at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1481)	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:96)	at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1166)	at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)	at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)	at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:173)	at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1021)	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485)	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)	at ro.digidata.socd.service.impl.GeprodromIntegrationBean$$EnhancerBySpringCGLIB$$d1fb6ba0.getCountyName()	at ro.digidata.socd.portal.jsf.mbeans.users.UsersMB.initUserDetailsPage(UsersMB.java:468)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:498)	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:274)	at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)	at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)	at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)	at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)	at com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:238)	at com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(ELText.java:154)	at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85)	at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)	at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183)	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456)	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)	at org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:169)	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)	at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100)	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)	at ro.digidata.socd.portal.filters.ExceptionFilter.doFilter(ExceptionFilter.java:55)	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)	at ro.digidata.socd.portal.filters.DataCollectionEditFilter.doFilter(DataCollectionEditFilter.java:47)	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:168)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:116)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:133)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)	at ro.digidata.socd.portal.filters.ProcessingTimeFilter.doFilter(ProcessingTimeFilter.java:65)	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63)	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)	at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)	at io.undertow.servlet.handlers.ServletInitialHandler.jrHandle(ServletInitialHandler.java)	at org.zeroturnaround.javarebel.integration.servlet.undertow.cbp.ServletInitialHandlerCBP.handleRequest(ServletInitialHandlerCBP.java:100)	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261)	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247)	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76)	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166)	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)	at java.lang.Thread.run(Thread.java:745)