Cannot Save Form Data

Questions and answers for designing and implementing forms in Servoy

Cannot Save Form Data

Postby MacSince85 » Mon Jun 16, 2014 10:36 pm

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
Mac OS X 10.9
Java 1.6.0_65, 64-Bit Server VM
Servoy version7.4.0 -build 2026
MacSince85
 
Posts: 14
Joined: Wed May 04, 2011 12:20 am

Re: Cannot Save Form Data

Postby ROCLASI » Mon Jun 16, 2014 10:41 pm

Hi Tom,

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

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Cannot Save Form Data

Postby MacSince85 » Mon Jun 16, 2014 11:10 pm

Thanks ROCLASI,

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

Code: Select all
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
Mac OS X 10.9
Java 1.6.0_65, 64-Bit Server VM
Servoy version7.4.0 -build 2026
MacSince85
 
Posts: 14
Joined: Wed May 04, 2011 12:20 am

Re: Cannot Save Form Data

Postby ROCLASI » Tue Jun 17, 2014 12:56 pm

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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Forms

Who is online

Users browsing this forum: No registered users and 22 guests

cron