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.

closing connection causes error in log of Adaptive Server 11.9.2

4 posts in JConnect version 3.0 Last posting was on 1999-04-29 17:45:35.0Z
Patrick Poovey Posted on 1999-04-29 15:11:02.0Z
Message-ID: <37287686.C757D0E7@wcom.com>
Date: Thu, 29 Apr 1999 11:11:02 -0400
From: Patrick Poovey <patrick.poovey@wcom.com>
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: closing connection causes error in log of Adaptive Server 11.9.2
Content-Type: multipart/alternative; boundary="------------33343D79F7B5DB1F7F74E686"
Newsgroups: sybase.public.jconnect30,sybase.public.jconnect40,sybase.public.jconnect50
Lines: 146
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:267 sybase.public.jconnect40:209 sybase.public.jconnect50:214
Article PK: 255759

Everytime I call: conn.close(); I get  the following error in the database error log:

00:00000:00014:1999/04/29 14:23:00.30 kernel  Cannot send, host process disconnected:   spid: 14
00:00000:00014:1999/04/29 14:23:00.32 server  Error: 1608, Severity: 18, State: 3
00:00000:00014:1999/04/29 14:23:00.32 server  A client process exited abnormally, or a network error was encountered. Unless other errors occurred, continue processing normally.

I am executing the following file:

import java.lang.Math;
import java.lang.String;
import java.sql.*;

class TestSQL {

 public static void main (String args[]) {

  String url = "jdbc:sybase:Tds:IP:PORT/dbname";
  try {
   Class.forName ("com.sybase.jdbc.SybDriver");
   Connection con = DriverManager.getConnection (url, "user", "pass" );
   Statement stmt = con.createStatement ();
   ResultSet rs = stmt.executeQuery ("select phone_type_code from phone_type");
   printResultSet (rs);
   rs.close();
   stmt.close();
   con.close();     //<-------------------------------------Error occcurs here
  }
  catch (SQLException ex) {
   while (ex != null) {
    System.out.println ("SQL Exception:   " + ex.getMessage ());
    ex = ex.getNextException ();
   }
  }
  catch (java.lang.Exception ex) {
   ex.printStackTrace ();
  }
 }

 private static void printResultSet (ResultSet rs) throws SQLException {

  int numRows = 0;
  int numCols = rs.getMetaData().getColumnCount ();
  ResultSetMetaData md = rs.getMetaData();
  for (int i=1; i<=numCols; i++) {
    System.out.print(md.getColumnLabel(i) + " | ");
  }
  System.out.println();
  while (rs.next()) {
   numRows++;
   for (int i=1; i<=numCols; i++) {
    System.out.print(rs.getString(i) + " | ");
   }
   System.out.println();
  }
  System.out.println();
  System.out.println(numRows + " rows displayed");
 }
}

I there a more graceful way to close the connection or is this just a fact of life??

This is a particular pain due to the growth of the error file. ~ 1 MB/day

Thanks in advance,

Patrick

PS. Please copy patrick.poovey@wcom.com on reply.


