Is This Content Helpful?
We're glad to know this article was helpful.
ODE for Java applications throw an AiVersionMismatchException on startup.
In order to facilitate the use of ODE for Java in a Java applet, it is common to place ode.jar in the JRE's lib/ext directory. If, later, you start using a newer version of ArcInfo, you should be sure to replace the lib/ext copy of ode.jar. Failure to do so results in ODE throwing the AiVersionMismatchException. This exception is meant to prevent you from accidentally running one version of ode.jar with another version of ArcInfo.
Possible cause #1:
The ode.jar file for a previous version of ArcInfo was set up as an installed extension in your Java runtime, but was not removed or replaced when a newer version of ArcInfo was installed.
Possible cause #2:
At ArcInfo version 8.2, a faulty copy of ode.jar was deployed on Windows. This faulty ode.jar causes ODE for Java to always throw an AiVersionMismatchException at startup.
-- Solution #1:
Delete or replace ode.jar in the JRE's lib/ext directory. If you have both the JRE and Java 2 SDK installed, it is possible to have ode.jar set up as an installed extension in both. Be sure to delete or replace ode.jar from both locations.
-- Solutions #2:
1. This solution applies if you have ArcInfo version 8.2 on Solaris or Tru64. Replace the defective Windows copy of ode.jar (found in
%ARCHOME%\bin) with a copy of ode.jar found in Solaris or Tru64 at $ARCHOME/lib.
2. If you do not have ArcInfo version 8.2 on either Solaris or Tru64, you can download a copy of ode.jar from the Related section below. Replace %ARCHOME%\bin\ode.jar with the downloaded file.
3. Solutions #1 and #2 both require you to have write access to the files in %ARCHOME%. If you do not have write access, you can work around the problem for yourself (without fixing it for everyone). Make a local copy of the correct ode.jar file, then make sure this ode.jar file is placed before the faulty ode.jar in both your CLASSPATH and any application startup scripts that reference ode.jar.
4. Any application can be made immune to this problem by using a try/catch block to catch and ignore the AiVersionMismatchException. The drawback to this is that the application could later experience problems if an installed-extension version of ode.jar does not get updated to match an ArcInfo version upgrade.