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.

David

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(ScriptVariable.java:362) ~[?:?]
   at com.servoy.j2db.persistence.ScriptVariable.getInitValue(ScriptVariable.java:217) ~[?:?]
   at com.servoy.j2db.scripting.ScriptVariableScope.putScriptVariable(ScriptVariableScope.java:104) ~[?:?]
   at com.servoy.j2db.scripting.ScopesScope$1.putScriptVariable(ScopesScope.java:111) ~[?:?]
   at com.servoy.j2db.scripting.GlobalScope.put(GlobalScope.java:121) ~[?:?]
   at com.servoy.j2db.scripting.ScriptVariableScope.put(ScriptVariableScope.java:80) ~[?:?]
   at com.servoy.j2db.scripting.GlobalScope.createVars(GlobalScope.java:107) ~[?:?]
   at com.servoy.j2db.scripting.ScopesScope.getGlobalScope(ScopesScope.java:123) ~[?:?]
   at com.servoy.j2db.scripting.ScopesScope.get(ScopesScope.java:74) ~[?:?]
   at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:2026) ~[?:?]
   at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1684) ~[?:?]
   at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1679) ~[?:?]
   at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1559) ~[?:?]
   at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1053) ~[?:?]
   at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:90) ~[?:?]
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:380) ~[?:?]
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3944) ~[?:?]
   at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:88) ~[?:?]
   at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:718) ~[?:?]
   at com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:393) ~[?:?]
   at com.servoy.j2db.scripting.ScopesScope.executeGlobalFunction(ScopesScope.java:193) ~[?:?]
   at com.servoy.j2db.FormManager.makeSolutionSettings(FormManager.java:270) ~[?:?]
   at com.servoy.j2db.smart.SwingFormManager.makeSolutionSettings(SwingFormManager.java:180) ~[?:?]
   at com.servoy.j2db.debug.DebugJ2DBClient$DebugSwingFormMananger.makeSolutionSettings(DebugJ2DBClient.java:225) ~[?:?]
   at com.servoy.j2db.FormManager$1.run(FormManager.java:123) ~[?:?]
   at java.awt.event.InvocationEvent.dispatch(Unknown Source) ~[?:?]
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:?]
   at java.awt.EventQueue$4.run(Unknown Source) ~[?:?]
   at java.awt.EventQueue$4.run(Unknown Source) ~[?:?]
   at java.security.AccessController.doPrivileged(Unknown Source) ~[?:?]
   at java.security.ProtectionDomain$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 java.awt.EventDispatchThread.run(Unknown Source) ~[?:?]</code>
d.pearce1417196993
 
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(


into

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
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1479
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!!!
d.pearce1417196993
 
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

Image
User avatar
mboegem
 
Posts: 1797
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest