Web Client Login

I’ve set up a login solution using the Servoy Wiki instructions. This works fine in Developer, but will not work in Server using the web client. When I enter the name and password, “Loading” flashes quickly in the browser window, but the solution doesn’t login as expected. I’m left at the login form. The following is thrown in the server log:

java.lang.NoClassDefFoundError: com/thoughtworks/xstream/io/HierarchicalStreamDriver
at com.servoy.j2db.util.serialize.JSONSerializerWrapper.getSerializer(JSONSerializerWrapper.java:212)
at com.servoy.j2db.util.serialize.JSONSerializerWrapper.toJSON(JSONSerializerWrapper.java:83)
at com.servoy.j2db.util.serialize.JSONConverter.convertToJSON(JSONConverter.java:65)
at com.servoy.j2db.ClientState.authenticate(ClientState.java:497)
at com.servoy.j2db.scripting.JSSecurity.js_authenticate(JSSecurity.java:1290)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:158)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:311)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1768)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:837)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:158)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:406)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3190)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:156)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:572)
at com.servoy.j2db.FormController.executeFunction(FormController.java:4652)
at com.servoy.j2db.FormController.executeFunction(FormController.java:4533)
at com.servoy.j2db.FormController.executeFunction(FormController.java:4408)
at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:4260)
at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:271)
at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:217)
at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor.handleEvent(WebEventExecutor.java:454)
at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor.onEvent(WebEventExecutor.java:395)
at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor$2.onEvent(WebEventExecutor.java:181)
at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:312)
at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1279)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1358)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1465)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at com.servoy.j2db.server.servlets.Zt.doGet(Zt.java:13)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.thoughtworks.xstream.io.HierarchicalStreamDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 53 more

Any ideas?

Hi Ken,

can you share some details on the Servoy version you are using and maybe a solution/code to look at?

Hi Ken,

Seems you are using Servoy 6.1.
This version comes bundled with a jar named ‘xstream.jar’ and is referenced in the error:

Caused by: java.lang.ClassNotFoundException: com.thoughtworks.xstream.io.HierarchicalStreamDriver

How did you install your Servoy instance ?

How did you install your Servoy instance ?

Yes, I’m testing with 6.1 final. I originally did a standard install from the Servoy installer. I’ve run the “Servoy Application Server” option as well as the “Servoy Developer” option on this particular server.

I checked the server, and the xstream.jar is in the lib folder like I have on my development system.

HI Ken,

I suggest you file this as a bug in Servoy’s support system. It sounds like an issue with the JNLP.

Thanks for your help Robert!

Logged: Jira

Unfortunalty there is a little bug when running the Servoy Application Server as a Service using the wrapper, see viewtopic.php?f=16&t=19425&start=30#p104940

Luckily, it can be quickly fixed by manually editing the wrapper config file

Paul