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
|#]
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.
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.
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 :-)
"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.
Related
I'm using Node JDBC module to connect to Impala, but I'm getting a 500151 error on connection. My connection string is jdbc:impala://myhost:21050;AuthMech=3;transportMode=http;httpPath=cliservice;UID=user;PWD=password
Here is the error messege:
Error: Error running static method
java.sql.SQLException: [Simba][ImpalaJDBCDriver](500151) Error setting/closing session: {0}.
at com.cloudera.hivecommon.api.HS2Client.openSession(Unknown Source)
at com.cloudera.hivecommon.api.HS2Client.<init>(Unknown Source)
at com.cloudera.hivecommon.api.HiveServer2ClientFactory.createClient(Unknown Source)
at com.cloudera.hivecommon.core.HiveJDBCCommonConnection.connect(Unknown Source)
at com.cloudera.impala.core.ImpalaJDBCConnection.connect(Unknown Source)
at com.cloudera.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.cloudera.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: com.cloudera.support.exceptions.GeneralException: [Simba][ImpalaJDBCDriver](500151) Error setting/closing session: {0}.
... 12 more
Caused by: org.apache.thrift.transport.TTransportException
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at org.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:156)
at com.cloudera.hivecommon.api.HS2ClientWrapper.recv_OpenSession(Unknown Source)
at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:143)
at com.cloudera.hivecommon.api.HS2ClientWrapper.OpenSession(Unknown Source)
at com.cloudera.hivecommon.api.HS2Client.openSession(Unknown Source)
at com.cloudera.hivecommon.api.HS2Client.<init>(Unknown Source)
at com.cloudera.hivecommon.api.HiveServer2ClientFactory.createClient(Unknown Source)
at com.cloudera.hivecommon.core.HiveJDBCCommonConnection.connect(Unknown Source)
at com.cloudera.impala.core.ImpalaJDBCConnection.connect(Unknown Source)
at com.cloudera.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.cloudera.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
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)
I know for sure there's nothing wrong with the credential and AuthMech. Someone please help.
Problem solved. I upgraded my Impala JDBC driver to 41, and got rid of transportMode=http;httpPath=cliservice in my connection string.
When i've added the attribute private Stage stage = new Stage(); to one class in my project import javafx.stage.Stage; i get the following error when running main. Do i have to modify something in the RMI configuration to not get this error?
Exception in thread "main" java.rmi.ServerError: Error occurred in server thread; nested exception is:
java.lang.ExceptionInInitializerError
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
...
Caused by: java.lang.ExceptionInInitializerError
at javafx.stage.Window.<init>(Window.java:1191)
at javafx.stage.Stage.<init>(Stage.java:239)
at javafx.stage.Stage.<init>(Stage.java:227)
at it.polimi.ingsw.pcGC_44.Player.<init>(Player.java:46)
at it.polimi.ingsw.pcGC_44.Controller.updateFromView(Controller.java:204)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
...
Caused by: java.lang.IllegalStateException: This operation is permitted on the event thread only; currentThread = RMI TCP Connection(2)-10.169.221.232
at com.sun.glass.ui.Application.checkEventThread(Application.java:443)
at com.sun.glass.ui.Screen.setEventHandler(Screen.java:285)
at com.sun.javafx.tk.quantum.QuantumToolkit.setScreenConfigurationListener(QuantumToolkit.java:667)
at javafx.stage.Screen.<clinit>(Screen.java:79)
... 22 more
We are using RSA for user Authentication.
We are facing same issues given in above,Sharing the stack trace for your reference below.
Could not complete request:org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.Error: **Problem loading Module.4**
Caused by:java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_131] at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_131] ... 79 more
**Caused by: java.lang.SecurityException: Toolkit not encapsulated by a jar.**
at com.rsa.jcm.f.hz.a(Unknown Source) [jcmFIPS-6.1.3.3.jar:6.1]
at com.rsa.jcm.f.js.b(Unknown Source) [jcmFIPS-6.1.3.3.jar:6.1]
at com.rsa.crypto.jcm.ModuleLoader.a(Unknown Source) [jcmFIPS-6.1.3.3.jar:6.1]
at com.rsa.crypto.jcm.ModuleLoader.load(Unknown Source) [jcmFIPS-6.1.3.3.jar:6.1]
20:24:06,871 ERROR [com.utxfrmwk.util.ExceptionUtils] (http-CDCUDRIFDAPP1/10.40.18.113:3010-4) Exception raised: : java.lang.Error: Problem loading Module.4
at com.rsa.cryptoj.o.by.f(Unknown Source) [cryptojcommon-6.1.3.3.jar:6.1.3.3]
at com.rsa.cryptoj.o.by.c(Unknown Source) [cryptojcommon-6.1.3.3.jar:6.1.3.3]
at com.rsa.cryptoj.o.cf.a(Unknown Source) [cryptojcommon-6.1.3.3.jar:6.1.3.3]
at com.rsa.cryptoj.o.ce.b(Unknown Source) [cryptojcommon-6.1.3.3.jar:6.1.3.3]
Looking for your prompt support and cooperation's .
regards
Ashish
I was trying to execute SELECT statement by connecting from Java to Oracle DB. One of the table has column with Timestamp datatype .when i ran the jUnit test i got the below exception
java.lang.ClassCastException: oracle.sql.TIMESTAMP cannot be cast to java.sql.Timestamp
at com.sun.rowset.CachedRowSetImpl.getTimestamp(Unknown Source)
at org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSet.getTimestamp(ResultSetWrappingSqlRowSet.java:491)
at com.wellpoint.provider.rnr.biz.integration.dao.PropsDAO.buildPropsResponse(PropsDAO.java:1476)
at com.wellpoint.provider.rnr.biz.integration.dao.PropsDAO.populatProps(PropsDAO.java:1320)
at com.wellpoint.provider.rnr.biz.integration.dao.PropsDAO.getProps(PropsDAO.java:388)
at com.wellpoint.provider.rnr.biz.managers.PropsManager.getProps(PropsManager.java:95)
at com.wellpoint.provider.rnr.biz.managers.PropsTest.testGetProps(PropsTest.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
...... .....
set the -D oracle.jdbc.J2EE13Compliant=true for PropsTest.java in the argument VM tab, tried to execute and got the below
java.lang.NoClassDefFoundError: oracle/jdbc/J2EE13Compliant=true
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.J2EE13Compliant=true
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"
am i missing adding any jars or have to follow some other approach to solve this?
Any of your help is appeciated!
Thanks!
I've also seen this ClassNotFound exception. And it was caused by space between -D and o...
-Doracle.jdbc.J2EE13Compliant=true
should work
It would appear you are missing the Oracle JDBC driver JAR in your runtime classpath.
Check out Oracle JDBC driver downloads page.
I have:
BoneCP CONNECTION_POOL = ...;
CONNECTION_POOL.getConfig().setJdbcUrl("jdbc:derby:database...;shutdown=true");
Connection connection = CONNECTION_POOL.getConnection();
connection.close();
CONNECTION_POOL.shutdown();
However this results in the following exception:
3274 [com.google.common.base.internal.Finalizer] ERROR com.jolbox.bonecp.ConnectionPartition - Error while closing off internal db connection
java.sql.SQLException: Cannot close a connection while a transaction is still active.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.checkForTransactionInProgress(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source)
at com.jolbox.bonecp.ConnectionPartition$1.finalizeReferent(ConnectionPartition.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.base.internal.Finalizer.cleanUp(Finalizer.java:154)
at com.google.common.base.internal.Finalizer.run(Finalizer.java:127)
How can I avoid this exception. I've tried every possible way I can think of...
Unless you are running v0.8.1-beta2 or greater, set "disableConnectionTracking" to true in your config.
Please note that you should also expect an SQLException from Derby after a SUCCESSFUL shutdown: http://db.apache.org/derby/docs/dev/devguide/tdevdvlp40464.html