I was working on IKVM 7.2.4630.5 + H2 1.4.199.jar + ojdbc6.jar + vs2019 + 
net472

Everything is fine with these steps:
1. use ikvmc, generated H2.1.4.199.dll by merging ojdbc6.jar into a single 
dll file.
2. in my project, refer to H2.1.4.199.dll and copy ikvm runtime files into 
bin folder
3. at app startup, load register oracle driver 
java.sql.DriverManager.registerDriver(OJDBC_OracleDatabaseDriver);
4. load h2 driver
5. I could create a database, connect to it using readonly / readwrite mode
6. I can create linked table to another h2 database or oracle 19c, load any 
table into my h2 database.

Now I'm trying to upgrade my project to
IKVM 8.7.5 + H2 2.2.220 + ojdbc8.jar + vs2019 + net472
(where IKVM 8.7.5 (JDK8u92-B34) support up to H2 2.2.220)
and wired thing is found.

Problem 1: with IKVM 8.7.5, I can generate the merged dll again, but I'm 
not sure the IkvmReference setting is correct. Please give any comment and 
advice.

Detail:
    <ItemGroup>
        <IkvmReference Include="jar\ojdbc8.jar">
            <AssemblyName>o8</AssemblyName>
            <AssemblyVersion>1.0.0.8</AssemblyVersion>
        </IkvmReference>        
        
        <IkvmReference Include="jar\h2-2.2.220.jar">
            <AssemblyName>h2.2.2.220.8</AssemblyName>
            <AssemblyVersion>2.2.220.8</AssemblyVersion>
            <Compile>jar\ojdbc8.jar</Compile>
            <Reference>jar\ojdbc8.jar</Reference>
            
<ClassLoader>ikvm.runtime.AppDomainAssemblyClassLoader</ClassLoader>
        </IkvmReference>
    </ItemGroup>

With this setting, I got a single h2.2.2.220.8.dll by merging ojdbc8 into 
it.
and the output o8.dll is not needed.
=========================================

using the dll file, I could create a DB using connection string
jdbc:h2:file:C:\WIP\YDB01A;USER=aaaa;PASSWORD=aaaa;ACCESS_MODE_DATA=rw;CASE_INSENSITIVE_IDENTIFIERS=TRUE
create a table DDD, insert some records, then close the database.

If I connect the database again using readonly mode, I can query the table 
DDD
connection string 
:jdbc:h2:file:C:\WIP\YDB01A;USER=cmls;PASSWORD=8432ufht;ACCESS_MODE_DATA=r;IFEXISTS=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE

Problem 2. I'm not sure the step is correct. steps:
a. generate the merged dll file.
b. in bin folder, include ikvm folder, include runtime folder.
c. load oracle driver
d. load h2 driver.
e. anything else to do?

Problem 3. If connecting the database using readwrite mode, the table DDD 
is deleted.
error: table DDD is not found. and it never go back even using read only 
mode.

I can create linked table to another h2 database
Problem 4. I can not create linked table in oracle 19c, the error 
is java.lang.IndexOutOfBoundsException

detail:
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; 

please give any advice. I got stuck for 2 weeks. T_T

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/9b007c97-331f-4053-a8da-34b03e5fde63n%40googlegroups.com.

Reply via email to