--_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>> Date: Tue, 29 Apr 2008 16:37:03
+1200<br>>=
; From: oliver@[EMAIL PROTECTED]
>> To: seppwimmer@[EMAIL PROTECTED]
>>
CC:=
pgsql-jdbc@[EMAIL PROTECTED]
>> Subject: Re: [JDBC] ERROR:
insufficient=
data left in message<br>> <br>> Robert Wimmer wrote:<br>> > I
=
always get the error 'insufficient data left in message' running a
<br>>=
> prepared statement via jdbc executeQuery<br>> <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()); <<<<
=
here is the problem<br>// 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>
&nb=
sp; else System.out.println('not updated : ' +
person.to=
String());<br>// insert a new one<br>
=
Person person2 =3D new Person(); <br>
=
person2.setFirstName('Ropert');<br>&n=
bsp;
person2.setLastName(=
'Wimmer'); <br>
per=
son2.setReadOnly(false); <br>
&n=
bsp; person2.setBirthDay(null);<br>
&nb=
sp; if (proxy.insert(person2))
System.out.println('inser=
ted : ' + person2.toString()); <br>
&n=
bsp; else System.out.println('inserted : ' +
person2.toString()=
); <br> }<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
=
the get statement returns nothing this error will occur.
<br>***<br>=
ResultSet rs =3D this.getStatement.executeQuery();<br>if (rs.first()) {
rea=
dResultSet(rs,data); ret =3D true; }<br>rs.close();<br>//
getStatemen=
t =3D 'SELECT * FROM person.person WHERE id =3D ?'<br>***<br>butthe
e=
rror only will occur if I run an insert or update
statementafterwards=
.. I.E. if i only do not find 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 the insert & 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: unexpected EOF on client
c=
onnection<br>2008-04-29 12:14:58 CEST LOG: could not receive data
fro=
m client: Connection reset by peer<br>2008-04-29 12:14:58 CEST LOG:
u=
nexpected EOF on client connection<br>2008-04-29 12:15:01 CEST LOG:
c=
ould not receive data from client: Connection reset by peer<br>2008-04-29
1=
2:15:01 CEST LOG: unexpected EOF on client connection<br>2008-04-29
1=
2:15:06 CEST LOG: could not receive data from client: Connection
rese=
t by peer<br>2008-04-29 12:15:06 CEST LOG: unexpected EOF on client
c=
onnection<br>2008-04-29 12:15:13 CEST LOG: could not receive data
fro=
m client: Connection reset by peer<br>2008-04-29 12:15:13 CEST LOG:
u=
nexpected EOF on client connection<br>2008-04-29 12:15:22 CEST LOG:
c=
ould not receive data from client: Connection reset by peer<br>2008-04-29
1=
2:15:22 CEST LOG: 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_--


|