Weird Servoy Smart Client Errors on Upgrade from 7 -> Latest

Questions and answers for all installation-related topics for Servoy products

Weird Servoy Smart Client Errors on Upgrade from 7 -> Latest

Postby d.pearce1417196993 » Sat Jun 10, 2023 11:39 pm

Hi, I wonder whether anyone can help. I am upgrading an old solution that is getting more precarious on Servoy 7.

I get everything into Eclipse OK, and updated some plugins etc to get me past our login screen.

On running smart client from Developer.

In the main on solution open, I am getting weird errors that appear to be Java and not from any one line of script. It first triggers literally on setting a variable based on developer/live to a fixed URL. But then if I comment that out, the same just happens.

The error is nothing to do with the actual line of code that is being run.

I have checked all the code anyway and all of the .setHours scripts have the full 0,0,0,0) so no errors their.

Java is 1.8 latest release. I have also update svyUtils.

Any clues to what this is??

Thanks as always in advance. I never believe it would be as easy! Its a smart client app only.


The line it first triggers from is:

Code: Select all
scopes.cloudClinics_common.nephexMROAPIServer = (application.isInDeveloper() ? 'domainDev:8080' : 'domainLive');

but if I comment that out the error just happens at a later stage.

Code: Select all
ERROR com.servoy.j2db.util.Debug - For input string: "new Date().setHours(0" java.lang.NumberFormatException: For input string: "new Date().setHours(0"
   at java.lang.NumberFormatException.forInputString(Unknown Source) ~[?:?]
   at java.lang.Long.parseLong(Unknown Source) ~[?:?]
   at java.lang.Long.valueOf(Unknown Source) ~[?:?]
   at com.servoy.j2db.persistence.ScriptVariable.parseDate( ~[?:?]
   at com.servoy.j2db.persistence.ScriptVariable.getInitValue( ~[?:?]
   at com.servoy.j2db.scripting.ScriptVariableScope.putScriptVariable( ~[?:?]
   at com.servoy.j2db.scripting.ScopesScope$1.putScriptVariable( ~[?:?]
   at com.servoy.j2db.scripting.GlobalScope.put( ~[?:?]
   at com.servoy.j2db.scripting.ScriptVariableScope.put( ~[?:?]
   at com.servoy.j2db.scripting.GlobalScope.createVars( ~[?:?]
   at com.servoy.j2db.scripting.ScopesScope.getGlobalScope( ~[?:?]
   at com.servoy.j2db.scripting.ScopesScope.get( ~[?:?]
   at org.mozilla.javascript.ScriptableObject.getProperty( ~[?:?]
   at org.mozilla.javascript.ScriptRuntime.getObjectProp( ~[?:?]
   at org.mozilla.javascript.ScriptRuntime.getObjectProp( ~[?:?]
   at org.mozilla.javascript.Interpreter.interpretLoop( ~[?:?]
   at org.mozilla.javascript.Interpreter.interpret( ~[?:?]
   at ~[?:?]
   at org.mozilla.javascript.ContextFactory.doTopCall( ~[?:?]
   at org.mozilla.javascript.ScriptRuntime.doTopCall( ~[?:?]
   at ~[?:?]
   at com.servoy.j2db.scripting.ScriptEngine.executeFunction( ~[?:?]
   at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction( ~[?:?]
   at com.servoy.j2db.scripting.ScopesScope.executeGlobalFunction( ~[?:?]
   at com.servoy.j2db.FormManager.makeSolutionSettings( ~[?:?]
   at ~[?:?]
   at com.servoy.j2db.debug.DebugJ2DBClient$DebugSwingFormMananger.makeSolutionSettings( ~[?:?]
   at com.servoy.j2db.FormManager$ ~[?:?]
   at java.awt.event.InvocationEvent.dispatch(Unknown Source) ~[?:?]
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:?]
   at java.awt.EventQueue$ Source) ~[?:?]
   at java.awt.EventQueue$ Source) ~[?:?]
   at Source) ~[?:?]
   at$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:?]
   at java.awt.EventQueue.dispatchEvent(Unknown Source) ~[?:?]
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) ~[?:?]
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) ~[?:?]
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) ~[?:?]
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source) ~[?:?]
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source) ~[?:?]
   at Source) ~[?:?]</code>
Posts: 22
Joined: Fri Nov 28, 2014 7:49 pm

Re: Weird Servoy Smart Client Errors on Upgrade from 7 -> La

Postby swingman » Sun Jun 11, 2023 11:22 am

No idea, but I would start by changing

Code: Select all
new Date().setHours(


Code: Select all
(new Date()).setHours(

to clarify to the interpreter what you are trying to do...
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK - The world's most advanced open source database.
User avatar
Posts: 1474
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: Weird Servoy Smart Client Errors on Upgrade from 7 -> La

Postby d.pearce1417196993 » Sun Jun 11, 2023 1:27 pm

Thanks Christian!
A lot of them to change, but that figures, and works!!!
Posts: 22
Joined: Fri Nov 28, 2014 7:49 pm

Re: Weird Servoy Smart Client Errors on Upgrade from 7 -> La

Postby mboegem » Mon Jun 12, 2023 10:24 am

Hi David,

As you are using svyUtils module and need to change these lines of code anyway.
Why not fix it like this:
Code: Select all
new scopes.svyDateUtils.DateTime().toStartOfDay().date
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

User avatar
Posts: 1765
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests