Problems with Batch Processors - not authenticated client

The forum to discuss the Headless version of Servoy. Web, Java and Servlet development questions can all be posted here.

Problems with Batch Processors - not authenticated client

Postby s.hinrichs » Thu May 31, 2018 10:22 am

Hey guys,

we have a few problems with Batch Processors. We run all of our Batch Processors on a Application Server only for Batch Processors. In the past, we didn't have any problems running these but in the last few weeks, maybe because of more and more Batchjobs, we were noticing that some shut down automatically without errorlogs. When we restart the Batch Processors in Admin Page we get following errorstack:

Code: Select all
java.lang.RuntimeException: Couldn't get remote service: 'net.stuff.servoy.busy' for a not authenticated client
     at com.servoy.j2db.server.main.Zn.getRemoteService(Zn.java:92)
     at com.servoy.j2db.ClientState.getServerService(ClientState.java:870)
     at com.servoy.j2db.plugins.ClientPluginAccessProvider.getRemoteService(ClientPluginAccessProvider.java:346)
     at com.servoy.j2db.plugins.ClientPluginAccessProvider.getServerService(ClientPluginAccessProvider.java:341)
     at com.servoyguy.plugins.busy.BusyClientPlugin.unload(BusyClientPlugin.java:97)
     at com.servoy.j2db.plugins.PluginManager.flushCachedItems(PluginManager.java:140)
     at com.servoy.j2db.ClientState.shutDown(ClientState.java:1090)
     at com.servoy.j2db.server.headlessclient.SessionClient.shutDown(SessionClient.java:331)
     at com.servoy.j2db.server.main.Zz.shutDown(Zz.java:14)
     at com.servoy.j2db.server.servlets.ConfigServlet.Za(ConfigServlet.java:6262)
     at com.servoy.j2db.server.servlets.ConfigServlet.service(ConfigServlet.java:3371)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
     at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
     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:199)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
     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:784)
     at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
     at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
     at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
     at java.lang.Thread.run(Unknown Source)


We found out that the class is used by Servoy busy plugin. Of course, we don't use the plugin in our Batch Processors but we think Servoy using it for some stuff.

So first question: Is this error the cause that our Batch Processors shut down automatically?

And second question: We guess that there are two ways to prevent this error, adding the class 'net.stuff.servoy.busy' to servoy.application_server.trustedRemotePlugins in Admin Page or authenticating the headless Client of Batch Processor. What is best practice in this case?

Best regards, Stefan Hinrichs
s.hinrichs
 
Posts: 2
Joined: Thu May 31, 2018 9:53 am
Location: Osnabrück, Germany

Re: Problems with Batch Processors - not authenticated clien

Postby mboegem » Thu May 31, 2018 1:25 pm

Hi Stefan,

you basically answered your own question.

First of all: As you mentioned, you shouldn't use any swing components in a headless client.

On your second question: Both solutions are valid AFAIK.
1) adding it to trustedRemotePlugins, will resolve a possible future situation with other clients as well.
2) in this case authenticating your client should also work.

I'd prefer adding to trustedRemotePlugins.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1742
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Problems with Batch Processors - not authenticated clien

Postby s.hinrichs » Fri Jun 01, 2018 4:02 pm

Hi Marc,
thank you for your quick response. We add the class 'net.stuff.servoy.busy' to trustedRemotePlugins and it seems to work.
s.hinrichs
 
Posts: 2
Joined: Thu May 31, 2018 9:53 am
Location: Osnabrück, Germany


Return to Servoy Headless Client

Who is online

Users browsing this forum: No registered users and 4 guests