Thread: ERROR: insufficient data left in message
I always get the error "insufficient data left in message" running a prepared statement via jdbc executeQuery
the java statement
"ResultSet rs = this.updateStatement.executeQuery();"
results in the following error message :
java.sql.SQLException: ERROR: insufficient data left in message.
the insert statement is
INSERT INTO person.person (id, lastName, readOnly, birthDay, firstName) VALUES(DEFAULT,?,?,?,?) RETURNING id
the server LOG file says the following
2008-04-29 00:15:24 CEST ERROR: insufficient data left in message
2008-04-29 00:15:24 CEST STATEMENT: INSERT INTO person.person (id, lastName, readOnly, birthDay, firstName) VALUES(DEFAULT,$1,$2,$3,$4) RETURNING id
2008-04-29 00:15:24 CEST LOG: could not receive data from client: Connection reset by peer
i also tried this statement via the psql command line and it worked. there is also a similar update statement that works perfect
###
ResultSet rs = this.updateStatement.executeQuery();
// and the record is updated
// log
2008-04-29 00:34:45 CEST LOG: could not receive data from client: Connection reset by peer
2008-04-29 00:34:45 CEST LOG: unexpected EOF on client connection
###
i am using Postgres 8.2 and jdbc 3.0 for 8.2 (i also tried it with jdbc 4.0 but it did not work either).
i have no idea what the problem is - can someone help me ?
regards sepp
Hohe Telefonrechnungen? Gratis Gespräche von PC zu PC - unlimitiert mit dem Windows Live Messenger. Hier klicken!
the java statement
"ResultSet rs = this.updateStatement.executeQuery();"
results in the following error message :
java.sql.SQLException: ERROR: insufficient data left in message.
the insert statement is
INSERT INTO person.person (id, lastName, readOnly, birthDay, firstName) VALUES(DEFAULT,?,?,?,?) RETURNING id
the server LOG file says the following
2008-04-29 00:15:24 CEST ERROR: insufficient data left in message
2008-04-29 00:15:24 CEST STATEMENT: INSERT INTO person.person (id, lastName, readOnly, birthDay, firstName) VALUES(DEFAULT,$1,$2,$3,$4) RETURNING id
2008-04-29 00:15:24 CEST LOG: could not receive data from client: Connection reset by peer
i also tried this statement via the psql command line and it worked. there is also a similar update statement that works perfect
###
ResultSet rs = this.updateStatement.executeQuery();
// and the record is updated
// log
2008-04-29 00:34:45 CEST LOG: could not receive data from client: Connection reset by peer
2008-04-29 00:34:45 CEST LOG: unexpected EOF on client connection
###
i am using Postgres 8.2 and jdbc 3.0 for 8.2 (i also tried it with jdbc 4.0 but it did not work either).
i have no idea what the problem is - can someone help me ?
regards sepp
Hohe Telefonrechnungen? Gratis Gespräche von PC zu PC - unlimitiert mit dem Windows Live Messenger. Hier klicken!
Robert Wimmer wrote: > I always get the error "insufficient data left in message" running a > prepared statement via jdbc executeQuery Can you send us a testcase showing exactly what you are doing? -O
> > I always get the error 'insufficient data left in message' running a
> > prepared statement via jdbc executeQuery
>
> Can you send us a testcase showing exactly what you are doing?
>
i dont know what you mean with "sending a testcase" so i added the zipped source to this mail.
the program itself is intended to work as a really light weight ORM tool for postgres 8.2 and higher. its done in eclipse. it worked in an older release but my old eclipse configuration is broken and i had to rebuild the whole stuff.
there exists also a homepage for this project, where you can see a sample of an older version that worked. here is the link
http://81.223.126.12/wiro/self/projects/frames.html
do NOT download from this website - it wont work.
i tried to build an executable jar from this project but it didnt work (i am - and have been - the worst deployer in the world (since more then 20 years) but this another problem).
the tool is implemented using java 6.0
thanx for help
Sepp
besides - if you have any comments concerning my project described above - please let me know.
Hohe Telefonrechnungen? Gratis Gespräche von PC zu PC - unlimitiert mit dem Windows Live Messenger. Hier klicken!
Attachment
Hello Robert, I had the same problem with Strings containing the 0x00-char. PostgreSQL does not like those... With best regards, Daniel Migowski