Lance Andersen Posted on 1999-04-29 17:41:52.0Z
Message-ID: <372899E0.36DE3CC@sybase.com>
Date: Thu, 29 Apr 1999 13:41:52 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 4.51 [en] (X11; I; SunOS 5.7 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: closing connection causes error in log of Adaptive Server 11.9.2
References: <37287686.C757D0E7@wcom.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30,sybase.public.jconnect40,sybase.public.jconnect50
Lines: 74
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:266 sybase.public.jconnect40:208 sybase.public.jconnect50:213
Article PK: 254589

Are You on Aix?

If so, there appears to be an ASE problem which is logged under
CR#168537

This problem was encountered on ASE 11.5.x

Regards,
Lance

Team Sybase

Patrick Poovey wrote:
>
> Everytime I call: conn.close(); I get the following error in the
> database error log:
>
> 00:00000:00014:1999/04/29 14:23:00.30 kernel Cannot send, host
> process disconnected: spid: 14
> 00:00000:00014:1999/04/29 14:23:00.32 server Error: 1608, Severity:
> 18, State: 3
> 00:00000:00014:1999/04/29 14:23:00.32 server A client process exited
> abnormally, or a network error was encountered. Unless other errors
> occurred, continue processing normally.
>
> I am executing the following file:
>
> import java.lang.Math;
> import java.lang.String;
> import java.sql.*;
>
> class TestSQL {
>
> public static void main (String args[]) {
>
> String url = "jdbc:sybase:Tds:IP:PORT/dbname";
> try {
> Class.forName ("com.sybase.jdbc.SybDriver");
> Connection con = DriverManager.getConnection (url, "user", "pass"
> );
> Statement stmt = con.createStatement ();
> ResultSet rs = stmt.executeQuery ("select phone_type_code from
> phone_type");
> printResultSet (rs);
> rs.close();
> stmt.close();
> con.close(); //<-------------------------------------Error
> occcurs here
> }
> catch (SQLException ex) {
> while (ex != null) {
> System.out.println ("SQL Exception: " + ex.getMessage ());
> ex = ex.getNextException ();
> }
> }
> catch (java.lang.Exception ex) {
> ex.printStackTrace ();
> }
> }
>
> private static void printResultSet (ResultSet rs) throws SQLException
> {
>
> int numRows = 0;
> int numCols = rs.getMetaData().getColumnCount ();
> ResultSetMetaData md = rs.getMetaData();
> for (int i=1; i<=numCols; i++) {
> System.out.print(md.getColumnLabel(i) + " | ");
> }
> System.out.println();
> while (rs.next()) {
> numRows++;
> for (int i=1; i<=numCols; i++) {
> System.out.print(rs.getString(i) + " | ");
> }
> System.out.println();
> }
> System.out.println();
> System.out.println(numRows + " rows displayed");
> }
> }
>
> I there a more graceful way to close the connection or is this just a
> fact of life??
>
> This is a particular pain due to the growth of the error file. ~ 1
> MB/day
>
> Thanks in advance,
>
> Patrick
>
> PS. Please copy patrick.poovey@wcom.com on reply.

--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Product Support Engineering Phone:(781) 564-6336
77 South Bedford Street Fax: (781) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================


Patrick Poovey Posted on 1999-04-29 17:41:41.0Z
Message-ID: <372899D5.B5281F84@wcom.com>
Date: Thu, 29 Apr 1999 13:41:41 -0400
From: Patrick Poovey <patrick.poovey@wcom.com>
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Lance Andersen <lancea@sybase.com>
Subject: Re: closing connection causes error in log of Adaptive Server 11.9.2
References: <37287686.C757D0E7@wcom.com> <372899E0.36DE3CC@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30,sybase.public.jconnect40,sybase.public.jconnect50
Lines: 80
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:265 sybase.public.jconnect40:207 sybase.public.jconnect50:212
Article PK: 255760

No, I am on DEC Unix 4.0D and ASE 11.9.2

Lance Andersen wrote:

> Are You on Aix?
>
> If so, there appears to be an ASE problem which is logged under
> CR#168537
>
> This problem was encountered on ASE 11.5.x
>
> Regards,
> Lance
>
> Team Sybase
> Patrick Poovey wrote:
> >
> > Everytime I call: conn.close(); I get the following error in the
> > database error log:
> >
> > 00:00000:00014:1999/04/29 14:23:00.30 kernel Cannot send, host
> > process disconnected: spid: 14
> > 00:00000:00014:1999/04/29 14:23:00.32 server Error: 1608, Severity:
> > 18, State: 3
> > 00:00000:00014:1999/04/29 14:23:00.32 server A client process exited
> > abnormally, or a network error was encountered. Unless other errors
> > occurred, continue processing normally.
> >
> > I am executing the following file:
> >
> > import java.lang.Math;
> > import java.lang.String;
> > import java.sql.*;
> >
> > class TestSQL {
> >
> > public static void main (String args[]) {
> >
> > String url = "jdbc:sybase:Tds:IP:PORT/dbname";
> > try {
> > Class.forName ("com.sybase.jdbc.SybDriver");
> > Connection con = DriverManager.getConnection (url, "user", "pass"
> > );
> > Statement stmt = con.createStatement ();
> > ResultSet rs = stmt.executeQuery ("select phone_type_code from
> > phone_type");
> > printResultSet (rs);
> > rs.close();
> > stmt.close();
> > con.close(); //<-------------------------------------Error
> > occcurs here
> > }
> > catch (SQLException ex) {
> > while (ex != null) {
> > System.out.println ("SQL Exception: " + ex.getMessage ());
> > ex = ex.getNextException ();
> > }
> > }
> > catch (java.lang.Exception ex) {
> > ex.printStackTrace ();
> > }
> > }
> >
> > private static void printResultSet (ResultSet rs) throws SQLException
> > {
> >
> > int numRows = 0;
> > int numCols = rs.getMetaData().getColumnCount ();
> > ResultSetMetaData md = rs.getMetaData();
> > for (int i=1; i<=numCols; i++) {
> > System.out.print(md.getColumnLabel(i) + " | ");
> > }
> > System.out.println();
> > while (rs.next()) {
> > numRows++;
> > for (int i=1; i<=numCols; i++) {
> > System.out.print(rs.getString(i) + " | ");
> > }
> > System.out.println();
> > }
> > System.out.println();
> > System.out.println(numRows + " rows displayed");
> > }
> > }
> >
> > I there a more graceful way to close the connection or is this just a
> > fact of life??
> >
> > This is a particular pain due to the growth of the error file. ~ 1
> > MB/day
> >
> > Thanks in advance,
> >
> > Patrick
> >
> > PS. Please copy patrick.poovey@wcom.com on reply.
>
> --
> ===============================================================================
> Lance J. Andersen Email: lancea@sybase.com
> Sybase Product Support Engineering Phone:(781) 564-6336
> 77 South Bedford Street Fax: (781) 564-6148
> Burlington, MA 01803
>
> The Dark Knight Returns!!! Let's Go Penguins!!!
> ===============================================================================


Lance Andersen Posted on 1999-04-29 17:45:35.0Z
Message-ID: <37289ABF.37B887CD@sybase.com>
Date: Thu, 29 Apr 1999 13:45:35 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 4.51 [en] (X11; I; SunOS 5.7 sun4m)
X-Accept-Language: en
MIME-Version: 1.0
To: Patrick Poovey <patrick.poovey@wcom.com>
Subject: Re: closing connection causes error in log of Adaptive Server 11.9.2
References: <37287686.C757D0E7@wcom.com> <372899E0.36DE3CC@sybase.com> <372899D5.B5281F84@wcom.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect40,sybase.public.jconnect50,sybase.public.jconnect30
Lines: 100
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect40:226 sybase.public.jconnect50:215 sybase.public.jconnect30:1695
Article PK: 255136

I suspect it is the same problem. Please log a case with tech support
referencing the bug below:

Patrick Poovey wrote:
>
> No, I am on DEC Unix 4.0D and ASE 11.9.2
>
> Lance Andersen wrote:
>
> > Are You on Aix?
> >
> > If so, there appears to be an ASE problem which is logged under
> > CR#168537
> >
> > This problem was encountered on ASE 11.5.x
> >
> > Regards,
> > Lance
> >
> > Team Sybase
> > Patrick Poovey wrote:
> > >
> > > Everytime I call: conn.close(); I get the following error in the
> > > database error log:
> > >
> > > 00:00000:00014:1999/04/29 14:23:00.30 kernel Cannot send, host
> > > process disconnected: spid: 14
> > > 00:00000:00014:1999/04/29 14:23:00.32 server Error: 1608, Severity:
> > > 18, State: 3
> > > 00:00000:00014:1999/04/29 14:23:00.32 server A client process exited
> > > abnormally, or a network error was encountered. Unless other errors
> > > occurred, continue processing normally.
> > >
> > > I am executing the following file:
> > >
> > > import java.lang.Math;
> > > import java.lang.String;
> > > import java.sql.*;
> > >
> > > class TestSQL {
> > >
> > > public static void main (String args[]) {
> > >
> > > String url = "jdbc:sybase:Tds:IP:PORT/dbname";
> > > try {
> > > Class.forName ("com.sybase.jdbc.SybDriver");
> > > Connection con = DriverManager.getConnection (url, "user", "pass"
> > > );
> > > Statement stmt = con.createStatement ();
> > > ResultSet rs = stmt.executeQuery ("select phone_type_code from
> > > phone_type");
> > > printResultSet (rs);
> > > rs.close();
> > > stmt.close();
> > > con.close(); //<-------------------------------------Error
> > > occcurs here
> > > }
> > > catch (SQLException ex) {
> > > while (ex != null) {
> > > System.out.println ("SQL Exception: " + ex.getMessage ());
> > > ex = ex.getNextException ();
> > > }
> > > }
> > > catch (java.lang.Exception ex) {
> > > ex.printStackTrace ();
> > > }
> > > }
> > >
> > > private static void printResultSet (ResultSet rs) throws SQLException
> > > {
> > >
> > > int numRows = 0;
> > > int numCols = rs.getMetaData().getColumnCount ();
> > > ResultSetMetaData md = rs.getMetaData();
> > > for (int i=1; i<=numCols; i++) {
> > > System.out.print(md.getColumnLabel(i) + " | ");
> > > }
> > > System.out.println();
> > > while (rs.next()) {
> > > numRows++;
> > > for (int i=1; i<=numCols; i++) {
> > > System.out.print(rs.getString(i) + " | ");
> > > }
> > > System.out.println();
> > > }
> > > System.out.println();
> > > System.out.println(numRows + " rows displayed");
> > > }
> > > }
> > >
> > > I there a more graceful way to close the connection or is this just a
> > > fact of life??
> > >
> > > This is a particular pain due to the growth of the error file. ~ 1
> > > MB/day
> > >
> > > Thanks in advance,
> > >
> > > Patrick
> > >
> > > PS. Please copy patrick.poovey@wcom.com on reply.
> >
> > --
> > ===============================================================================
> > Lance J. Andersen Email: lancea@sybase.com
> > Sybase Product Support Engineering Phone:(781) 564-6336
> > 77 South Bedford Street Fax: (781) 564-6148
> > Burlington, MA 01803
> >
> > The Dark Knight Returns!!! Let's Go Penguins!!!
> > ===============================================================================

--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Product Support Engineering Phone:(781) 564-6336
77 South Bedford Street Fax: (781) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================