Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > insufficient da...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 1943 of 1997
Post > Topic >>

insufficient data left in message II

by seppwimmer@[EMAIL PROTECTED] (Robert Wimmer) Apr 29, 2008 at 10:26 AM

--_e6b22d5d-e9fd-403d-a847-181864ea6edb_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


> Date: Tue, 29 Apr 2008 16:37:03 +1200
> From: oliver@[EMAIL PROTECTED]
> To: seppwimmer@[EMAIL PROTECTED]
> CC: pgsql-jdbc@[EMAIL PROTECTED]
> Subject: Re: [JDBC] ERROR:  insufficient data left in message
>=20
> Robert Wimmer wrote:
> > I always get the error 'insufficient data left in message' running
a=20
> > prepared statement via jdbc executeQuery
>=20
ican locate the problem better now. the prepared insert statement is
NOTthe=
 origin cause. if the following lines are commented out no errorwill occur
=
only SOMETIMES and the insert and the update statement willwork as
expected=
..=20

***
// should not be found
//if (proxy.get(person,new Long(45678)))=20
//  System.out.println('found : ' + person.toString()); <<<< here is the
pr=
oblem
//  else System.out.println('not found : ' + person.toString());=20
**** and now the rest works fine=20
// update=20
person.setFirstName('Homero');
if (proxy.update(person)) System.out.println('updated : ' +
person.toString=
());=20
            else System.out.println('not updated : ' + person.toString());
// insert a new one
            Person person2 =3D new Person();=20
            person2.setFirstName('Ropert');
            person2.setLastName('Wimmer');=20
            person2.setReadOnly(false);=20
            person2.setBirthDay(null);
            if (proxy.insert(person2)) System.out.println('inserted : ' +
p=
erson2.toString());=20
            else System.out.println('inserted : ' +
person2.toString());=20
            }
**** output
updated : [1] Simpson, Homero (readOnly=3Dfalse, private=3D)
inserted : [null] Wimmer, Ropert (readOnly=3Dfalse, private=3D)
done=20
****

thestrange thing is if I run the program above from the command line
theres=
ult depends on what happend during the last call of the program. soif i
cha=
nge the program in the IDE in a way that an error will occurthe sam error
w=
ill also occur from the commandline for the next 2 or 3times - afterwards
i=
t will work as expected.=20

my suspicion is, that if  the get statement  returns nothing this error
wil=
l occur. =20
***
ResultSet rs =3D this.getStatement.executeQuery();
if (rs.first()) { readResultSet(rs,data);  ret =3D true; }
rs.close();
// getStatement =3D 'SELECT * FROM person.person WHERE id =3D  ?'
***
butthe error only will occur if I run  an insert or update
statementafterwa=
rds. I.E. if i only do not find  no error will occur but if iupdate or
inse=
rt afterwards this error will occur ! and vice versa - aslong as there is
n=
o NOT FOUND  the insert & update statement willwork.=20

if a reproduce this situation (not finding data) i get the following log
en=
tries
***
2008-04-29 12:14:54 CEST LOG:  unexpected EOF on client connection
2008-04-29 12:14:58 CEST LOG:  could not receive data from client:
Connecti=
on reset by peer
2008-04-29 12:14:58 CEST LOG:  unexpected EOF on client connection
2008-04-29 12:15:01 CEST LOG:  could not receive data from client:
Connecti=
on reset by peer
2008-04-29 12:15:01 CEST LOG:  unexpected EOF on client connection
2008-04-29 12:15:06 CEST LOG:  could not receive data from client:
Connecti=
on reset by peer
2008-04-29 12:15:06 CEST LOG:  unexpected EOF on client connection
2008-04-29 12:15:13 CEST LOG:  could not receive data from client:
Connecti=
on reset by peer
2008-04-29 12:15:13 CEST LOG:  unexpected EOF on client connection
2008-04-29 12:15:22 CEST LOG:  could not receive data from client:
Connecti=
on reset by peer
2008-04-29 12:15:22 CEST LOG:  unexpected EOF on client connection
***
the 'unexpected EOF ...' is very suspicous to me.

any ideas ?

regards sepp
_________________________________________________________________
Der Messenger plaudert gerne - egal ob zu zweit oder mit allen gemeinsam.
W=
illkommen in der Familie! Den neuen Windows Live Messenger jetzt
herunterla=
den!
http://get.live.com/messenger/overview/=

--_e6b22d5d-e9fd-403d-a847-181864ea6edb_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class=3D'hmmessage'>
<style>.hmmessage P{margin:0px;padding:0px}body.hmmessage{FONT-SIZE:
10pt;F=
ONT-FAMILY:Tahoma}</style>&gt; Date: Tue, 29 Apr 2008 16:37:03
+1200<br>&gt=
; From: oliver@[EMAIL PROTECTED]
>&gt; To: seppwimmer@[EMAIL PROTECTED]
>&gt;
CC:=
 pgsql-jdbc@[EMAIL PROTECTED]
>&gt; Subject: Re: [JDBC] ERROR: 
insufficient=
 data left in message<br>&gt; <br>&gt; Robert Wimmer wrote:<br>&gt; &gt; I
=
always get the error 'insufficient data left in message' running a
<br>&gt;=
 &gt; prepared statement via jdbc executeQuery<br>&gt; <br>ican locate the
