The internal read only database is stored in its own resource-only-jar file. After modularisation the database file cannot be found by the DriverManager resulting in the following error message.
FATAL : 09:13:32 (830) - could not reopen database org.hsqldb.HsqlException: Database does not exists: /database/prodsoft
I am converting our company's application from JDK8 using ANT to JDK11 using modularisation and Maven. It is developed with Eclipse. Many problems already have been fixed but for this one I cannot find a solution on my own.
I already tried to move the database files from its own project to the maven resource folder of the project Kernel where it is used. I also tried to opens database; (the resource folder) in the module-info.java of the Kernel-project.
The database files prodsoft.properties and prodsoft.script are now located in
The Class that runs the DriverManager is
The hsqldb-2.4.1.jar-driver has been found successfully and is used by the DriverManager.
// ApplicationProperties.DATABASE_CONNECTION = "jdbc:hsqldb:res:database/prodsoft" db_con = DriverManager.getConnection( properties.getValue(ApplicationProperties.DATABASE_CONNECTION), properties.getValue(ApplicationProperties.DATABASE_USER), properties.getValue(ApplicationProperties.DATABASE_PASSWORD) ); db_con.setAutoCommit(true); db_con.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); db_con.setReadOnly(true);