ikvmnet / ikvm

A Java Virtual Machine and Bytecode-to-IL Converter for .NET
Other
1.28k stars 121 forks source link

Using IKVM with SQLite #596

Open tyom77 opened 2 months ago

tyom77 commented 2 months ago

Hi, I am trying to use IKVM for converting a java service using SQLite. You can find the sources in this repo I am using it in 2 ways,

  1. SQLite only Usage:
    <ItemGroup>
    <PackageReference Include="IKVM" Version="8.10.1" />
    <PackageReference Include="IKVM.Maven.Sdk" Version="1.8.2" />
    <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1" />
    <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240802000" />
    <Manifest Include="$(ApplicationManifest)" />
    </ItemGroup>
    <ItemGroup>
    <IkvmReference Include="..\sqlite-ikvm-poc\sqlite-service\build\libs\sqlite-service-1.0.0.jar">
        <AssemblyName>MyAssembly</AssemblyName>
        <AssemblyVersion>1.0.0</AssemblyVersion>
        <AssemblyFileVersion>1.0.0</AssemblyFileVersion>
        <Compile>..\sqlite-ikvm-poc\sqlite-service\build\libs\sqlite-service-1.0.0.jar</Compile>
    </IkvmReference>
    <MavenReference Include="org.xerial:sqlite-jdbc" Version="3.42.0.0" />
    </ItemGroup>

    Branch: sqlite-only Error: An exception of type 'java.lang.UnsatisfiedLinkError' occurred in sqlite.jdbc.dll but was not handled in user code org/sqlite/core/NativeDB._open_utf8([BI)V

  2. SQLite with flyway Usage:
    <ItemGroup>
    <PackageReference Include="IKVM" Version="8.10.1" />
    <PackageReference Include="IKVM.Maven.Sdk" Version="1.8.2" />
    <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1" />
    <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240802000" />
    <Manifest Include="$(ApplicationManifest)" />
    </ItemGroup>
    <ItemGroup>
    <IkvmReference Include="..\sqlite-ikvm-poc\sqlite-service\build\libs\sqlite-service-1.0.0.jar">
        <AssemblyName>MyAssembly</AssemblyName>
        <AssemblyVersion>1.0.0</AssemblyVersion>
        <AssemblyFileVersion>1.0.0</AssemblyFileVersion>
        <Compile>..\sqlite-ikvm-poc\sqlite-service\build\libs\sqlite-service-1.0.0.jar</Compile>
    </IkvmReference>
    <MavenReference Include="org.xerial:sqlite-jdbc" Version="3.42.0.0" />
    <MavenReference Include="org.flywaydb:flyway-core" Version="9.16.1" />
    <MavenReference Include="org.mybatis:mybatis" Version="3.5.11" />
    </ItemGroup>

    Branch: sqlite-with-flyway Error: An exception of type 'java.lang.UnsatisfiedLinkError' occurred in org.flywaydb.core.dll but was not handled in user code org/sqlite/core/NativeDB._open_utf8([BI)V

Could you please take a look, what am I doing wrong?

tyom77 commented 1 month ago

Hi guys,

I would like to use this but still cannot find any solution. Do you need any other information from my side to check this issue?

Could you please let me know what can I do to help you to make this work?

Thanks