Cannot Save Form Data

Hi All

In the process of deploying a new system, one form keeps throwing the error ‘Cannot Save Form Data’.
This error did not show up in the debug client only in the deployed client. As I have never face this issue and I am kinda lost.
Thanks in advance for your help.
Tom

Hi Tom,

What error do you see in the servoy server log? See the servoy-admin pages.

Hope this helps.

Thanks ROCLASI,

Ok I think i may need to reset all the sequences.

Error executing sql: insert into donations (donation_id, don_amt, don_closing, don_crcy_id, don_crcy_type, don_date, don_giv_type, don_id_code, don_letter, don_min_mes, don_num, don_sig, don_trans_date, don_ck_trans_num) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) with params: [8766 ,type: java.lang.Long, NullValue with type: 8 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 4 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, 2014-06-16 00:00:00.0 ,type: java.sql.Timestamp, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 93 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue] 	 	 
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "donations_pkey"
     Detail: Key (donation_id)=(8766) already exists.
     at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
     at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
     at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
     at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.servoy.j2db.datasource.Zg.invoke(Zg.java:16)
     at com.sun.proxy.$Proxy0.executeUpdate(Unknown Source)
     at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
     at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
     at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
     at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
     at com.servoy.j2db.server.dataprocessing.Zw.Za(Zw.java:1239)
     at com.servoy.j2db.server.dataprocessing.Zw.performUpdates(Zw.java:41)
     at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
     at sun.rmi.transport.Transport$1.run(Transport.java:159)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
     at java.lang.Thread.run(Thread.java:695)

I will need to be reminded how to refresh.(been too long)
Tom

Hi Tom,

You find the ‘Update Servoy Sequences on All Tables’ button on the database connection (see Database Connections page).
Also do you gave your developer connected to the same database as your server? When using servoy sequences this will give you these kinds of issues since the sequences are stored inside the workspace or repository respectively. So once your created a record in developer your server is out of sync and vice versa.
So use a ‘development’ database for your developer and a ‘production’ database for your server.
Or if you really have to use the same databases switch over to database managed sequences/DB Identities since these are, like the name implies, completely handled inside the database itself.

Hope this helps.