=
problem better now. the prepared insert statement is NOTthe origin cause.
i=
f the following lines are commented out no errorwill occur only SOMETIMES
a=
nd the insert and the update statement willwork as expected.
<br><br>***<br=
>// should not be found<br>//if (proxy.get(person,new Long(45678)))
<br>//&=
nbsp; System.out.println('found : ' + person.toString()); &lt;&lt;&lt;&lt;
=
here is the problem<br>//&nbsp; else System.out.println('not found : ' +
pe=
rson.toString()); <br>**** and now the rest works fine <br>// update
<br>pe=
rson.setFirstName('Homero');<br>if (proxy.update(person))
System.out.printl=
n('updated : ' + person.toString()); <br>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nb=
sp; &nbsp;&nbsp;&nbsp; else System.out.println('not updated : ' +
person.to=
String());<br>// insert a new one<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
=
&nbsp;&nbsp;&nbsp; Person person2 =3D new Person(); <br>&nbsp;&nbsp;&nbsp;
=
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
person2.setFirstName('Ropert');<br>&n=
bsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
person2.setLastName(=
'Wimmer'); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
per=
son2.setReadOnly(false); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&n=
bsp;&nbsp; person2.setBirthDay(null);<br>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nb=
sp; &nbsp;&nbsp;&nbsp; if (proxy.insert(person2))
System.out.println('inser=
ted : ' + person2.toString()); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&n=
bsp;&nbsp;&nbsp; else System.out.println('inserted : ' +
person2.toString()=
); <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>****
o=
utput<br>updated : [1] Simpson, Homero (readOnly=3Dfalse,
private=3D)<br>in=
serted : [null] Wimmer, Ropert (readOnly=3Dfalse, private=3D)<br>done
<br>*=
***<br><br>thestrange thing is if I run the program above from the command
=
line theresult depends on what happend during the last call of the
program.=
 soif i change the program in the IDE in a way that an error will occurthe
=
sam error will also occur from the commandline for the next 2 or 3times -
a=
fterwards it will work as expected. <br><br>my suspicion is, that if&nbsp;
=
the get statement&nbsp; returns nothing this error will occur. 
<br>***<br>=
ResultSet rs =3D this.getStatement.executeQuery();<br>if (rs.first()) {
rea=
dResultSet(rs,data);&nbsp; ret =3D true; }<br>rs.close();<br>//
getStatemen=
t =3D 'SELECT * FROM person.person WHERE id =3D&nbsp; ?'<br>***<br>butthe
e=
rror only will occur if I run&nbsp; an insert or update
statementafterwards=
.. I.E. if i only do not find&nbsp; no error will occur but if iupdate or
in=
sert afterwards this error will occur ! and vice versa - aslong as there
is=
 no NOT FOUND&nbsp; the insert &amp; update statement willwork. <br><br>if
=
a reproduce this situation (not finding data) i get the following log
entri=
es<br>***<br>2008-04-29 12:14:54 CEST LOG:&nbsp; unexpected EOF on client
c=
onnection<br>2008-04-29 12:14:58 CEST LOG:&nbsp; could not receive data
fro=
m client: Connection reset by peer<br>2008-04-29 12:14:58 CEST LOG:&nbsp;
u=
nexpected EOF on client connection<br>2008-04-29 12:15:01 CEST LOG:&nbsp;
c=
ould not receive data from client: Connection reset by peer<br>2008-04-29
1=
2:15:01 CEST LOG:&nbsp; unexpected EOF on client connection<br>2008-04-29
1=
2:15:06 CEST LOG:&nbsp; could not receive data from client: Connection
rese=
t by peer<br>2008-04-29 12:15:06 CEST LOG:&nbsp; unexpected EOF on client
c=
onnection<br>2008-04-29 12:15:13 CEST LOG:&nbsp; could not receive data
fro=
m client: Connection reset by peer<br>2008-04-29 12:15:13 CEST LOG:&nbsp;
u=
nexpected EOF on client connection<br>2008-04-29 12:15:22 CEST LOG:&nbsp;
c=
ould not receive data from client: Connection reset by peer<br>2008-04-29
1=
2:15:22 CEST LOG:&nbsp; unexpected EOF on client connection<br>***<br>the
'=
unexpected EOF ...' is very suspicous to me.<br><br>any ideas
?<br><br>rega=
rds sepp<br /><hr />Es ist h=F6chste Zeit, dabei zu sein - Holen Sie sich
j=
etzt die neue Generation der Windows Live Services! <a
href=3D'http://get.l=
ive.com/' target=3D'_new'>Hier klicken!</a></body>
</html>=

--_e6b22d5d-e9fd-403d-a847-181864ea6edb_--
 




 6 Posts in Topic:
insufficient data left in message II
seppwimmer@[EMAIL PROTECT  2008-04-29 10:26:40 
Re: insufficient data left in message II
oliver@[EMAIL PROTECTED]   2008-04-29 23:34:55 
Re: insufficient data left in message II
seppwimmer@[EMAIL PROTECT  2008-04-29 15:46:27 
Re: insufficient data left in message II
seppwimmer@[EMAIL PROTECT  2008-04-29 21:58:26 
Re: insufficient data left in message II
oliver@[EMAIL PROTECTED]   2008-04-30 10:21:44 
Re: insufficient data left in message II
seppwimmer@[EMAIL PROTECT  2008-04-30 10:11:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 1:50:19 CDT 2008.