Defect #1325
Velocity webservice defect after update to Servoy 8.3 RC
0%
Description
I am testing Servoy 8.3 RC. Velocity plugin (webservice) is defect. Plugin version: Velocity: 3.5.5.
In version Servoy 8.2.3 it's working OK.
Error text from Status report:
*type Status report
message com.servoy.j2db.ExitScriptException: killing current script, client/solution already terminated at com.servoy.j2db.scripting.ServoyWrapFactory.wrap(ServoyWrapFactory.java:69) at org.mozilla.javascript.Context.javaToJS(Context.java:1838) at net.stuff.servoy.plugin.velocityreport.server.VelocityWebServlet.getParametersMap(VelocityWebServlet.java:1956) at net.stuff.servoy.plugin.velocityreport.server.VelocityWebServlet.vrService(VelocityWebServlet.java:622) at net.stuff.servoy.plugin.velocityreport.server.VelocityWebServlet.doGet(VelocityWebServlet.java:201) at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at com.servoy.j2db.server.servlets.WebServicesServlet.service(WebServicesServlet.java:29) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at com.servoy.j2db.server.ngclient.startup.resourceprovider.ResourceProvider.doFilter(ResourceProvider.java:352) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:726) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:394) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311) at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)
description The request sent by the client was syntactically incorrect.
*
History
Updated by Sjoerd Hannema about 7 years ago
Just updated to Servoy 8.3 RC2. The Velocity webclient is still not working OK.
First webpage is loaded but then after clicking I get different errors. Looks like it's closing connection before returning the results of the new context.
Type of application is: POOL.
Error in developer:
ERROR com.servoy.j2db.util.Debug - Invocation of method 'get' in class net.stuff.servoy.util.velocity.RecordWrapper threw exception java.lang.NoClassDefFoundError: org/mozilla/javascript/CharSequenceBuffer at /template/products_overview_page.html[line 87, column 81]
Error in webpage result:HTTP Status 400 - java.lang.RuntimeException: Result is null for this request at net.stuff.servoy.plugin.velocityreport.server.VelocityWebServlet.vrService(VelocityWebServlet.java:1213) at net.stuff.servoy.plugin.velocityreport.server.VelocityWebServlet.doGet(VelocityWebServlet.java:201) at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at com.servoy.j2db.server.servlets.WebServicesServlet.service(WebServicesServlet.java:40) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
Updated by Sjoerd Hannema almost 7 years ago
Servoy 8.3 is final since last friday. Velocity/servoy-service is still give errors and is not working anymore like in Servoy 8.2.3.
Any update on what is changed in latest version of Servoy what has broken the Velocity plugin?
Error in browser:HTTP Status 400 - com.servoy.j2db.ExitScriptException: killing current script, client/solution already terminated at com.servoy.j2db.scripting.ServoyWrapFactory.wrap(ServoyWrapFactory.java:69) at org.mozilla.javascript.Context.javaToJS(Context.java:1838) at net.stuff.servoy.plugin.velocityreport.server.VelocityWebServlet.getParametersMap(VelocityWebServlet.java:1956) at net.stuff.servoy.plugin.velocityreport.server.VelocityWebServlet.vrService(VelocityWebServlet.java:622) at net.stuff.servoy.plugin.velocityreport.server.VelocityWebServlet.doGet(VelocityWebServlet.java:201) at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) at jav
Error in Developer --> Calculations etc give also errors:ERROR com.servoy.j2db.util.Debug - Exceptie bij het uitvoeren van berekening: html_message_subject van tabel muta_messages_service, fout com.servoy.j2db.ExitScriptException: killing current script, client/solution already terminated
ERROR com.servoy.j2db.util.Debug - error executing calc: html_message_subject
ERROR com.servoy.j2db.util.Debug - Exceptie bij het uitvoeren van berekening: html_message_subject van tabel muta_messages_service, fout com.servoy.j2db.ExitScriptException: killing current script, client/solution already terminated
ERROR com.servoy.j2db.util.Debug - error executing calc: html_message_subject
Updated by Patrick Talbot almost 7 years ago
Yes, I was waiting for a final version to do some more digging. There is likely some class changes in Servoy internals that are causing this, possibly jar version mismatch. I will get to it this week, hopefully I'll be able to find out what's going on.
Updated by Patrick Talbot almost 7 years ago
- Status changed from New to Resolved
The class org.mozilla.javascript.CharSequenceBuffer is no longer present in Servoy 8.3 Rhino lib/js.jar - I've removed the reference to it.
No other issue was reproducible using a clean install of Servoy 8.3 with a pretty large Velocity application.
Changes done in v3.5.56
Updated by Sjoerd Hannema almost 7 years ago
Hello Patrick,
I have downloaded the updated plugin v3.5.56 and installed in my 8.3 version. It's still the same error and behaviour.
Errors: killing current script, client/solution already terminated
What I have not tested is a fresh install of version 8.3 with the new plugin version. Any tips or do I have to do a fresh install?
Updated by Patrick Talbot almost 7 years ago
I would advise testing with a fresh install.
As I said, apart from the CharSequenceBuffer which I have fixed in v3.5.56, I have seen no other issues on a big app of one of my clients on a fresh developer 8.3 installation. Yet the application is pretty complex and uses lots of Velocity features, including authentication, session stored variables, cookies, PDF rendering, calls to external services, etc.
Updated by Sjoerd Hannema almost 7 years ago
Hello Patrick,
Today I tested the updated plugin-file (Velocity-v3.5.56.zip) with a fresh install of Servoy 8.3. A new workspace and imported solution VelocityWebClient.
After installation and changing plugin-settings the website is running: http://localhost:8080/servoy-service/velocity/VelocityWebClient/index.html
Fist page is running fine. Also the companies, contacts, contact Grid.
Plugin is giving problems with contact list PDF. "HTTP Status 400 - java.lang.RuntimeException: Result is null for this request at "
JSON, XML is working. The XLS is also downloading a file. But with strange content. It's HTML content and not XLS format.
On the test-page: Show-Javascript error is given also problems. "killing current script, client/solution already terminated".
When browser/website is in this error every page of the VelocityWebClient website is in the same error. First the session has to be closed by closing the browser.
Please check again. I can't see any difference with plugin version v3.5.55.
Updated by Sjoerd Hannema almost 7 years ago
Hello Patrick,
After some more testing I can conclude that version 3.5.56 is working OK.
For some reason I had a conflict in bootstrap.js. There was a old bootstrap.js file loaded and conflicting. After clean install it was still conflicting because of browser cache.
After removing cache the clean install Servoy 8.3 was working with velocity. After some debug time I found the double bootstrap install.
Updated by Robert Ivens almost 7 years ago
About the HTTP Status 400 - com.servoy.j2db.ExitScriptException: killing current script.
I noticed that a client was open on the server with no solution (in developer). It couldn't be closed either from the servoy-admin page.
When I ran a solution it opened another client. When I then used velocity it opened another client and gave me the error. So 3 clients open. Which is not correct in a Developer environment I think.
Anyway, after restarting Developer this ghost client was gone and everything worked normally again.
So perhaps the the 'killed current script' has something to do with hanging sessions (clients)?
My experience was with v3.5.56 in Servoy 8.2.3
Updated by Sjoerd Hannema almost 7 years ago
I think also that hanging sessions can be the problem. Or conflicts with other plugins.
With testing I restarted developer frequently. Killing current script was not always happening.
In my main solution is have switched off in the onOpen function the call to the Google2 plugin. : plugins.Google2.setupApplication(applicationName, clientID, clientSecret)
When this one is not called velocity is working in Developer.
But maybe this Google2 plugin is opening the session what is not given free again?