The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

We have a problem with a third party Java application (we don't have the source) which tries to connect to our SQL Anywhere database using such connect string:

jdbc:ianywhere:ENG=demo;DBN=demo;UID=uid;PWD=pwd;LINKS=TCPIP;CON=conn name;DRIVER=SQL Anywhere 11;LOG=db.log
We have never had such a problem with that application before (it worked for some years before with ASA9, SA10, SA11, SA12). I'm not sure if that could be the reason but last weekend we had a loss of power so all machines were down. But after restart everything works fine except that application. I've put a LOG parameter in connect string but db.log file was not generated. The log of that application shows:
Could not initialize class
I tried to copy that application to another machine - it DOES connect successfully. So I tried to look for differences in environment variables (both machines run Windows OS) but nothing suspicious was found. What else should be checked? Thanks.

asked 25 Jan '12, 10:19

Arthoor's gravatar image

accept rate: 0%

edited 25 Jan '12, 10:20

Could not initialize class

This message could either be related to:

A reminder that if you're using a 64-bit Java Virtual Machine (JVM), you need to deploy the 64-bit 'dbjdbc##.dll' file, and if you're using the 32-bit JVM, the 32-bit 'dbjdbc##.dll' file.

permanent link

answered 25 Jan '12, 11:16

Jeff%20Albion's gravatar image

Jeff Albion
accept rate: 24%

edited 26 Jan '12, 14:22

Well, dbjdbc11.dll exists in C:\Program Files\SQL Anywhere 12\Bin32. And this directory is included in the PATH environment variable in both machines. The jdbc3.jar file does not exist in any of these 2 machines. More ideas?

(26 Jan '12, 01:52) Arthoor
Replies hidden

Sorry, that was my mistake - the filenames in my original response were incorrect. Let me try a new response again and edit my original response...

I meant to say you need the files "jodbc.jar" (not "jdbc3.jar") and "dbjodbc11.dll" (not "dbjdbc11.dll") in your installation.


The jdbc3.jar file does not exist in any of these 2 machines.

Does "jodbc.jar" exist and is it in your CLASSPATH for your Java application?

dbjdbc11.dll exists in C:\Program Files\SQL Anywhere 12\Bin32

Does dbjodbc11.dll also exist?

Can you confirm if you are launching a 32-bit JVM for your application? (e.g. What does 'java -version' report:)

  • Java HotSpot(TM) Client VM
  • Java HotSpot(TM) Server VM
  • Java HotSpot(TM) 64-bit Server VM

(26 Jan '12, 14:04) Jeff Albion

jodbc.jar exists in both machines in all SQL Anywhere directories (9,10, 11, 12) and in IQ directory in the "faulty" machine. CLASSPATH environment variable does not exist in any of these machines.

dbjodbc11.dll also exists in both machines.

'java -version' returns the same results in both machines:

java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode, sharing)

(27 Jan '12, 05:08) Arthoor

Since IQ includes SQL Anywhere 11, there can sometimes be conflicts when both are installed. Just a thought...

(27 Jan '12, 10:32) Graham Hurst
Comment Text Removed

and in IQ directory in the "faulty" machine.

Is there a 'dbjodbc11.dll' also in the IQ directory? Is the IQ directory included in the PATH? Does the IQ directory appear before or after the SQL Anywhere directory in the PATH?

(27 Jan '12, 14:06) Jeff Albion

Yes, dbjodbc11.dll exists in IQ directory too. IQ directory was the first in the PATH.
I tried to remove IQ directory from the PATH (and rebooted after that) but it did not help.

(30 Jan '12, 02:58) Arthoor

As the PATH variable can have both system-specific and user-specific settings: Could this play a role in your case?

And note that environment variables can be set differently for different processes...

(30 Jan '12, 03:15) Volker Barth

I've found jodbc.jar file in one of that mystical application's directories too. So I copied the newer version of that file from SQL Anywhere 12 directory - it works. :)

(09 Aug '12, 04:00) Arthoor
showing 1 of 8 show all flat view
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 25 Jan '12, 10:19

question was seen: 1,592 times

last updated: 09 Aug '12, 04:02