pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC throws with error code 0
3+ messages / 2 participants
[nested] [flat]

* JDBC throws with error code 0
@ 1999-01-22 17:20 Glenn Holmer <gholmer@weycogroup.com>
  1999-01-24 12:17 ` Re: [INTERFACES] JDBC throws with error code 0 Peter T Mount <peter@retep.org.uk>
  0 siblings, 1 reply; 3+ messages in thread

From: Glenn Holmer @ 1999-01-22 17:20 UTC (permalink / raw)
  To: pgsql-interfaces

Hello,
  I am still having troubles trying to determine the source of
some rather bizarre behavior here.  My database "factory" is
on Postgres 6.3 on a Linux box, and I am attempting to access it
with a Java program.  The database was created using psql "create
database SkidData;" and "\i SkidData.i".  SkidData.i looks like this:

CREATE TABLE SkidData (
  WIPno char(6),
  Style char(8),
  Color char(3),
  Width char(3),
  Size char(3),
  UPC char(12),
  Pairs int,
  SkidNo char(5),
  CaseNo char(2),
  SkidType char(2),
  bCaseFull boolean,
  bSentTo400 boolean,
  DatePacked date,
  TimePacked time,
  DateShipped date,
  TimeShipped time,
  StationID char(1)
);

The table was loaded from a flat file using a Java program.
When I open psql on the server and type 

  factory=> select distinct SkidNo from SkidData;

I get a nice list of skid numbers.  The attached file, however,
when compiled, produces the following output:

  loading JDBC class "postgresql.Driver"...

  connecting to jdbc:postgresql://miranda:5432/factory...
  executeQuery...
  Unknown Response Type: 
  return code is: 0

This is making me very confused.  Why does it throw if the
return code is 0?  Can anybody shed some light on this?

-- 
____________________________________________________________
Glenn Holmer                          gholmer@weycogroup.com
Programmer/Analyst                       phone: 414.263.8827
Weyco Group, Inc.                          fax: 414.263.8808

Attachments:

  test.java (application/octet-stream, 1.6K) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [INTERFACES] JDBC throws with error code 0
  1999-01-22 17:20 JDBC throws with error code 0 Glenn Holmer <gholmer@weycogroup.com>
@ 1999-01-24 12:17 ` Peter T Mount <peter@retep.org.uk>
  0 siblings, 0 replies; 3+ messages in thread

From: Peter T Mount @ 1999-01-24 12:17 UTC (permalink / raw)
  To: Glenn Holmer <gholmer@weycogroup.com>; +Cc: pgsql-interfaces

On Fri, 22 Jan 1999, Glenn Holmer wrote:

[snip]

> I get a nice list of skid numbers.  The attached file, however,
> when compiled, produces the following output:
> 
>   loading JDBC class "postgresql.Driver"...
> 
>   connecting to jdbc:postgresql://miranda:5432/factory...
>   executeQuery...
>   Unknown Response Type: 
>   return code is: 0
> 
> This is making me very confused.  Why does it throw if the
> return code is 0?  Can anybody shed some light on this?

This return code is part of the network protocol. It's throwing because
the driver wasn't expecting a packet of type '0'.

Are you using the driver from 6.3, or a later one?

Peter

-- 
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [INTERFACES] JDBC throws with error code 0
@ 1999-01-25 16:24 Glenn Holmer <gholmer@weycogroup.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Glenn Holmer @ 1999-01-25 16:24 UTC (permalink / raw)
  To: pgsql-interfaces

Peter Mount wrote:

>>   loading JDBC class "postgresql.Driver"... 
>>  
>>   connecting to jdbc:postgresql://miranda:5432/factory... 
>>   executeQuery... 
>>   Unknown Response Type:  
>>   return code is: 0 
>>  
>> This is making me very confused.  Why does it throw if the 
>> return code is 0?  Can anybody shed some light on this? 
> 
>This return code is part of the network protocol. It's throwing because 
>the driver wasn't expecting a packet of type '0'. 
> 
>Are you using the driver from 6.3, or a later one? 

Thanks for responding, Peter.  Using 6.3.  I think I have something:
it runs under Windows (JDK 1.1.7B) and Linux (Blackdown 1.1.7),
but not under OS/2 (IBM JDK 1.1.7).  I applied IBM's latest patches
from about a week ago but still get this.  I did do a TCP/IP dump
while this was happening, if anyone would like to see it.

I will be running this under Linux, so it's not a showstopper, 
but enquiring minds do want to know...

-- 
____________________________________________________________
Glenn Holmer                          gholmer@weycogroup.com
Programmer/Analyst                       phone: 414.263.8827
Weyco Group, Inc.                          fax: 414.263.8808



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1999-01-25 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-01-22 17:20 JDBC throws with error code 0 Glenn Holmer <gholmer@weycogroup.com>
1999-01-24 12:17 ` Peter T Mount <peter@retep.org.uk>
1999-01-25 16:24 Re: [INTERFACES] JDBC throws with error code 0 Glenn Holmer <gholmer@weycogroup.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox