Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

JZ006 - Caught IOException

2 posts in JConnect version 3.0 Last posting was on 1998-11-06 22:50:35.0Z
Brian Hirsch Posted on 1998-11-03 22:07:40.0Z
Message-ID: <363F7EAB.ECD569E7@mmm.com>
Date: Tue, 03 Nov 1998 16:07:40 -0600
From: Brian Hirsch <bdhirsch@mmm.com>
X-Mailer: Mozilla 4.04 [en]C-3M/NCStd404 (WinNT; I)
MIME-Version: 1.0
Subject: JZ006 - Caught IOException
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 66
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jconnect30:367
Article PK: 255737

I'm experiencing alot of difficultity getting connected
to an Sybase Open Server with Jconnect 3.0. I had it working several
weeks ago, then I started getting the JZ006 Caught IOException.

I can connect to our Sybase databases and execute sql statements, but
can't connect to an Open Server. I can connect to the Open Server in
PowerBuilder, isql, and I can ping it. I have the entries correct
in my sql.ini file.

Last Thursday I read in this forum that upgrading to Jconnect 4.0 was
recommended for someone else getting the JZ006, so
I upgraded. It solved the problem on Thursday and I was connecting.
But on Friday, the first time I tried it, I was back to the JZ006
message. (details below)

I tried the suggestion of creating the Socket class as below:
Socket s = new Socket("XAPPDEV3",2093);

This also fails with:
java.net.UnknownHostException: XAPPDEV3

Does anyone know how to increase the statement cache size as the
documentation suggests for this exception?


Any help would be greatly appreciated. Thank you
Brian Hirsch


Below are the details of what I am doing in trying to connect:

< note: this code works fine if I try to connect to a Sybase
database.>
.
.
Connection jdbcCon = null;
Properties jdbcProps = new Properties();

jdbcProps.put("user", aJDBCLoginInfo.getUserId());
jdbcProps.put("password", aJDBCLoginInfo.getPassword());
String url = "jdbc:sybase:Tds:XAPPDEV3:2093?USE_METADATA=false";

try {
// load jdbc driver
Class.forName("com.sybase.jdbc.SybDriver").newInstance();
}
catch (ClassNotFoundException cnfe) {
String s = "Could not find/load the 'com.sybase.jdbc.SybDriver'
class.";
throw new XapDBLogonException(s);
}
catch (InstantiationException instantE) {
throw new XapDBLogonException(instantE.getMessage());
}
catch (IllegalAccessException illegalE) {
throw new XapDBLogonException(illegalE.getMessage());
}

try {
Socket s = new Socket("XAPPDEV3",2093);
}
catch (java.net.UnknownHostException a) {
System.out.println("unknownhost: " + a);
}
catch (java.io.IOException b) {
System.out.println("io: " + b);
}

try {
// connect
jdbcCon = DriverManager.getConnection(url, jdbcProps);
}
catch (SQLException sqlE) {
System.out.println("sqlException after connect: " + sqlE);
throw new XapDBLogonException(sqlE.getMessage());
}



Here are the console results:
unknownhost: java.net.UnknownHostException: XAPPDEV3
sqlException after connect: java.sql.SQLException:
JZ006: Caught IOException: java.net.UnknownHostException:
XAPPDEV3

Thank you
Brian Hirsch


Brian Hirsch Posted on 1998-11-06 22:50:35.0Z
Message-ID: <36437D3A.558426C@mmm.com>
Date: Fri, 06 Nov 1998 16:50:35 -0600
From: Brian Hirsch <bdhirsch@mmm.com>
X-Mailer: Mozilla 4.04 [en]C-3M/NCStd404 (WinNT; I)
MIME-Version: 1.0
Subject: Re: JZ006 - Caught IOException RESOLVED
References: <363F7EAB.ECD569E7@mmm.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 72
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jconnect30:366
Article PK: 255735

This has been resolved. No reply is necessary. Thanks

Regards,
Brian Hirsch

Brian Hirsch wrote:

> I'm experiencing alot of difficultity getting connected
> to an Sybase Open Server with Jconnect 3.0. I had it working several
> weeks ago, then I started getting the JZ006 Caught IOException.
>
> I can connect to our Sybase databases and execute sql statements, but
> can't connect to an Open Server. I can connect to the Open Server in
> PowerBuilder, isql, and I can ping it. I have the entries correct
> in my sql.ini file.
>
> Last Thursday I read in this forum that upgrading to Jconnect 4.0 was
> recommended for someone else getting the JZ006, so
> I upgraded. It solved the problem on Thursday and I was connecting.
> But on Friday, the first time I tried it, I was back to the JZ006
> message. (details below)
>
> I tried the suggestion of creating the Socket class as below:
> Socket s = new Socket("XAPPDEV3",2093);
>
> This also fails with:
> java.net.UnknownHostException: XAPPDEV3
>
> Does anyone know how to increase the statement cache size as the
> documentation suggests for this exception?
>
> Any help would be greatly appreciated. Thank you
> Brian Hirsch
>
> Below are the details of what I am doing in trying to connect:
>
> < note: this code works fine if I try to connect to a Sybase
> database.>
> .
> .
> Connection jdbcCon = null;
> Properties jdbcProps = new Properties();
>
> jdbcProps.put("user", aJDBCLoginInfo.getUserId());
> jdbcProps.put("password", aJDBCLoginInfo.getPassword());
> String url = "jdbc:sybase:Tds:XAPPDEV3:2093?USE_METADATA=false";
>
> try {
> // load jdbc driver
> Class.forName("com.sybase.jdbc.SybDriver").newInstance();
> }
> catch (ClassNotFoundException cnfe) {
> String s = "Could not find/load the 'com.sybase.jdbc.SybDriver'
> class.";
> throw new XapDBLogonException(s);
> }
> catch (InstantiationException instantE) {
> throw new XapDBLogonException(instantE.getMessage());
> }
> catch (IllegalAccessException illegalE) {
> throw new XapDBLogonException(illegalE.getMessage());
> }
>
> try {
> Socket s = new Socket("XAPPDEV3",2093);
> }
> catch (java.net.UnknownHostException a) {
> System.out.println("unknownhost: " + a);
> }
> catch (java.io.IOException b) {
> System.out.println("io: " + b);
> }
>
> try {
> // connect
> jdbcCon = DriverManager.getConnection(url, jdbcProps);
> }
> catch (SQLException sqlE) {
> System.out.println("sqlException after connect: " + sqlE);
> throw new XapDBLogonException(sqlE.getMessage());
> }
>
> Here are the console results:
> unknownhost: java.net.UnknownHostException: XAPPDEV3
> sqlException after connect: java.sql.SQLException:
> JZ006: Caught IOException: java.net.UnknownHostException:
> XAPPDEV3
>
> Thank you
> Brian Hirsch