db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bruehlicke <bruehli...@gmail.com>
Subject Moving from 10.5.3.0 -> 10.12.1.1 SQLNonTransientConnectionException but 10.5.3.0 ->10.7.1.1 is working perfectly exactly same code, 10.5.3.0 -> 10.8.1.2 fails similar
Date Wed, 28 Sep 2016 01:29:00 GMT
Hello Derby friends,

Running now for a long time happy with 10.5.3.0 but thought it was time to
upgrade. Got my app updated to run with 64 bit JDK 1.8.0_102 and working
fine. Now replaced derby.jar and derbytools.jar and got into trouble whith
any release 10.8.1.2 or higher. Using 10.7.1.1 and lower works.

Using Derby in embedded mode. Win 7 64bit within NetBeans RCP app. This is
on a derby database created with the new version, i.e. not any old database
migration issue.  Code which failing is doing something like:


Connection connection = <get connection>'
<add some PreparedStatements>
<do executeUpdate on the prepaird statements>
...
Statement s = connection.createStatement();
// Creating a dummy update to make a trigger execute updating a parent
after new data inserted with the prepared statements above
s.execute("UPDATE CURVE_DATA_NUMBER SET CURVE_ID=" + curveId + " WHERE
CURVE_ID=" + curveId + " AND SEQ_NUM=1");


The line with s.execute it fails with the stack below with any Derby
release 10.8.1.2 and higher. But works with 10.7.1.1 and lower.



First I thought it was a trigger failing, but that worked fine. Also
executing the UPDATE statement manually (in NetBeans DB editor) works fine
when using the newer jars). I did go back version by version and run the
same code always replacing derby.jar and derbytools.jar (only 2 jars from
derby distribution  in the classpath) and first at version 10.7.1.1 it all
worked again. Going to 10.8.1.2 fails (stack trace also attached below.)

I see from the release notes that 10.8.1.2 had the major upgrade to JDBC
4.1 and Java 7 but nothing obvious for me what should trigger the error.  I
am still investigating but would for sure hear if anyone had similar issues
or any wild ideas where the culprit of this mystery is. Printing the
instances of statement "s" and the connection they show good actual values
of org.apache.derby.impl.jdbc.EmbedConnection and
org.apache.derby.impl.jdbc.EmbedStatement.  I will see if I can make a
small dummy app which encapsulates the error, but as it fails with 10.8.1.2
I have the strong feeling it must be a simple thing which I need to have to
modify to make it work again.


Note the error is slightly different in 10.12.1.1 than all the other
releases (10.11.1.1 to 10.8.1.2). From 10.7.1.1 all is happily working
again.

Regards
Bernd



STACK  when using 10.8.1.2: ( and further down the stack when using
10.12.1.1).


FINEST [com.effi.vin.api.LasReader]: doInBackground: EXECUTING UPDATE OF
CURVE_ID to trigger DB trigger
====
createStatement failed: java.sql.SQLNonTransientConnectionException: No
current connection.
getRS failed:java.sql.SQLNonTransientConnectionException: No current
connection.
SEVERE [org.openide.util.Exceptions]
java.lang.NullPointerException
    at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getTriggerActionString(Unknown
Source)
    at
org.apache.derby.iapi.sql.dictionary.TriggerDescriptor.getActionSPS(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.GenericTriggerExecutor.getAction(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTriggers(Unknown
Source)
    at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
Source)
    at
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown
Source)
    at
org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTriggers(Unknown
Source)
    at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
Source)
    at
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown
Source)
    at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
Source)
Caused: java.sql.SQLException: Java exception: ':
java.lang.NullPointerException'.
    at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
    at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
Caused: java.sql.SQLException: Java exception: ':
java.lang.NullPointerException'.
    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.javaException(Unknown Source)
    at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
    at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
    at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
[catch] at
com.effi.vin.api.LasReader$CurveDataInsertTask.doInBackground(LasReader.java:1033)
    at
com.effi.vin.api.LasReader$CurveDataInsertTask.doInBackground(LasReader.java:949)
    at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at javax.swing.SwingWorker.run(SwingWorker.java:334)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)






STACK when using 10.12.1.1 below



FINEST [com.effi.vin.api.LasReader]: doInBackground: EXECUTING UPDATE OF
CURVE_ID to trigger DB trigger
SEVERE [org.openide.util.Exceptions]
java.lang.NullPointerException
    at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.examineTriggerNodeAndCols(Unknown
Source)
    at
org.apache.derby.iapi.sql.dictionary.TriggerDescriptor.getSPS(Unknown
Source)
====
createStatement failed: java.sql.SQLNonTransientConnectionException: No
current connection.
    at
org.apache.derby.iapi.sql.dictionary.TriggerDescriptor.getActionSPS(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.GenericTriggerExecutor.getAction(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeWhenClauseAndAction(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTriggers(Unknown
Source)
    at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
Source)
    at
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown
Source)
    at
org.apache.derby.impl.sql.GenericPreparedStatement.executeSubStatement(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeWhenClauseAndAction(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(Unknown
Source)
    at
org.apache.derby.impl.sql.execute.UpdateResultSet.fireAfterTriggers(Unknown
Source)
    at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
Source)
    at
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown
Source)
    at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
Source)
Caused: ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
    at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
    at
org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown
Source)
Caused: java.sql.SQLException: Java exception: ':
java.lang.NullPointerException'.
    at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
    at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
    at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
    at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
    at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
    at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
getRS failed:java.sql.SQLNonTransientConnectionException: No current
connection.
[catch] at
com.effi.vin.api.LasReader$CurveDataInsertTask.doInBackground(LasReader.java:1033)
    at
com.effi.vin.api.LasReader$CurveDataInsertTask.doInBackground(LasReader.java:949)
    at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at javax.swing.SwingWorker.run(SwingWorker.java:334)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Mime
View raw message