<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Arial">As a correction, the string error I am seeing is
"invalid property values"</font><br>
<br>
Andy Warner wrote:
<blockquote cite="mid:49C90E65.6000104@klemata.com" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<font face="Arial">Nick,<br>
<br>
Thanks for your help. strace revealed that the jdbc bridge was looking
for </font><font face="Arial">libodbcins.so but I had no </font><font
face="Arial">/usr/lib/libodbcins.so link, only had </font><font
face="Arial">libodbcins.so1 and </font><font face="Arial">libodbcins.so.1.0.1.
I am not sure why as as far as I know this was a standard install for
CentOS5.2 from the rpm package. Could this be missing from the install?
<br>
<br>
I added a link for libodbcins.so and now it will communicate with the
unixODBC driver. However, when the SQLDriverConnect function is called
it fails. The unixODBC driver never calls my odbc driver function. So,
it seems to be failing within unixodbc before it calls my function (The
error message is simply "General Error"). <br>
<br>
I logged the failed call to SQLDriverConnect and then used Base to make
a direct odbc connection (eliminating the bridge) with the same DNS.
The latter succeeded. I compared the two log entries (which I included
below) and found one thing that seems to stand out. In the failed call
to SQLDriverConnect they do not seem to terminate the PWD attribute
with a semi-colon. In the one that succeeds, it is terminated with a
semi-colon. Do you believe this would cause the unixODBC
SQLDriverConnect function to fail?<br>
<br>
<b>The failed call to SQLDriverConnect:</b><br>
<br>
[ODBC][11698][SQLDriverConnect.c][678]<br>
Entry: <br>
Connection = 0x997bee0 <br>
Window Hdl = (nil) <br>
Str In =
[DSN=rubix-hrast;UID=rxdev;PWD=*******][length <br>
= 37 (SQL_NTS)] <br>
Str Out = 0xbf873a80 <br>
Str Out Max = 256 <br>
Str Out Ptr = 0xbf873a7e <br>
Completion = 0<br>
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE
'UCS-2LE'<br>
<br>
[ODBC][11698][SQLDriverConnect.c][1258]<br>
Exit:[SQL_ERROR]<br>
[ODBC][11698][SQLError.c][424]<br>
Entry: <br>
Connection = 0x997bee0 <br>
SQLState = 0x988f188 <br>
Native = 0xbf873aa0 <br>
Message Text = 0x997d258 <br>
Buffer Length = 300 <br>
Text Len Ptr = 0xbf873aa6<br>
[ODBC][11698][SQLError.c][461]<br>
Exit:[SQL_NO_DATA]<br>
</font><br>
<b>The successful call to SQLDriverConnect:</b><br>
<br>
[ODBC][11698][SQLDriverConnect.c][678]<br>
Entry: <br>
Connection = 0x98a7c68 <br>
Window Hdl = (nil) <br>
Str In =
[DSN=rubix-hrast;UID=rxdev;PWD=*******;][length<br>
= 38] <br>
Str Out = 0xbf8738b8 <br>
Str Out Max = 4095 <br>
Str Out Ptr = 0xbf8738b6 <br>
Completion = 0<br>
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE
'UCS-2LE'<br>
<br>
[ODBC][11698][SQLDriverConnect.c][1487]<br>
Exit:[SQL_SUCCESS] <br>
<br>
Nick Gorham wrote:
<blockquote cite="mid:49C8FC1A.8010404@lurcher.org" type="cite">Andy
Warner wrote: <br>
<br>
<blockquote type="cite">The error I am getting from a product
called
JAMWiki is below. I get the same error when I used OpenOfice Base. The
error does not change if the DSN is valid or not. No log files are
being created, which leads me to believe that libodbc.so is not being
invoked (I have logging/tracing enabled for unixODBC and the driver). <br>
<br>
java.lang.NullPointerException <br>
at
sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436) <br>
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
<br>
at java.sql.DriverManager.getConnection(DriverManager.java:582) <br>
at java.sql.DriverManager.getConnection(DriverManager.java:185) <br>
at
org.jamwiki.db.DatabaseConnection.getTestConnection(DatabaseConnection.java:323)
<br>
<br>
You mentioned that you thought it was "just a case of making sure the
JVM could load libodbc.so" Is there anything that must be done to allow
a JVM to access a library such as this? I just assumed that having the
library in a well known place (/usr/lib) and having it world
readable/executable is enough. I am not very familiar with java, are
you aware of anything like an env variable that must be set? <br>
<br>
Thanks for any help, <br>
<br>
</blockquote>
I would check that the jvm and your libodbc are both the same bit
length (32/64). Also possibly try using strace to see what libs java is
trying to load, and from where. <br>
<br>
</blockquote>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
unixODBC-support mailing list
<a class="moz-txt-link-abbreviated" href="mailto:unixODBC-support@mailman.unixodbc.org">unixODBC-support@mailman.unixodbc.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support">http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support</a>
</pre>
</blockquote>
</body>
</html>