Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cargotracker-dev] HyperSQL DB and H2 testing

Have you figured out what the exact issue is with HSQLDB? If the initial data load does not work correctly, the application will fail with a race condition when put into a cluster.

As I mentioned, checking in code that is primarily an un-initutive workaround to support Open Liberty (or any other runtime for that matter) is not something we can do. Any other reasonable solution that works with Payara and a cluster is fine. The reason the initial data load is there is that the application needs a row to do a pessimistic lock on, it does not lock on a table as far as I am aware.

On 6/21/2022 12:20 PM, Chanun Ong wrote:
Hi Reza,

Just wanted to get back to you about some database-related experiments to find an alternate solution to the initial-data.sql issue. I was able to get H2 DB to work, but the last working version of H2 with OL that was compatible with batch jobs was 1.4.200. H2 2.x+ no longer works without a custom DDL, so I tried to use HyperSQL DB instead. I ended up encountering a similar problem to Derby, just with a different error code: 

[INFO] [WARNING ] CWWJP9991W: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.10.v20211216-fe64cd39c3): org.eclipse.persistence.exceptions.DatabaseException

[INFO] Internal Exception: java.sql.SQLSyntaxErrorException: unexpected end of statement in statement [-- It's OK for this to fail if the record already exists.]

[INFO] Error Code: -5590

[INFO] Call: -- It's OK for this to fail if the record already exists.

[INFO] Query: DataModifyQuery(sql="-- It's OK for this to fail if the record already exists.")


The app is otherwise fully functional using Derby, HyperSQL DB, and H2 (version 1.4.200). Let me know if you have a preferred route to take with regards to this (pull request for the initial-data.sql, changing the Java code, using a specific database, etc.)

Best,


Chanun Ong
University of California, Berkeley
Electrical Engineering & Computer Science, B.S. 
Class of 2022

Back to the top