Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8924321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:22:49+00:00 2026-06-15T07:22:49+00:00

I wrote a Java package which connects to a SQL Server database using JDBC

  • 0

I wrote a Java package which connects to a SQL Server database using JDBC and integrated security. This package runs just as intended from my Java IDE. Now I’m trying to access some classes in this package from a separate .NET app using IKVM.

However, now I’m getting an ExceptionInInitializerError in the .NET app, and the stack trace shows that this error occurs during the database connection initialization.

I created an app.config file for the .NET app to add the JDBC driver to the Java library path using:

<add key="ikvm:java.library.path" value="C:\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\auth\x64"/>

I tried altering the \x64 to \x86 (using the 32-bit auth dll rather than the 64-bit), and I received the exact same error, which I thought was odd. Then I removed this line from the app.config and received a “Failed to load the sqljdbc_auth.dll” warning with a “This driver is not configured for integrated authentication.” SQLServerException.

I migrated the database connection code over into VB.NET/IKVM and recreated the original error using these four lines:

Dim connectionUrl As String = "jdbc:sqlserver://db\instance;integratedsecurity=true"
Dim driver As String = "com.microsoft.sqlserver.jdbc.SQLServerDriver"     
java.sql.DriverManager.registerDriver(New com.microsoft.sqlserver.jdbc.SQLServerDriver())
Dim dbConn As java.sql.Connection = java.sql.DriverManager.getConnection(connectionUrl)

So, I’m pretty sure that, if I can get these four lines working, my problem should be solved. Anybody have any ideas? Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:22:51+00:00Added an answer on June 15, 2026 at 7:22 am

    The way to track down what’s going on is to print the exception (to the console) using the Java Throwable.printStackTrace() method. That way you get the underlying cause.

    Try
       ...
    Catch x as java.lang.ExceptionInInitializerError
       x.printStackTrace()
    End Try
    

    My guess is that tThis will show that the problem is that you forgot to copy ikvm-native-win32-x86.dll (or ikvm-native-win32-x64.dll) to your application directory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote this Java hadoop program which will execute parallel indexation of files.The file
I wrote this Java hadoop program which will execute parallel indexation of files.The file
I wrote a peer-to-peer networked game in Java using the java.net package and for
I am new to java.util.concurrent package and wrote a simple method which fetches some
I had created a Proxy Server (Fwd and Reverse) using Java sockets. which would
I just want to output current and I wrote import java.util.*; at beginning, and
I wrote two small java programs: a TCP client which sends many lines of
I am building a client server application using Java Sockets (in Windows XP). For
I usually do all my java development on linux, using fedora package manager setting
Consider this example: There is a class named 'first', which is defined in package

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.