帮助处理异常

时间:2009-03-08 03:15:31

标签: java

遇到以下异常。 任何人都知道如何解决这个问题?或者究竟是什么问题。

[#|2009-03-03T10:41:18.079+0800|SEVERE|sun-appserver-pe8.2|ilog.rules.teamserver.model.IlrGlobalCache|_ThreadID=12;|java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
        java.rmi.RemoteException: nested exception is: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:; nested exception is:
        java.sql.SQLException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
        java.rmi.RemoteException: nested exception is: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:; nested exception is:
        java.sql.SQLException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:
        at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Unknown Source)
        at javax.rmi.CORBA.Util.wrapException(Util.java:279)
        at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(Unknown Source)
        at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
        at ilog.rules.teamserver.ejb.service._IlrSessionFacadeEJB_DynamicStub.getElementsFromAssociation(_IlrSessionFacadeEJB_DynamicStub.java)
        at ilog.rules.teamserver.model.impl.IlrAbstractEJBSession.getElementsFromReference(Unknown Source)
        at ilog.rules.teamserver.model.impl.IlrAbstractEJBSession.getElementsFromReference(Unknown Source)
        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:585)
        at ilog.rules.teamserver.model.impl.IlrAbstractEJBSession.invoke(Unknown Source)
        at ilog.rules.teamserver.client.platform.IlrCommonAppServerSettings.invokeWithGivenPrivileges(Unknown Source)
        at ilog.rules.teamserver.client.IlrSessionProxy.invoke(Unknown Source)
        at $Proxy35.getElementsFromReference(Unknown Source)
        at ilog.rules.teamserver.brm.impl.IlrProjectInfoImpl.getMessageMap(Unknown Source)
        at ilog.rules.teamserver.model.IlrGlobalCache.getBundle(Unknown Source)
        at ilog.rules.teamserver.model.IlrMessages.getString(Unknown Source)
        at ilog.rules.teamserver.model.IlrMessages.getMessage(Unknown Source)
        at ilog.rules.teamserver.model.IlrMessageHelper.getDisplayNameForType(Unknown Source)
        at ilog.rules.teamserver.model.IlrMessageHelper.getLCDisplayNameForType(Unknown Source)
        at ilog.rules.teamserver.externalejb.IlrExternalInterfaceFacadeLocalSessionBean.commitRuleDataSeparately(Unknown Source)
        at ilog.rules.teamserver.externalejb.IlrExternalInterfaceFacadeLocalSessionBean.commitRuleData(Unknown Source)
        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:585)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:983)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:128)
        at $Proxy18.commitRuleData(Unknown Source)
        at ilog.rules.teamserver.web.servlets.IlrSynchronizationEntryPointServlet.handlecommitRuleData(Unknown Source)
        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:585)
        at ilog.rules.teamserver.web.servlets.IlrSynchronizationEntryPointServlet.handleMethod(Unknown Source)
        at ilog.rules.teamserver.web.servlets.IlrSynchronizationEntryPointServlet.doPost(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
        at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
        at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
        at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
        at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
Caused by: java.rmi.RemoteException: nested exception is: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:; nested exception is:
        java.sql.SQLException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:
        at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:199)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:853)
        at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:160)
        at $Proxy22.getElementsFromAssociation(Unknown Source)
        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:585)
        ... 68 more
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.RuntimeException: Got exception during XAResource.start:
        at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:74)
        at ilog.rules.teamserver.ejb.service.dao.IlrElementDAOJDBC.getConnection(Unknown Source)
        at ilog.rules.teamserver.ejb.service.IlrTransactionContext.getConnectionFromAppServer(Unknown Source)
        at ilog.rules.teamserver.ejb.service.IlrTransactionContext.(Unknown Source)
        at ilog.rules.teamserver.ejb.service.IlrTransactionContext.(Unknown Source)
        at ilog.rules.teamserver.ejb.service.IlrSessionFacadeImpl.getElementsFromAssociation(Unknown Source)
        at ilog.rules.teamserver.ejb.service.IlrSessionFacadeBean.getElementsFromAssociation(Unknown Source)
        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:585)
        at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:957)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
        at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:151)
        ... 73 more
|#]

4 个答案:

答案 0 :(得分:2)

为了解决这个问题,我们需要了解您的环境。例如,JVM版本和供应商是什么?

根本原因隐藏在

java.sql.SQLException: Error in allocating a connection.
Cause: java.lang.RuntimeException: Got exception during XAResource.start:
    at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:74)

你得到RuntimeException。这似乎是造成所有麻烦的异常。如果你能找到这个例外,你可能会看到如何修复它。

答案 1 :(得分:1)

  

分配连接时出错。

无法从连接池获取连接。

原因可能是:

  • 池达到最大容量=您的应用程序泄漏连接
  • 数据库端达到此用户的最大容量=>更改数据库设置
  • 数据库已关闭(暂时?)
  • 其他任何事情(不太可能)

所有其他异常(XA,SQLException,......)只是后果。

答案 2 :(得分:0)

正如Eddie所说,没有足够的信息来完全诊断您的问题,尽管它看起来确实与数据库有关。

要检查的一些事项:

  • 您的数据库连接是否设置正确?
  • 您的数据库服务器是否正在运行?
  • 您的数据库连接不足吗?
祝你好运: - )

答案 3 :(得分:-1)

“XAResource”让我觉得以某种方式涉及两阶段提交。如果这是真的,您使用XA驱动程序访问数据库吗?你必须。