Link to home
Start Free TrialLog in
Avatar of deathstar641
deathstar641

asked on

keep getting an exception with Number of conflicts while synchronizing: 1 SyncResolver.INSERT_ROW_CONFLICT row 1 ERROR: relation "pdfbooks" does not exist

Hello,

I'm using CachedRowSetXImpl to select and insert data into a PostgreSQL database.
The code for the initialization of CachedRowSet in the javabean is as following:

      PDFInsertSet.setDataSourceName("java:comp/env/jdbc/public_PostgreSQL");
      PDFInsertSet.setTableName("PDFBooks");
      PDFInsertSet.setCommand("SELECT ALL public.\"PDFBooks\".\"TitlesID\" \n                 \nFROM public.\"PDFBooks\"");

     so.. when I want to do the insert the code goes as following:

    RowKey rk = PDFInsertProvider.appendRow();
       
        PDFInsertProvider.setCursorRow(rk);
        PDFInsertProvider.setValue("TitlesID", new Integer(1) ) ;
   
        PDFInsertProvider.commitChanges();

where PDFInsertProvides wraps PDFInsertSet.

But I keep getting the following exception

WARNING: phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@d60f6e) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: #{UploadPDFBook.upload_PDF_action}: java.lang.RuntimeException: Number of conflicts while synchronizing: 1 SyncResolver.INSERT_ROW_CONFLICT row 1  ERROR: relation "pdfbooks" does not exist #{UploadPDFBook.upload_PDF_action}: java.lang.RuntimeException: Number of conflicts while synchronizing: 1 SyncResolver.INSERT_ROW_CONFLICT row 1  ERROR: relation "pdfbooks" does not exist

I've seen this problem in a recent blog here:
http://forum.java.sun.com/thread.jspa?messageID=10134348 but noone has given a correct answer.

I've found a workaround but I really don't want to follow it: I am getting the same error since this morning. A workaround would be to lowercase your table's and columns' names. I am trying to find another solution though because I don't like this ..

Any other ideas?
ASKER CERTIFIED SOLUTION
Avatar of earth man2
earth man2
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial