--
Jason Hinsperger
International and Sustaining Engineering
iAnywhere Solutions
"Milton Taylor" <mcta...@ingennia.com.au> wrote in message
news:3CD9E89B...@ingennia.com.au...
> Hi, we've got a couple of minor issues that we've struck with JConnect
> 5.5 (and ASA 7.0.3) using JDK 1.4 which do not occur under 1.3.1.
>
> They're readily reproducible, simple cases, and we're not sure how to
> report these problems to the JConnect team. (Case Express does not have
> a specific way to log defects for JConnect).
>
> What do you suggest we do?
>
> Second question: jConnect 5.5 comes with two jars - jconn2.jar and
> jTDS2.jar. We'd like to know what makes use of the latter jar, since
> we've never had to use it. (I realise from the name that it's got db
> protocol layer stuff in it, but isn't this already in jconn2.jar?)
>
>
> Thanks,
> Milton Taylor
>
>
sybase.public.jconnect50
forum. They should be able to advice you on a number of
aspects from your post.
Also this may not be a bug but could be a JVM certification
question [I don't know that JConnect 5.5 has been certified with
JVM 1.4 yet].
Thanks for your response - I will post the issues to CaseExpress and copy them
in here.
Cheers,
Milton Taylor
Thanks...
Environment:
JDK 1.4.0 (GA)
ASA 7.0.3 EBF 2101
jConnect 5.5 EBF 10106
We don't know if this is a jConnect issue or an ASA issue - we suspect a
jConnect/JDK issue though.
The following test code merely tells JConnect to log to stdout, opens a
connection and then immediately closes it. The resulting output also below)
shows that although an exception is being printed, Connection.close() method
call is exiting normally (and hence no exception is actually propogating up
from the JConnection API.
The fact that JConnect is logging exceptions that it isn't propogating is bad,
since it's caused us to waste time trying to figure-out from where the
exception is coming. It also very unsettling knowing that an exception is
occuring but that our software can't detect it, trap it and respond.
TEST CASE
-------------
package jconnect;
import java.sql.*;
import java.util.Properties;
public class TestCase1
{
public static void main(String[] args)
{
try
{
Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
java.sql.DriverManager.setLogWriter(new
java.io.PrintWriter(System.out));
log("Opening connection");
Properties t_properties = new Properties();
t_properties.setProperty("user", "DBA");
t_properties.setProperty("password", "SQL");
t_properties.setProperty("CHARSET", "utf8");
t_properties.setProperty("USE_METADATA", "false");
Connection t_connection = java.sql.DriverManager.getConnection(
"jdbc:sybase:Tds:127.0.0.1:2638/demo",
t_properties
);
// Disconnect
log("Closing connection");
t_connection.close();
log("Closed OK");
}
catch(java.lang.ClassNotFoundException ex)
{
System.out.println("Cannot load Sybase driver class - "+ex);
}
catch(SQLException ex)
{
log("An exception has been thrown & caught.");
ex.printStackTrace();
}
}
private static void log(String message)
{
java.sql.DriverManager.println("--"+message);
}
}
end test case
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RESULTING OUTPUT
-------------------------
--Opening connection
DriverManager.getConnection("jdbc:sybase:Tds:127.0.0.1:2638/demo")
trying
driver[className=com.sybase.jdbc2.jdbc.SybDriver,com.sybase.jdbc2.jdbc.SybDriver@5224ee]
getConnection returning
driver[className=com.sybase.jdbc2.jdbc.SybDriver,com.sybase.jdbc2.jdbc.SybDriver@5224ee]
--Closing connection
java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0EM:
End of data.
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:493)
at
com.sybase.jdbc2.jdbc.ErrorMessage.raiseErrorCheckDead(ErrorMessage.java:729)
at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3107)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1876)
at com.sybase.jdbc2.tds.Tds.logout(Tds.java:617)
at com.sybase.jdbc2.jdbc.SybConnection.close(SybConnection.java:782)
at jconnect.TestCase1.main(TestCase1.java:32)
SQLException: SQLState(JZ006)
--Closed OK
end resulting output
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Attached is the correct testcase...
There are actually two separate exceptions: one at time of making a DB connection, and a
different one when the connection is closed.
Cheers,
Milton Taylor