#1260 Inserting blob in a db with "res" connection string NPE

closed-fixed
nobody
jdbc (172)
1
2012-10-25
2012-10-25
Anonymous
No

When calling an insert statement with a blob parameter: this exception is thrown (the same query is successful when connecting to the sam database using "file" url):

SQLException sqlCode = S1000 vendorCode = -458 message = java.lang.NullPointerException
java.sql.SQLException: java.lang.NullPointerException
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(Unknown Source)
.....
.....
.....
Caused by: org.hsqldb.HsqlException: java.lang.NullPointerException
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.SessionData.allocateLobForResult(Unknown Source)
at org.hsqldb.Session.allocateResultLob(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.performPreExecute(Unknown Source)
... 42 more
Caused by: java.lang.NullPointerException
at org.hsqldb.lib.ArrayUtil.fillArray(Unknown Source)
at org.hsqldb.persist.LobManager.setBytesIS(Unknown Source)
at org.hsqldb.persist.LobManager.setBytesForNewBlob(Unknown Source)
... 45 more

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-10-25
    • summary: Inserting blob in a db with "res" connection string doesn't --> Inserting blob in a db with "res" connection string NPE
     
  • Fred Toussi

    Fred Toussi - 2012-10-25
    • priority: 5 --> 1
    • status: open --> open-later
     
  • Fred Toussi

    Fred Toussi - 2012-10-25

    A database with a res: connection is readonly.

    It would be better to throw a readonly excption instead of NPE.

     
  • Fred Toussi

    Fred Toussi - 2012-10-25

    Further explanation:
    A database with a res: connection is files_readonly. This allows data to be inserted into MEMORY tables (without persistence of the changes), but not into CACHED tables. Creation or modification of existing LOBs is not possible either.

     
  • Fred Toussi

    Fred Toussi - 2012-10-25

    Fix committed to SVN to report radonly in exception.

     
  • Fred Toussi

    Fred Toussi - 2012-10-25
    • status: open-later --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks