0
votes

Encounter the following exception. Anyone have any idea how to resolve this? Or what is the issue exactly.

[#|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
Can't tell, because the SQLException that is probably the root cause is obscured. Can you try again?duffymo
Could you tell us about your environment and the context of the exceptionsblundy

4 Answers

2
votes

To be able to solve this, we need to know more about your environment. What JVM version and vendor, for example?

The root cause is buried somewhere in

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)

You're getting a RuntimeException. That appears to be the Exception that's causing all of the trouble. If you can find out what this Exception is you'll probably see how to fix it.

1
votes

Error in allocating a connection.

Connection cannot be obtained from the connection pool.

Reasons could be:

  • pool reached it's maximum capacity = your app leaks connections
  • database side reached maximum capacity for this user => change DB settings
  • database is down (temporarily?)
  • anything else (less probable)

All other exceptions (XA, SQLException, ...) are just consequences.

0
votes

As Eddie said, there's not enough info to diagnose your problem fully, though it does appear to be database related.

Some things to check:

  • Is your database connection set up correctly?
  • Is your database server running?
  • Are you running out of database connections?

Good luck :-)

-1
votes

"XAResource" makes me think that two-phase commit is involved somehow. If that's true, are you using XA drivers to access the databases? You must.