Cannot Save Form Data!

Questions, answers, tips and ideas on Servoy Client

Cannot Save Form Data!

Postby tommygill » Mon Sep 27, 2010 7:38 pm

Hi All

I have a form that saves the data when in the developer client but when in the client connected to the server it throws the error "Cannot save form Data."

Other forms in the same solution work fine but this one is not.

All help is appreciated.
Tom

Mac OS X 10.6.7
Servoy version 5.2.0 -build 997
Java Version 1.6.0_20
User avatar
tommygill
 
Posts: 110
Joined: Thu Jan 27, 2005 1:38 pm
Location: Columbus, Indiana, USA

Re: Cannot Save Form Data!

Postby mboegem » Mon Sep 27, 2010 9:35 pm

Hi Tom,

can you find anything in the server log?
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1742
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Cannot Save Form Data!

Postby tommygill » Mon Sep 27, 2010 10:27 pm

Thank you.

Here is a copy of the server log.
Code: Select all
2010-09-27 16:12:37,581 ERROR [RMI TCP Connection(15)-127.0.0.1] com.servoy.j2db.util.Debug - Error executing sql: insert into donations (donation_id, donation_date, donation_trans_date, donation_amount, donation_currency_id, donation_id_code, donation_giver_type, donation_trans_number, donation_letter, donation_closing, donation_signature, donation_min_mess, donation_picture, donation_currency_type, donation_number) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) with params: [1339 ,type: java.lang.Long, 2010-09-28 00:00:00.0 ,type: java.sql.Timestamp, NullValue with type: 93 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 7 ,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, 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: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, '20100928101' ,type: java.lang.String]
com.sybase.jdbc3.jdbc.SybSQLException: SQL Anywhere Error -193: Primary key for table 'donations' is not unique : Primary key value ('1339')
   at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
   at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.updateLoop(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.executeUpdate(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybPreparedStatement.executeUpdate(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.servoy.j2db.Za.Za.Zf.invoke(Zf.java:15)
   at $Proxy1.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.dataprocessing.Zu.performUpdates(Zu.java:933)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   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:305)
   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:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:637)
2010-09-27 16:12:42,508 ERROR [RMI TCP Connection(15)-127.0.0.1] com.servoy.j2db.util.Debug - Error executing sql: insert into donations (donation_id, donation_date, donation_trans_date, donation_amount, donation_currency_id, donation_id_code, donation_giver_type, donation_trans_number, donation_letter, donation_closing, donation_signature, donation_min_mess, donation_picture, donation_currency_type, donation_number) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) with params: [1339 ,type: java.lang.Long, 2010-09-28 00:00:00.0 ,type: java.sql.Timestamp, NullValue with type: 93 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 7 ,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, 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: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, '20100928101' ,type: java.lang.String]
com.sybase.jdbc3.jdbc.SybSQLException: SQL Anywhere Error -193: Primary key for table 'donations' is not unique : Primary key value ('1339')
   at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
   at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.updateLoop(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.executeUpdate(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybPreparedStatement.executeUpdate(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.servoy.j2db.Za.Za.Zf.invoke(Zf.java:15)
   at $Proxy1.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.dataprocessing.Zu.performUpdates(Zu.java:933)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   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:305)
   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:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:637)
2010-09-27 16:12:45,548 ERROR [RMI TCP Connection(15)-127.0.0.1] com.servoy.j2db.util.Debug - Error executing sql: insert into donations (donation_id, donation_date, donation_trans_date, donation_amount, donation_currency_id, donation_id_code, donation_giver_type, donation_trans_number, donation_letter, donation_closing, donation_signature, donation_min_mess, donation_picture, donation_currency_type, donation_number) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) with params: [1339 ,type: java.lang.Long, 2010-09-28 00:00:00.0 ,type: java.sql.Timestamp, NullValue with type: 93 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 7 ,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, 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: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, NullValue with type: 12 ,type: com.servoy.j2db.dataprocessing.ValueFactory$NullValue, '20100928101' ,type: java.lang.String]
com.sybase.jdbc3.jdbc.SybSQLException: SQL Anywhere Error -193: Primary key for table 'donations' is not unique : Primary key value ('1339')
   at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
   at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.updateLoop(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybStatement.executeUpdate(Unknown Source)
   at com.sybase.jdbc3.jdbc.SybPreparedStatement.executeUpdate(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.servoy.j2db.Za.Za.Zf.invoke(Zf.java:15)
   at $Proxy1.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.dataprocessing.Zu.performUpdates(Zu.java:933)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   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:305)
   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:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:637)


I am not good at following the log.
Please Help.
Tom

Mac OS X 10.6.7
Servoy version 5.2.0 -build 997
Java Version 1.6.0_20
User avatar
tommygill
 
Posts: 110
Joined: Thu Jan 27, 2005 1:38 pm
Location: Columbus, Indiana, USA

Re: Cannot Save Form Data!

Postby mboegem » Mon Sep 27, 2010 10:33 pm

it points exactly to what I was thinking of:
Code: Select all
com.sybase.jdbc3.jdbc.SybSQLException: SQL Anywhere Error -193: Primary key for table 'donations' is not unique : Primary key value ('1339')


I guess you're using Servoy sequence to insert your pk.
Servoy isn't in sync with the latest pk issued in you db, therefore it tries to insert a record with an already existing pk.

As I'm not familiar using Servoy sequences, I don't know the best way to solve the problem.
I know there's a button to upodate the sequence on the admin pages.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1742
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Cannot Save Form Data!

Postby tommygill » Mon Sep 27, 2010 10:54 pm

Thanks Marc

That was the key. I update all the Servoy Sequences and BINGO. Everything work perfectly.

I'm a happy camper.

Thank you very much.
Tom

Mac OS X 10.6.7
Servoy version 5.2.0 -build 997
Java Version 1.6.0_20
User avatar
tommygill
 
Posts: 110
Joined: Thu Jan 27, 2005 1:38 pm
Location: Columbus, Indiana, USA


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 4 guests

cron