Error on newRecord()?

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Error on newRecord()?

Postby ellenmeserow » Fri Feb 10, 2017 10:42 pm

We are finally converting to Servoy 7.4 and in QA we are running into situations where the newRecord command (on controller, or foundset, local or from a different form) cannot fire. This is what the error on screen and in the log says:


Code: Select all
Feb 10, 2017 12:40:13 PM com.servoy.j2db.util.Debug error
SEVERE: Can't find method com.servoy.j2db.BasicFormController$JSForm.js_newRecord(boolean,boolean). (PRISM/forms/ContractsIssues/NewIssue#6)
org.mozilla.javascript.EvaluatorException: Can't find method com.servoy.j2db.BasicFormController$JSForm.js_newRecord(boolean,boolean). (PRISM/forms/ContractsIssues/NewIssue#6)
   at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:103)
   at org.mozilla.javascript.Context.reportRuntimeError(Context.java:956)
   at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1003)
   at org.mozilla.javascript.Context.reportRuntimeError1(Context.java:971)
   at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:183)
   at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:70)
   at org.mozilla.javascript.gen.PRISM_forms_ContractsIssues_NewIssue_285._c_NewIssue_0(PRISM/forms/ContractsIssues/NewIssue:6)
   at org.mozilla.javascript.gen.PRISM_forms_ContractsIssues_NewIssue_285.call(PRISM/forms/ContractsIssues/NewIssue)
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:406)
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3204)
   at org.mozilla.javascript.gen.PRISM_forms_ContractsIssues_NewIssue_285.call(PRISM/forms/ContractsIssues/NewIssue)
   at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:628)
   at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:824)
   at com.servoy.j2db.FormController.executeFunction(FormController.java:1277)
   at com.servoy.j2db.FormController.executeFunction(FormController.java:1144)
   at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:1056)
   at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:284)
   at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:250)
   at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:218)
   at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:213)
   at com.servoy.j2db.smart.dataui.AbstractScriptButton$2.actionPerformed(AbstractScriptButton.java:660)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$300(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue$4.run(Unknown Source)
   at java.awt.EventQueue$4.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.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)

ellen escarcega (formerly meserow)
meserow design
Servoy 2019 9
MSSQL 2017
Windows AWS Servers
ellenmeserow
 
Posts: 366
Joined: Sat Aug 07, 2004 10:18 pm
Location: Seattle, WA USA

Re: Error on newRecord()?

Postby sean » Fri Feb 10, 2017 11:16 pm

Hi Ellen,

Congrats on your upgrade (why not go all the way to 8.1.2 ? :wink: )

I believe that some time ago the method:
Code: Select all
controller.newRecord(boolean,boolean);

...was deprecated.

You'll have to refactor your usage to pass nothing, integer or boolean. There is no second argument.
BTW, you probably have some (potentially many) eclipse build markers which tell you things like this.
You can use that to find all the improper usage of APIs.

Here is a link to the docs

I hope this helps
Software Engineer
Servoy USA
sean
 
Posts: 370
Joined: Mon May 21, 2007 6:26 pm
Location: USA


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 13 guests