Difference between Application Server and WAR deployment

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Difference between Application Server and WAR deployment

Postby steve1376656734 » Mon Jan 04, 2016 1:40 pm

Hi,

I have a production server running 7.4.5 using a standard application server deployment model that has been running perfectly happy for some months. I have now set up a test server to prepare for our move to version 8 and am trying to do a WAR deployment. I have set up the server using Tomcat V8.0.30 and Oracle Java V1.8.0_66 (the same version as I am using for my development) and I am getting an error in the log which does not appear in production or development. The error is related to using a UUID variable in a QBSelect comparison (comparing to a column flagged as UUID) and is as follows:

Code: Select all
2016-01-01 21:20   http-nio-8080-exec-13   ERROR   com.servoy.j2db.util.Debug   Cannot convert an instance of com.servoy.j2db.util.UUID to type String   6AAEDA73-01E5-4911-B526-1ECC7B26FDF2   TMLE
org.mozilla.javascript.WrappedException: Wrapped java.lang.RuntimeException: com.servoy.j2db.dataprocessing.DataException: Cannot convert an instance of com.servoy.j2db.util.UUID to type String (TMLEDashboard/scopes/tmleDashboardQueries/getCasesNeedingOpinion#421)
       at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1815)
       at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:180)
       at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:312)
       at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1774)
       at script.getCasesNeedingOpinion(TMLEDashboard/scopes/tmleDashboardQueries/getCasesNeedingOpinion:421)
       at script.getCasesNeedingOpinionCount(TMLEDashboard/scopes/tmleDashboardQueries/getCasesNeedingOpinionCount:453)
       at script.refreshCounters(TMLE/forms/dashboard_stage2/refreshCounters:12)
       at script.onShowForm(TMLEDashboard/forms/dashboardBase/onShowForm:150)
       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:3204)
       at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:156)
       at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:628)
       at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:824)
       at com.servoy.j2db.BasicFormController.executeFormMethod(BasicFormController.java:708)
       at com.servoy.j2db.BasicFormController.executeOnShowMethod(BasicFormController.java:622)
       at com.servoy.j2db.BasicFormController.access$2(BasicFormController.java:616)
       at com.servoy.j2db.BasicFormController$1.run(BasicFormController.java:356)
       at com.servoy.j2db.server.headlessclient.EventsRunnable.run(EventsRunnable.java:58)
       at com.servoy.j2db.server.headlessclient.WebClient.executeEvents(WebClient.java:566)
       at com.servoy.j2db.server.headlessclient.dataui.WebEventExecutor.generateResponse(WebEventExecutor.java:734)
       at com.servoy.j2db.server.headlessclient.dataui.WebTabPanel$2$1.onClick(WebTabPanel.java:179)
       at com.servoy.j2db.server.headlessclient.dataui.ServoySubmitLink$1.onEvent(ServoySubmitLink.java:57)
       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:1)
       at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
       at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
       at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
       at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
       at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.RuntimeException: com.servoy.j2db.dataprocessing.DataException: Cannot convert an instance of com.servoy.j2db.util.UUID to type String
       at com.servoy.j2db.dataprocessing.JSDatabaseManager.js_getDataSetByQuery(JSDatabaseManager.java:1354)
       at sun.reflect.GeneratedMethodAccessor476.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:497)
       at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:158)
       ... 52 more
    Caused by: com.servoy.j2db.dataprocessing.DataException: Cannot convert an instance of com.servoy.j2db.util.UUID to type String
       at com.servoy.j2db.dblayer.Zb.Za(Zb.java:363)
       at com.servoy.j2db.server.Za.Zo.Za(Zo.java:1087)
       at com.servoy.j2db.server.dataprocessing.Zw.Za(Zw.java:1517)
       at com.servoy.j2db.server.dataprocessing.Zw.Za(Zw.java:821)
       at com.servoy.j2db.server.dataprocessing.Zw.performCustomQuery(Zw.java:471)
       at com.servoy.j2db.dataprocessing.FoundSetManager.getDataSetByQuery(FoundSetManager.java:2080)
       at com.servoy.j2db.dataprocessing.JSDatabaseManager.js_getDataSetByQuery(JSDatabaseManager.java:1350)
       ... 56 more


