我是GlassFish的新手,我们公司最近将旧系统从JBoss 2-something迁移到了GlassFish v3。几乎所有东西都运行良好,但我们遇到PostGres(v8.1)XADataSource的连接问题。我们有一个数据库条目,用于保存站点的操作模式,每个请求都会提取此信息以验证他们是否正在请求有效页面。
但是,如果多个用户尝试执行此操作,则会失败。这种情况从未发生在运行PostGres 7.2的JBoss下。这是主犯:
sai.mbz.util.GeneralFailureException: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: sai.mbz.dat.generic.GenericDAOException: Exception caught in DAO: java.lang.RuntimeException: Got exception during XAResource.end: org.postgresql.xa.PGXAException: tried to call end without corresponding start call; nested exception is:
sai.mbz.util.GeneralFailureException: sai.mbz.dat.generic.GenericDAOException: Exception caught in DAO: java.lang.RuntimeException: Got exception during XAResource.end: org.postgresql.xa.PGXAException: tried to call end without corresponding start call
at sai.mbz.control.admin.AdminControllerWebImpl.getParmInfo(Unknown Source)
at sai.mbz.control.web.RequestProcessor.processRequest(Unknown Source)
at org.apache.jsp.Main_jsp._jspService(Main_jsp.java from :74)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:406)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:483)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:373)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
有人可以帮助新手吗?
答案 0 :(得分:1)
异常堆栈表示在调用XAResource.end
时,没有处于活动状态的XA事务。
目前尚不清楚您如何管理交易?你真的需要一个XA数据源吗?如果不这样做,我建议配置非XA(即资源本地)数据源。