Subject | Re: [Firebird-Java] DataExpress problem JayBird 3 Beta |
---|---|
Author | Mark Rotteveel |
Post date | 2016-12-21T13:09:07Z |
On 21-12-2016 03:34, hugo.larson@... [Firebird-Java] wrote:
problem I thought I had fixed with 2.2.12 / 3.0.0-beta-2. So there is
probably yet another combination of things that can trigger that.
I'll need to dig deeper. As I said before, a working program that
demonstrates this would be very helpful.
However the other two errors seem to suggest you are using connections
that have already been closed, because "You cannot getAutoCommit on an
unassociated closed connection." and that unfortunate
`NullPointerException` can only occur if the connection instance is no
longer associated with a `FBManagedConnection`, and that only happens if
the connection has been closed or if something outside of Jaybird called
FBConnection.setManagedConnection(null).
For example. the NPE should actually have been a SQLException "The
result set has been closed" or something like that.
How are you creating and managing your connections?
What does advit.web.dxweb.MyQueryDataSet.setPoolconn(..) do?
Mark
Mark Rotteveel
> Hey Mark,That is unfortunate, especially as one of them seems to be the same
>
> Seems that there are more places that the problem occurs. Both in the
> new 2.12 and Beta 2.
> Here are the traces:
problem I thought I had fixed with 2.2.12 / 3.0.0-beta-2. So there is
probably yet another combination of things that can trigger that.
I'll need to dig deeper. As I said before, a working program that
demonstrates this would be very helpful.
However the other two errors seem to suggest you are using connections
that have already been closed, because "You cannot getAutoCommit on an
unassociated closed connection." and that unfortunate
`NullPointerException` can only occur if the connection instance is no
longer associated with a `FBManagedConnection`, and that only happens if
the connection has been closed or if something outside of Jaybird called
FBConnection.setManagedConnection(null).
For example. the NPE should actually have been a SQLException "The
result set has been closed" or something like that.
How are you creating and managing your connections?
What does advit.web.dxweb.MyQueryDataSet.setPoolconn(..) do?
Mark
>--
> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544332. invalid
> transaction handle (expecting explicit transaction start)
> at
> org.firebirdsql.jdbc.AbstractPreparedStatement.<init>(AbstractPreparedStatement.java:137)
> at
> org.firebirdsql.jdbc.FBPreparedStatement.<init>(FBPreparedStatement.java:45)
> at sun.reflect.GeneratedConstructorAccessor3.newInstance(Unknown Source)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
> at java.lang.reflect.Constructor.newInstance(Unknown Source)
> at
> org.firebirdsql.jdbc.FBStatementFactory.createPreparedStatement(FBStatementFactory.java:89)
> at org.firebirdsql.jdbc.AbstractDatabaseMetaData.getStatement(Abs
> tractDatabaseMetaData.java:6165)
> at
> org.firebirdsql.jdbc.AbstractDatabaseMetaData.doQuery(AbstractDatabaseMetaData.java:6205)
> at
> org.firebirdsql.jdbc.FBResultSetMetaData.getExtendedFieldInfo(FBResultSetMetaData.java:832)
> at
> org.firebirdsql.jdbc.FBResultSetMetaData.getExtFieldInfo(FBResultSetMetaData.java:681)
> at
> org.firebirdsql.jdbc.FBResultSetMetaData.getPrecision(FBResultSetMetaData.java:304)
> at com.borland.dx.sql.dataset.RuntimeMetaData.a(Unknown Source)
> at com.borland.dx.sql.dataset.JdbcProvider.b(Unknown Source)
> at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
> at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)
> at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)
> at advit.web.dxweb.MyQueryDataSet.execType(MyQueryD ataSet.java:266)
> at advit.web.dxweb.MyQueryDataSet.myRefresh(MyQueryDataSet.java:241)
> at advit.web.dxweb.MyQueryDataSet.refresh(MyQueryDataSet.java:129)
> at advit.db.Sql$QUERY.refreshWithPool(Sql.java:284)
> at advit.db.Sql$QUERY.execQds(Sql.java:203)
> at advit.db.Sql$QUERY.execWithPool(Sql.java:234)
> at advit.report.DayReport.refreshSets(DayReport.java:172)
> at advit.report.DayReport.makeAlldays(DayReport.java:273)
> at advit.report.ReportSender.makeZ_alldays(ReportSender.java:191)
> at advit.report.ReportSender.makeReport(ReportSender.java:127)
> at advit.report.ReportSender.checkSend(ReportSender.java:83)
> at advit.report.ReportSender.send(ReportSender.java:46)
> at advit.report.ReportSender.<init>(ReportSender.java:36)
> at advit.MainTest$1.run(MainTest.java:186)
> at java.lang.Thread.run(Unknown Source)
> Caused by: org.firebirdsql.gds.GDSException: invalid transaction handle
> (expecting explicit transaction start)
> at
> org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.readStatusVector(AbstractJavaGDSImpl.java:2120)
> at
> org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.receiveResponse(AbstractJavaGDSImpl.java:2070)
> at
> org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscDsqlPrepare(AbstractJavaGDSImpl.java:1478)
> at
> org.firebirdsql.gds.impl.GDSHelper.prepareStatement(GDSHelper.java:214)
> at
> org.firebirdsql.jdbc.AbstractStatement.prepareFixedStatement(AbstractStatement.java:1388)
> at
> org.firebirdsql.jdbc.AbstractPreparedStatement.prepareFixedStatement(AbstractPreparedStatement.java:1268)
> at org.firebirdsql.jdbc.AbstractPr
> eparedStatement.<init>(AbstractPreparedStatement.java:134)
> ... 30 more
>
> ..........................................................................................
>
> org.firebirdsql.jdbc.FBSQLException: You cannot getAutoCommit on an
> unassociated closed connection.
> at
> org.firebirdsql.jdbc.AbstractConnection.getAutoCommit(AbstractConnection.java:445)
> at com.borland.dx.sql.dataset.Database.setJdbcConnection(Unknown Source)
> at advit.web.dxweb.MyQueryDataSet.setPoolconn(MyQueryDataSet.java:303)
> at advit.web.dxweb.MyQueryDataSet.execType(MyQueryDataSet.java:261)
> at advit.web.dxweb.MyQueryDataSet.myRefresh(MyQueryDataSet.java:237)
> at advit.web.dxweb.MyQueryDataSet.refresh(MyQueryDataSet.java:128)
> ........................................................................................
>
> java.lang .NullPointerException
> at
> org.firebirdsql.jdbc.AbstractConnection.getDatabaseParameterBuffer(AbstractConnection.java:224)
> at
> org.firebirdsql.jdbc.FBResultSetMetaData.<init>(FBResultSetMetaData.java:61)
> at
> org.firebirdsql.jdbc.AbstractResultSet.getMetaData(AbstractResultSet.java:1025)
> at com.borland.dx.sql.dataset.RuntimeMetaData.a(Unknown Source)
> at com.borland.dx.sql.dataset.JdbcProvider.b(Unknown Source)
> at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
> at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)
> at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)
>
> ----------****-----------------------JayBird---3.0--------------*********---------------------------------------------
>
> java.sql.SQLNonTransientException: No transaction o r transaction not ACTIVE
> at
> org.firebirdsql.gds.ng.TransactionHelper.checkTransactionActive(TransactionHelper.java:49)
> at
> org.firebirdsql.gds.ng.wire.version11.V11Statement.prepare(V11Statement.java:57)
> at
> org.firebirdsql.jdbc.FBStatement.prepareFixedStatement(FBStatement.java:1399)
> at
> org.firebirdsql.jdbc.AbstractPreparedStatement.prepareFixedStatement(AbstractPreparedStatement.java:1229)
> at
> org.firebirdsql.jdbc.AbstractPreparedStatement.<init>(AbstractPreparedStatement.java:147)
> at
> org.firebirdsql.jdbc.FBPreparedStatement.<init>(FBPreparedStatement.java:49)
> at
> org.firebirdsql.jdbc.FBDatabaseMetaData.getStatement(FBDatabaseMetaData.java:5032)
> at
> org.firebirdsql.jdbc.FBDatabaseMetaData.doQuery(FBDatabaseMetaData.java:5070)
> at org.firebirdsql.jdbc.FBResultSetMetaData.getExtende
> dFieldInfo(FBResultSetMetaData.java:514)
> at
> org.firebirdsql.jdbc.AbstractFieldMetaData.getExtFieldInfo(AbstractFieldMetaData.java:341)
> at
> org.firebirdsql.jdbc.AbstractFieldMetaData.getPrecisionInternal(AbstractFieldMetaData.java:279)
> at
> org.firebirdsql.jdbc.FBResultSetMetaData.getPrecision(FBResultSetMetaData.java:289)
> at com.borland.dx.sql.dataset.RuntimeMetaData.a(Unknown Source)
> at com.borland.dx.sql.dataset.JdbcProvider.b(Unknown Source)
> at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
> at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)
> at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)
Mark Rotteveel