File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Regarding insertion in postgresql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Regarding insertion in postgresql" Watch "Regarding insertion in postgresql" New topic

Regarding insertion in postgresql

Sreejith Padmanabhan

Joined: Oct 10, 2007
Posts: 10
Dear all,
I am facing a problem. I would like to know how to insert a xml value in the database using java program.

The sample code is given below :-

The code works fine with mysql, but when i am executing the same with postgresql, it gives me a error, like

Exception: Bad value for type long : hi dears
org.postgresql.util.PSQLException: Bad value for type long : hi dears
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toLong(
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getLong(
at org.postgresql.jdbc3.Jdbc3ResultSet.getClob(
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getClob(
at MySqlClobSetClob.main(

Awaiting the reply in this regards,


Sreejith Padmanabhan
I agree. Here's the link:
subject: Regarding insertion in postgresql
It's not a secret anymore!