Hello group,

I recently tested version 1.3.150 with some of our code and I get the
following NullPointerException:

org.h2.jdbc.JdbcSQLException: General error:
"java.lang.NullPointerException" [50000-150]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:
327)
        at org.h2.message.DbException.get(DbException.java:156)
        at org.h2.message.DbException.convert(DbException.java:279)
        at org.h2.message.DbException.toSQLException(DbException.java:252)
        at org.h2.message.TraceObject.logAndConvert(TraceObject.java:373)
        at org.h2.jdbc.JdbcResultSet.next(JdbcResultSet.java:118)
        at
com.vis.core.persist.db.DBObjectBroker.createObjects(DBObjectBroker.java:
167)
        at
com.vis.apps.sb3.modules.persist.SubmittedFormsBroker.getAllSubmittedData(SubmittedFormsBroker.java:
235)
        at
com.vis.apps.sb3.modules.persist.SubmittedFormsBroker.getAll(SubmittedFormsBroker.java:
201)
        at
com.vis.core.persist.db.AbstractDBObjectBroker.getAll(AbstractDBObjectBroker.java:
70)
        at com.vis.core.persist.frwk.BrokerManager.getAll(BrokerManager.java:
92)
        at
com.vis.core.persist.frwk.DefaultDatastoreManager.getAll(DefaultDatastoreManager.java:
127)
        at com.vis.core.biz.BizServiceManager.getAll(BizServiceManager.java:
321)
        at
com.vis.apps.sb3.modules.biz.DefaultSbFormDataService.convertSb3SavesToSb5(DefaultSbFormDataService.java:
270)
        at
com.vis.apps.sb5.migrate.SB3ToSB5MigrationTool.migrateFormData(SB3ToSB5MigrationTool.java:
659)
        at
com.vis.apps.sb5.migrate.SB3ToSB5MigrationTool.migrateDatabase(SB3ToSB5MigrationTool.java:
645)
        at
com.vis.apps.sb5.migrate.SB3ToSB5MigrationTool.migrate(SB3ToSB5MigrationTool.java:
177)
        at
com.vis.apps.sb5.migrate.SB3ToSB5MigrationTool.main(SB3ToSB5MigrationTool.java:
1132)
Caused by: java.lang.NullPointerException
        at org.h2.store.Data.readValue(Data.java:707)
        at org.h2.result.ResultDiskBuffer.readRow(ResultDiskBuffer.java:201)
        at org.h2.result.ResultDiskBuffer.nextSorted(ResultDiskBuffer.java:
229)
        at org.h2.result.ResultDiskBuffer.next(ResultDiskBuffer.java:207)
        at org.h2.result.LocalResult.next(LocalResult.java:210)
        at org.h2.jdbc.JdbcResultSet.nextRow(JdbcResultSet.java:2986)
        at org.h2.jdbc.JdbcResultSet.next(JdbcResultSet.java:116)       ... 12 
more


Quickly browsing through the code I see the following:
The DataHandler of Data is null and that is because ResultDiskBuffer
is
always passing null for the DataHandler property when creating a new
Data row buffer.

The table's DDL (excluding PK and indexes) is :

CREATE CACHED TABLE PUBLIC.SUBMIT(
    ALIAS VARCHAR(150) DEFAULT 'false' NOT NULL,
    DATA BLOB NOT NULL,
    DESCRIPTION VARCHAR(250),
    HANDLER_VERSION NUMERIC(18, 2),
    JAVA_VERSION VARCHAR(150) DEFAULT 'false' NOT NULL,
    LAST_COMM_DATE TIMESTAMP,
    MODULE_ID INTEGER,
    SB_BUILD_NO INTEGER NOT NULL,
    SB_VER INTEGER NOT NULL,
    STATUS VARCHAR(50) DEFAULT 'false' NOT NULL,
    SUBMIT_CLASS VARCHAR(150) DEFAULT 'false' NOT NULL,
    SUBMIT_DATE TIMESTAMP NOT NULL,
    SUBMIT_ID NUMERIC(18, 0) NOT NULL,
    SUBMITTED_FROM INTEGER NOT NULL
)

The row count is ~14,000.

The SQL executed:

SELECT * FROM SUBMIT ORDER BY SUBMIT_DATE DESC.

The url used:

jdbc:h2:file:/C:\Program Files (x86)\Vms\Shipboard 5\db\data\sb

Also note that this does problem does not occur with version 1.2.145
(2010-11-02)
Please let me know if you need more information.

Thanks a lot for you time.

Best regards,
Panayiotis Vlissidis

P.S: Thomas, do you have any updates on your plans for providing
commercial support for H2 in the future?

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to