Can't save form Data

I get “can’t save form data” sometimes. It doesn’t seem to matter on number of users or areas in the application. I have only seen in happen on windows 2000 machines. Started happening with version 10.
What does the message mean ?

Running on OSX server 10.2.8
servoy is rc 11

This error occurs when a record cannot be stored in the db
see the detail msg for details, can be a:
-not null constraint voilation
-primary key voilation
-db connction is lost
etc.

I have a similar problem
Could it be a lock problem ?
I found this on the java console
Starting Servoy R2 2.0 rc11 build-270 on Mac OS X using Java 1.4.2_03
Looking for servoy.properties on /Users/bernardmaeterlinck/servoy.properties
Loading servoy.properties from /Applications/Servoy/servoy.properties - Done
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
Starting Servoy R2 2.0 rc12 build-271 on Mac OS X using Java 1.4.2_03
Looking for servoy.properties on /Users/bernardmaeterlinck/servoy.properties
Loading servoy.properties from /Applications/Servoy/servoy.properties - Done
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
2004-04-26 08:55:17.355 Mail[387] +[NSObject(LockingAdditions) clearLocks]: object 0x6cdec40 still holds lock (count=1) in thread 0x18c9e00
2004-04-26 08:56:31.183 Mail[387] +[NSObject(LockingAdditions) clearLocks]: object 0x685d8f0 still holds lock (count=1) in thread 0x1babc00

The last 2 log lines are not from Servoy, please check your .log.txt file instead of console.

Jan Blok:
This error occurs when a record cannot be stored in the db
see the detail msg for details, can be a:
-not null constraint voilation
-primary key voilation
-db connction is lost
etc.

How can I capture this error so my end user don’t see it. I have the problem with -not null constraint voilations. I’m using a transaction to create the record. My methods takes care of the validations before the commit.

I can’t eliminate the null constraint on the database. I need to solve this within servoy.

Servoy 2.1 beta 3 will contain:

application.setFocusLostSaveEnabled(false)

This will disable the auto save when clicking anywhere on a form and the focus get lost.

i’ve just started seeing this problem today also, for the first time.

when i click the detail button, the window which usually contains
details about the error was blank.

on the terminal (i run servoy from the terminal to watch for
errors) i get a message about a null pointer exception.

it happend for a minute or two, every time i tried to create
a new record and switch to a different form, but now it doesn’t
happen at all…

i didn’t change anything…it just stopped happening

just started seeing the “cannot save form data” problem again today;

on the terminal from which servoy is running, i get the following:
java.lang.NullPointerException
java.lang.NullPointerException
at com.servoy.j2db.dataprocessing.FoundSet.if(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.updateRecord(Unknown Source)
at com.servoy.j2db.dataprocessing.RelatedFoundSet.updateRecord(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.stopEditing(Unknown Source)
at com.servoy.j2db.dataprocessing.h.stopEditing(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.stopEditing(Unknown Source)
at com.servoy.j2db.dataprocessing.h.stopEditing(Unknown Source)
at com.servoy.j2db.FormPanel.saveData(Unknown Source)
at com.servoy.j2db.FormPanel.t(Unknown Source)
at com.servoy.j2db.FormManager.dt(Unknown Source)
at com.servoy.j2db.develop.ab.dt(Unknown Source)
at com.servoy.j2db.FormManager.propertyChange(Unknown Source)
at com.servoy.j2db.develop.ab.propertyChange(Unknown Source)
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:264)
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:232)
at com.servoy.j2db.J2DBGlobals.firePropertyChange(Unknown Source)
at com.servoy.j2db.J2DBClient.closeSolution(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.closeSolution(Unknown Source)
at com.servoy.j2db.J2DBClient.closeSolution(Unknown Source)
at com.servoy.j2db.cmd.ak.doIt(Unknown Source)
at com.servoy.j2db.cmd.b$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

i can’t figure out what i could be doing that would cause this;
could someone please advise?

thank you.
rm.

Which version of Servoy are you using? if this is Servoy 2.1 beta5 can we have a look at the solution? or is it reproduceble in a sample?

i’m running build 276.

i’d be happy to send the solution, if you want to see it,
but the problem seems to be very random.

can you give me any clues as to what would cause
this error?

thanks.
rm.

RobertMeyer:
i’d be happy to send the solution, if you want to see it, but the problem seems to be very random.

yes, please or a sample solution demonstrating this. (you could try to use the 2.1b5 we did some improves in saving form data in this version)

still getting this from time-to-time;

had it today for a while, quit servoy, restarted
using stacktrace option, and it stopped happening.

could you give us some details on what causes this?

i’m sure it’s something in my code (broken relation,
null value in a field, bad calculation, etc.) but i can’t
seem to track it down.

thanks in advance.
rm.

Could you please try with Servoy 2.1 rc3 ? http://forum.servoy.com/viewtopic.php?p=11926#11926

Jan Blok:
Could you please try with Servoy 2.1 rc3 ? http://forum.servoy.com/viewtopic.php?p=11926#11926

Jan:
we are concerned about changing servoy versions at this
time, since we are very close to delivering the project to
the client - and it’s already late (not due to any fault of yours).

if we upgrade (we’re at build 276), doesn’t that mean we’ll
be out of the firebird db, and into sybase? then, if this
upgrade causes problems, will we be able to go back to
buid 276?

we’re in a very difficult situtation here with this client.
the “can’t save form data” issue only shows up here
once in a while, but the client did a lot of testing this
weekend, and received the message constantly.

he wants to know when we’re going to fix it, but we
have no idea what’s causing it, and can’t reproduce it
at will.

i had previously sent a version of our solution to you
with instructions on how to reproduce the problem, but
you said you were unable to make it happen.

i’ll be working on this project for the next 4 days (thursday, aug.
19th thru sunday aug 22) before switching to another project
on monday. if you could help us get this figured out,
we’d be very greatful.

thanks in advance
robert meyer

To ease your decision to change to the new version we only can provide you with some facts:
-the saveData mechanism is changed and improved in Servoy 2.1
-you could try your solution on a separate install of 2.1 (other PC if you are afraid of mixing up things) via import
-Servoy 2.1 does not force you to use Sybase (I’m personally still running with firebird) it is only the default shipped database (which can be skipped during install)
-when starting with 2.1 and if you make a backup from db and install dir. you can go back to Servoy 2.0.4 within minitues, if something does not work out for you.
-Servoy 2.1 has some profound performance improvements
-Servoy 2.1 will VERY likely be released next week (before 27th)
-Other than i18n and css styles there are no major differences in functionallity

thanks for that advice. i have a meeting this morning
with my project manager, and i’ll recommend to him
that we upgrade.

meanwhile, i found that the solution i sent to you for
demonstrating the problem did not have the Sequence
Type for the primary key set to “db identity”. if you
still have it, and switch the sequence type to db identity
for the tables “customers” and “quotes”, you should be
able to reproduce the problem as originally described.