Problem encountered IKVM 8.7.5 + H2 Database 2.2.220 + ojdbc8.jar + vs2019 + net472 #488
Replies: 5 comments 2 replies
-
Well, without more information, it's a little hard to conclude this is an IKVM issue, and not just an issue with using the particular library. |
Beta Was this translation helpful? Give feedback.
-
ive also observed this issue with h2, it simply doesnt save anything to disk, while the same code being absolutely fine on jvm. |
Beta Was this translation helpful? Give feedback.
-
thanks. my project requires:
I can do this with IKVM 7.2.4630.5 + H2 1.4.199.jar + ojdbc6.jar + vs2019 + net472, but now need to upgrade. |
Beta Was this translation helpful? Give feedback.
-
I will provide detailed steps to repeat the error. I have created 2 projects. Step 1. Generate h2.dll
============================================= project 2 is the steps to repeat error
|
Beta Was this translation helpful? Give feedback.
-
More things to say:
|
Beta Was this translation helpful? Give feedback.
-
Problem encountered IKVM 8.7.5 + H2 Database 2.2.220 + ojdbc8.jar + vs2019 + net472
I have created the h2.dll using IKVM 8.7.5 by merging the ojdbc8.jar
o8 1.0.0.8 h2.2.2.220.8 2.2.220.8 jar\ojdbc8.jar jar\ojdbc8.jar ikvm.runtime.AppDomainAssemblyClassLoaderusing the generated dll file.
jdbc:h2:file:C:\WIP\ABC;USER=aaa;PASSWORD=aaa;ACCESS_MODE_DATA=r;IFEXISTS=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
there is no problem if connecting the database using readonly mode and select reocrd from table DDD
========================================================
Problem 1:
with read/write mode, the table DDD get deleted and never go back.
error: table DDD is not found.
=======================================================
Problem 2:
Cannot connect to another H2 database when creating linked table.
CREATE LOCAL TEMPORARY LINKED TABLE IF NOT EXISTS EEE (
'org.h2.Driver',
'jdbc:h2:file:C:/WIP/B1B199;USER=aaa;PASSWORD=aaaa;ACCESS_MODE_DATA=r;IFEXISTS=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE;DB_CLOSE_ON_EXIT=TRUE',
'aaa',
'aaaa',
'DDD'
);
The error message is:
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database may be already in use: null. Possible solutions: close all other connection(s); use the
server mode; SQL statement:
CREATE LOCAL TEMPORARY LINKED TABLE IF NOT EXISTS EEE (
'org.h2.Driver',
'jdbc:h2:file:C:/WIP/B1B199;USER=aaa;PASSWORD=aaaa;ACCESS_MODE_DATA=r;IFEXISTS=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE;DB_CLOSE_ON_EXIT=TRUE',
'aaa',
'aaaa',
'DDD' )
at org.h2.message.DbException.getJdbcSQLException(DbException.java:617)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:193)
at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:173)
at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:96)
at org.h2.engine.Database.getPageStore(Database.java:2739)
at org.h2.engine.Database.open(Database.java:771)
at org.h2.engine.Database.openDatabase(Database.java:320)
at org.h2.engine.Database.(Database.java:314)
at org.h2.engine.Engine.openSession(Engine.java:69)
at org.h2.engine.Engine.openSession(Engine.java:201)
at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178)
at org.h2.engine.Engine.createSession(Engine.java:161)
at org.h2.engine.Engine.createSession(Engine.java:31)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336)
at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:169)
at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:149)
at org.h2.Driver.connect(Driver.java:69)
at org.h2.util.JdbcUtils.getConnection(JdbcUtils.java:300)
at org.h2.util.JdbcUtils.getConnection(JdbcUtils.java:274)
at org.h2.table.TableLinkConnection.open(TableLinkConnection.java:89)
at org.h2.table.TableLinkConnection.open(TableLinkConnection.java:79)
at org.h2.engine.Database.getLinkConnection(Database.java:2708)
at org.h2.table.TableLink.connect(TableLink.java:96)
at org.h2.table.TableLink.(TableLink.java:79)
at org.h2.schema.Schema.createTableLink(Schema.java:745)
at org.h2.command.ddl.CreateLinkedTable.update(CreateLinkedTable.java:77)
at org.h2.command.CommandContainer.update(CommandContainer.java:133)
at org.h2.command.Command.executeUpdate(Command.java:267)
at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:169)
at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:126)
=============================================================
Problem 3:
Cannot connect to Oracle19c when creating linked table.
CREATE LOCAL TEMPORARY LINKED TABLE IF NOT EXISTS TABLEB (
'',
'jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL =
TCP)(HOST = 1.2.3.4)(PORT = 1630)) (ADDRESS = (PROTOCOL = TCP)(HOST =
4.3.2.1)(PORT = 1531))) (SOURCE_ROUTE = yes) (CONNECT_DATA = (SERVICE_NAME
= O19CDB)))',
'userid',
'password',
'schema.TABLEA'
) READONLY;
The error message is:
General error: java.lang.IndexOutOfBoundsException (Error Type: org.h2.jdbc.JdbcSQLNonTransientException)
at org.h2.util.JdbcUtils.getconnection(String str1, String str2, String str3, String str4, NetworkConnectionInfo nci, Boolean b)
at org.h2.util.JdbcUtils.getconnection(String str1, String str2, String str3, String str4)
at org.h2.table.TableLinkConnection.open()
==========================================
I can do all the 3 steps using SQuirreL SQL.
Beta Was this translation helpful? Give feedback.
All reactions