cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Connection closed running stored proc on SQL Server
Date Fri, 12 Jan 2018 14:47:22 GMT
> For some reason, even though this is happening immediately when the call occurs, changing
the timeout fixes it.

Haven't used the TDS driver in a while. Good to know. 

Andrus



> On Jan 11, 2018, at 3:26 AM, Ken Anderson <ken.anderson@amphorainc.com> wrote:
> 
> For some reason, even though this is happening immediately when the call occurs, changing
the timeout fixes it.
> 
> Crazy!
> 
> On 1/10/18, 5:05 PM, "Ken Anderson" <ken.anderson@amphorainc.com> wrote:
> 
>    All,
> 
>    We’re running into an issue where our connection to SQL Server is being lost at
the moment we try to execute a stored procedure.  We’re unfortunately still using 4.0M3
if that matters…  Any ideas?
> 
>    Ken
> 
>    java.sql.SQLException: I/O Error: Read timed out
>                    at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1093)
>                    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:563)
>                    at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedStatement.java:787)
>                    at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
>                    at com.zaxxer.hikari.pool.HikariProxyCallableStatement.execute(HikariProxyCallableStatement.java)
>                    at org.apache.cayenne.dba.sqlserver.SQLServerProcedureAction.performAction(SQLServerProcedureAction.java:68)
>                    at org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:97)
>                    at org.apache.cayenne.access.DataNode.performQueries(DataNode.java:306)
>                    at org.apache.cayenne.access.DataDomainQueryAction.runQuery(DataDomainQueryAction.java:439)
>                    at org.apache.cayenne.access.DataDomainQueryAction.access$000(DataDomainQueryAction.java:71)
>                    at org.apache.cayenne.access.DataDomainQueryAction$2.perform(DataDomainQueryAction.java:412)
>                    at org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:53)
>                    at org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(DataDomainQueryAction.java:409)
>                    at org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:121)
>                    at org.apache.cayenne.access.DataDomain.onQueryNoFilters(DataDomain.java:559)
>                    at org.apache.cayenne.access.DataDomain$DataDomainQueryFilterChain.onQuery(DataDomain.java:730)
>                    at org.apache.cayenne.tx.TransactionFilter.onQuery(TransactionFilter.java:49)
>                    at org.apache.cayenne.access.DataDomain$DataDomainQueryFilterChain.onQuery(DataDomain.java:730)
>                    at com.amphora.cayenne.service.impl.AmphoraDataChannelFilter.onQuery(AmphoraDataChannelFilter.java:49)
>                    at org.apache.cayenne.access.DataDomain$DataDomainQueryFilterChain.onQuery(DataDomain.java:730)
>                    at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:551)
>                    at org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:350)
>                    at org.apache.cayenne.util.ObjectContextQueryAction.executePostCache(ObjectContextQueryAction.java:106)
>                    at org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:93)
>                    at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:985)
>                    at org.apache.cayenne.access.DataContext.performQuery(DataContext.java:974)
>                    at com.amphora.jnode.JNodeLibServiceTest.executionCostSummary(JNodeLibServiceTest.java:229)
>                    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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>                    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>                    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>                    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>                    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
>                    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>                    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>                    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>                    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>                    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>                    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>                    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>                    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>                    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
>                    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:539)
>                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:761)
>                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:461)
>                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:207)
>                    Suppressed: java.sql.SQLException: Invalid state, the Connection object
is closed.
>                                    at net.sourceforge.jtds.jdbc.TdsCore.checkOpen(TdsCore.java:481)
>                                    at net.sourceforge.jtds.jdbc.TdsCore.clearResponseQueue(TdsCore.java:767)
>                                    at net.sourceforge.jtds.jdbc.JtdsStatement.reset(JtdsStatement.java:722)
>                                    at net.sourceforge.jtds.jdbc.JtdsStatement.close(JtdsStatement.java:966)
>                                    at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.close(JtdsPreparedStatement.java:707)
>                                    at com.zaxxer.hikari.pool.ProxyStatement.close(ProxyStatement.java:76)
>                                    at org.apache.cayenne.dba.sqlserver.SQLServerProcedureAction.performAction(SQLServerProcedureAction.java:107)
>                                    ... 44 more
>    Caused by: java.net.SocketTimeoutException: Read timed out
>                    at java.net.SocketInputStream.socketRead0(Native Method)
>                    at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
>                    at java.net.SocketInputStream.read(SocketInputStream.java:171)
>                    at java.net.SocketInputStream.read(SocketInputStream.java:141)
>                    at java.io.DataInputStream.readFully(DataInputStream.java:195)
>                    at java.io.DataInputStream.readFully(DataInputStream.java:169)
>                    at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:850)
>                    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:731)
>                    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:477)
>                    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:114)
>                    at net.sourceforge.jtds.jdbc.ResponseStream.peek(ResponseStream.java:99)
>                    at net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:4127)
>                    at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1086)
>                    ... 49 more
> 
>    Jan 10, 2018 5:00:19 PM org.apache.cayenne.log.CommonsJdbcEventLogger logQueryError
>    INFO: *** error.
>    java.sql.SQLException: Connection is closed
>                    at com.zaxxer.hikari.pool.ProxyConnection$ClosedConnection$1.invoke(ProxyConnection.java:469)
>                    at com.sun.proxy.$Proxy7.rollback(Unknown Source)
>                    at com.zaxxer.hikari.pool.ProxyConnection.rollback(ProxyConnection.java:361)
>                    at com.zaxxer.hikari.pool.HikariProxyConnection.rollback(HikariProxyConnection.java)
>                    at org.apache.cayenne.tx.CayenneTransaction.processRollback(CayenneTransaction.java:129)
>                    at org.apache.cayenne.tx.BaseTransaction.rollback(BaseTransaction.java:153)
>                    at org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:70)
>                    at org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(DataDomainQueryAction.java:409)
>                    at org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryAction.java:121)
>                    at org.apache.cayenne.access.DataDomain.onQueryNoFilters(DataDomain.java:559)
>                    at org.apache.cayenne.access.DataDomain$DataDomainQueryFilterChain.onQuery(DataDomain.java:730)
>                    at org.apache.cayenne.tx.TransactionFilter.onQuery(TransactionFilter.java:49)
>                    at org.apache.cayenne.access.DataDomain$DataDomainQueryFilterChain.onQuery(DataDomain.java:730)
>                    at com.amphora.cayenne.service.impl.AmphoraDataChannelFilter.onQuery(AmphoraDataChannelFilter.java:49)
>                    at org.apache.cayenne.access.DataDomain$DataDomainQueryFilterChain.onQuery(DataDomain.java:730)
>                    at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:551)
>                    at org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:350)
>                    at org.apache.cayenne.util.ObjectContextQueryAction.executePostCache(ObjectContextQueryAction.java:106)
>                    at org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:93)
>                    at org.apache.cayenne.access.DataContext.onQuery(DataContext.java:985)
>                    at org.apache.cayenne.access.DataContext.performQuery(DataContext.java:974)
>                    at com.amphora.jnode.JNodeLibServiceTest.executionCostSummary(JNodeLibServiceTest.java:229)
>                    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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>                    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>                    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>                    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>                    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
>                    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>                    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>                    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>                    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>                    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>                    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>                    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>                    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>                    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
>                    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:539)
>                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:761)
>                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:461)
>                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:207)
>    Confidentiality Notice: This e-mail and accompanying documents contain confidential
information intended for a specific individual and purpose. This e-mailed information is private
and protected by law. If you are not the intended recipient, you are hereby notified that
any disclosure, copying, or distribution, or the taking of any action based on the contents
of this information, is strictly prohibited.
> 
> 
> Confidentiality Notice: This e-mail and accompanying documents contain confidential information
intended for a specific individual and purpose. This e-mailed information is private and protected
by law. If you are not the intended recipient, you are hereby notified that any disclosure,
copying, or distribution, or the taking of any action based on the contents of this information,
is strictly prohibited.


Mime
View raw message