I have a form in a web client solution with an html area for a global variable that contains a link to a form method, eg.
New Applicant? Click here to set up your account
The method register() closes the existing solution and opens another, eg:
function register()
{
application.closeSolution(‘register’);
}
Clicking on the link in the form fires the register() method and it seems to function ok most of the time, eg. the register solution opens, but an error is thrown whenever the link is clicked:
com.servoy.j2db.util.Debug Could not eval the string ‘register()’
The troublesome thing is that about 20% of the time the application.closeSolution in the function doesn’t fire - the new solution won’t open and the screen from the first solution remains displayed in the browser. I’ve tried moving the register() method to a global method, and even changed its name - but I still get the error – it is complaining about the name of the method.
Anybody have an idea of what’s going on?
Servoy 4.1.4 - build 681. The stack trace follows;
org.mozilla.javascript.WrappedException: Wrapped com.servoy.j2db.ExitScriptException: Solution closed (register#3) at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1828) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:199) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:347) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666) at script.register(register:3) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166) at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:101) at org.mozilla.javascript.gen.c1._c0(internal_anon:1) at org.mozilla.javascript.gen.c1.call(internal_anon) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3125) at org.mozilla.javascript.gen.c1.call(internal_anon) at org.mozilla.javascript.gen.c1.exec(internal_anon) at org.mozilla.javascript.Context.evaluateString(Context.java:1233) at com.servoy.j2db.FormController.eval(FormController.java:1067) at com.servoy.j2db.server.headlessclient.dataui.InlineScriptExecutorBehavior.respond(InlineScriptExecutorBehavior.java:2) at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:297) at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:104) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1239) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1316) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418) at org.apache.wicket.RequestCycle.request(RequestCycle.java:532) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:636) Caused by: com.servoy.j2db.ExitScriptException: Solution closed at com.servoy.j2db.scripting.JSApplication.js_closeSolution(JSApplication.java:796) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179) … 39 more