I am trying to move some data from Oracle to postgres. In few occasions I am getting SQLException from postgres driver, as a result program termiates with out completion. I understand that there is something rong with my data, but I did not understand the reason for this. Can any one hrlp me ?
SQLException in createQuery org.postgresql.util.PSQLException: Zero bytes may not occur in string parameters. at org.postgresql.core.v2.SimpleParameterList.setStringParamete(SimpleParameterList.java:61) at org.postgresql.jdbc2.AbstractJdbc2Statement.bindString(AbstractJdbc2Statement.java:2025) at org.postgresql.jdbc2.AbstractJdbc2Statement.setString(AbstractJdbc2Statement.java:1155) at org.postgresql.jdbc2.AbstractJdbc2Statement.setString(AbstractJdbc2Statement.java:1145) at net.assyst.databse.migration.O2P.createQuery(O2P.java:102) at net.assyst.databse.migration.O2P.readTables(O2P.java:48) at net.assyst.databse.migration.O2P.main(O2P.java:213)
Sanju, If you post the part of your code that is causing the error, then someone may be able to help you. Otherwise we're just going to have to guess (like Annie did).
Good Luck, Avi.
Joined: Dec 29, 2004
Hi Avi, I was asking on this context.
I was trying to read a table from Oracle and trying to insert the data into Postgres. Perl was used to insert data into Oracle. It must have inserted the NUL character too. So when I was trying to insert the same data into Postgres using JDBC, I got the exception specified in the first post. Now I cleared the problem using "str = str.replaceAll("\\u00","");" ranchers helped me in another thread. Thank you all.