Why am I seeing this error? I was seeing the same “build does not match” error on a different Java/SQL Anywhere application using a recent build of SQL Anywhere, so tried the demo below and got the same result. I uninstalled SQL Anywhere and re-installed 16.0.0.1324 (which is an install I had lying around) and still see the error. c:\Users\Public\Documents\SQL Anywhere 16\Samples\SQLAnywhere\JDBC>which javac c:\program files\java\jdk1.7.0_25\bin\javac.exe c:\Users\Public\Documents\SQL Anywhere 16\Samples\SQLAnywhere\JDBC>dbsrv16 ..\..\demo.db c:\Users\Public\Documents\SQL Anywhere 16\Samples\SQLAnywhere\JDBC>set classpath=.;%SQLANY16%\java\sajdbc4.jar c:\Users\Public\Documents\SQL Anywhere 16\Samples\SQLAnywhere\JDBC>javac JDBCConnect.java c:\Users\Public\Documents\SQL Anywhere 16\Samples\SQLAnywhere\JDBC>java JDBCConnect **Unexpected exception : java.sql.SQLException: The sajdbc.jar build does not match the shared object build, sqlstate = null** c:\Users\Public\Documents\SQL Anywhere 16\Samples\SQLAnywhere\JDBC>dbeng16 -v [dialog shows 16.0.0.1324] asked 23 Feb '14, 20:37 Tom Slee |
The error is a result of having a dbjdbc16.dll which does not match the build of the jar file in my path ahead of that from the SQL Anywhere install; in my case, from an IQ install. Fixed by set path=%SQLANY16%\bin64;%PATH% answered 23 Feb '14, 20:39 Tom Slee Karim has posed and answered a more general form of this question at http://sqlanywhere-forum.sap.com/questions/5404/what-to-do-when-you-get-the-message-jar-build-does-not-match-the-shared-object-build.
(23 Feb '14, 22:24)
Tom Slee
|