Page 1 of 1

Win10 / UserManager: Cannot call method client of undefined

PostPosted: Tue Mar 14, 2017 5:54 pm
by Bernd.N
Our client is testing now Windows 10 Enterprise with latest Java 8u121 and our Servoy 7 smart client.
He gets this message:
client.jpg
client.jpg (12.11 KiB) Viewed 7632 times

We assume that is this second line of code:
Code: Select all
scopes.utils.registerPlugins();
scopes.ui.clientOS = plugins.UserManager.Client().osName;

On other machines (Windows 7) that code line always worked fine.
Has someone else had problems with Windows 10 Enterprise?

However the java console shows this:
The jnlp files resources are the same, starting it from cache
Mär 14, 2017 3:32:53 PM com.servoy.j2db.util.Debug error
SCHWERWIEGEND: Error ocured initializing plugin: jasperPluginRMI
com.servoy.j2db.plugins.PluginException: java.lang.RuntimeException: Couldn't get remote service: 'servoy.IJasperReportService' for a not authenticated client
at com.servoy.plugins.jasperreports.JasperReportsPlugin.initialize(JasperReportsPlugin.java:82)
at com.servoy.j2db.plugins.PluginManager.initClientPluginsEx(PluginManager.java:481)
at com.servoy.j2db.plugins.PluginManager.initClientPlugins(PluginManager.java:340)
at com.servoy.j2db.smart.J2DBClient$13.run(J2DBClient.java:1161)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Couldn't get remote service: 'servoy.IJasperReportService' for a not authenticated client

Re: Win10 / UserManager: Cannot call method client of undefi

PostPosted: Tue Mar 14, 2017 8:42 pm
by patrick
The error indicates that the plugin is not loaded ("Client" of undefined, so plugins.UserManager is undefined). As a side node: the plugin is meant to manage remote clients, not the current client. You are doing a client/server roundtrip just to figure out the operating system of yourself. That can be done a bit easier using application.getOSName().

So for some reason, the plugin is not loaded. Those other machines have the same Java version? I can't see why that should be related to the OS... Anyway, not being able to get the remote service could be an issue, although your console only shows the jasper service not being reachable. Is the UserManagerService in the list of trusted plugins on the server? It seems this goes wrong before the user is logged in.

Re: Win10 / UserManager: Cannot call method client of undefi

PostPosted: Tue Mar 14, 2017 9:43 pm
by Bernd.N
I will test this soon.

All-clear

PostPosted: Wed Mar 15, 2017 10:35 am
by Bernd.N
This seems to be not a generic problem of the described configuration.
The customer tested five new Win10 computers, and only one failed on login as described.
That will get a clean new install, and I have high hopes it will also work well.

I also changed the code to application.getOSName() as you suggested, thanks for the tip!

Re: Win10 / UserManager: Cannot call method client of undefi

PostPosted: Wed Aug 02, 2017 1:43 pm
by Bernd.N
We had now the same problem with a Windows-7-client and the latest Java 8u144.
I got the Java log from that client.
Can anybody see a clue to the root cause from that log?

Re: Win10 / UserManager: Cannot call method client of undefi

PostPosted: Wed Aug 02, 2017 2:37 pm
by patrick
Yes, I see what the problem is. The plugin tries to load a class that for some reasons cannot be read from file.

Could you try to completely clear the cache on that client and load again?

Re: Win10 / UserManager: Cannot call method client of undefi

PostPosted: Wed Aug 02, 2017 3:38 pm
by Bernd.N
The user said he did this already several times, he also uninstalled Java and installed it freshly several times.
It is a bit strange as all other clients work fine and we had this before only once in the test mentioned above.
Seems to be a very seldom case.

Re: Win10 / UserManager: Cannot call method client of undefi

PostPosted: Wed Aug 02, 2017 4:37 pm
by Bernd.N
For my understanding, Patrick, which class from which file did you mention?
Because I understood before that a certain plugin (usermanager) could not be loaded at all.
Maybe the read failure that you mention has a kind of security/access core reason?

And are all plugins downloaded to the client's cache like the main Servoy program?

Re: Win10 / UserManager: Cannot call method client of undefi

PostPosted: Wed Aug 02, 2017 4:57 pm
by patrick
It wants to load class org.apache.log4.Layout from log4j.jar but somehow that jar is damaged