Have I done something wrong in the server setup or is this a genuine error that somehow gets masked in our V7 production environment (though everything works exactly as expected there!)?

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 330
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: Difference between Application Server and WAR deployment

Postby Andrei Costescu » Mon Jan 04, 2016 5:41 pm

Is this a 7.4.5 war deployment as well or is it Servoy 8 (which exact version)?
Maybe it doesn't know it's supposed to be a UUID column in the war deployment's repo. So maybe the column info is not up-to-date for some reason.
I guess the database is the same as on your other environments where it works (developer/...) or same structure anyway.

Did you include the active solution in the .war (if so did you have "allow datamodel changes" checked and is that table used by your solution except from js? or if only used from js was "export all tables from referenced servers" checked to have that included in the war) or do you import the solution via admin page?

Can you try it with a blank repository server (for the repo. connection configured when exporting the .war) before deploying the war - and see if that helps?
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Difference between Application Server and WAR deployment

Postby steve1376656734 » Mon Jan 04, 2016 6:15 pm

Hi Andrei,

Sorry - should have been more clear in my original post.

My production server is a standard 7.4.5 application server running on CentOS with Postgresql 9.4.5 and Oracle Java V1.8.0_60.

My test server is a clean CentOS server install with Oracle Java 1.8.0_66, Postgesql 9.4.5, Tomcat 8.0.30 and Apache 2.2.15. I created a blank repository database called servoy_repository_v7 (this matched the name used in the properties file of the export) and restored copies of my application databases from my production server.

In my developer machine (Servoy 7.4.5) I then did a WAR export WITHOUT the active solution in order to get a basic 7.4.5 server but have included all the plugins, beans, lafs and jdbc drivers, deployed that WAR onto the test server and ensured that I could get the Servoy admin page as expected. Once I had configured the server properties in the admin page I then did an export of my solution in my V7.4.5 developer and imported that into the test server using the solution import from the Servoy Admin pages. I used all the usual tick boxes that I would when I deploy the solution to my production server. This imported without issue and I went on to test the solution and immediately encountered the error that I posted.

I seem to be having real issues getting a WAR deployment up and running compared to the simplicity of the standard application server install!

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 330
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: Difference between Application Server and WAR deployment

Postby Andrei Costescu » Tue Jan 05, 2016 11:22 am

That sounds right. As long as that table/column was exported for sure. (the only thing I can think of now is maybe your production server might have that column marked correctly from previous imports and a new import would still work even if it didn't contain that info). You can manually check this to make sure in your .servoy file (unzip it and check 'export/database_info.xml' - search for that table/column).
Can you make a small sample solution that just has the same UUID column and runs the same query? (identical code)

If this still fails although it works in developer you should create a case containing the sample solution.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Difference between Application Server and WAR deployment

Postby steve1376656734 » Tue Jan 05, 2016 12:04 pm

Thanks for the advice - I have checked the export and the column in question is defined as:

Code: Select all
      <column creation_order_index="3">
        <name>contact_id</name>
        <datatype>12</datatype>
        <length>36</length>
        <flags>4</flags>
        <allow_null>1</allow_null>
        <system_value>-1</system_value>
        <title_text>i18n:tmle.generic.contact.lbl</title_text>
        <foreign_type>contact</foreign_type>
      </column>


I assume the flags specifier indicates that this is a UUID column?

I will try a sample solution now and then create a case if I can reproduce the issue.

Thanks for your assistance
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 330
Joined: Fri Aug 16, 2013 2:38 pm
Location: Ashford, UK

Re: Difference between Application Server and WAR deployment

Postby Andrei Costescu » Tue Jan 05, 2016 12:54 pm

Yes, 4 is UUID. So the export is ok.
Is the developer 7.4.5 final or some intermediate version?
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 7 guests

cron