ClassFormatError when trying load InterClient

By: Quinn Wildman

Abstract: This error occurs when attempting to use InterClient version prior to 2.x with Java 2

InterClient versions included with InterBase prior InterBase 6 do no work with JDK 1.2 or later. If you run the CommDiag sample application from a web browser you get following error when connecting to an InterBase database:

SQL State: ICJE2
Error Code: 1
Message: [interclient] Communication error: A socket exception occurred while trying to establish a socket connection to server localhost. The message of the SocketException is "Connection refused".
See API reference for exception

If you attempt to run the CommDiag sample application from the command line it will result in the following error:

Exception in thread "main" java.lang.ClassFormatError: interbase/interclient/uti ls/CommDiag (Local variable name has bad constant pool index)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(
at 1)
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(

There are two ways to resolve this problem.

1. Get an earlier version of Java (1.x).
2. Get a later version of InterBase, which includes a later version of InterClient.

Server Response from: ETNASC03