Servoy smart client 7.3 crashes on startup

Absolutely, latest signtester (latest I could find anyway) - version 1.3

Also, Servoy (and databases - although I doubt that matters) were closed when I ran it.

Servoy is broken on all my machines apart from the server its-self which I guess has old certificates…

My (one) server is 4.1.7, but it did resign for all jars. Now I am getting “cannot find data service it may not be running on server”

Wow… In the past week, I have probably spent about 3 full days trying to make Servoy work IN ANY WAY POSSIBLE on our machines. We are all without Servoy apart from on our server. I have bought (for $365 !!!) the code signing certificate, and tried endless ways to make this work. I am an IT consultant with 20 years experience. Should it really be THIS difficult to make software (that I have been using and selling successfully for 10+ years) work at all - even to simply start up??

Am at the end of my tether.

my guess is that your certificate is not valid.

Maybe you can ask another one (like robert) to sign your stuff for you with its certificate and see if that then works out of the box (so the only thing you change in your process is using another certificate)
if that works then you need to go back to your certificate provider and tell them that it doesn’t work for Java.
(maybe you generated it wrong, i am not sure)

if you get “cannot find data service it may not be running on server” did you get any dialog or error before that? (like java webstart telling you that it is blocked?)
because if it does then that happens.
other wise that message mostly means that the port is not open (rmi) on the server or the socket factory can’t be set (that’s also an error in the log)
then you have to specify “direct connection” in the proxy settings or use the tunnel (http or http&socket) instead of 2 way socket.

Hi Johan.

I am sorry. I am close to ranting and my frustration is starting to get the better of me. I don’t mean to sound annoyed. Thank you for the replies and patience.

Is there no other way to check whether the code signing certificate is invalid? Everything seems to work to the point of running servoy client (the signing process looks like it is working).

When I try to start it now, I get no errors before ‘not running on server’. Only a grey servoy window with ‘ready’ at the bottom.

The java console log includes this which seems significant, but I don’t know how to interpret or fix it:

Jan 15, 2014 4:47:03 PM com.servoy.j2db.util.Debug error
SEVERE: Already factory registered com.servoy.j2db.util.rmi.Zo

Also, maybe I did generate it wrong, but i followed as closely as possible this instruction from Scott:

http://www.servoyguy.com/knowledge_base … _and_beans

which is also the reason I chose Comodo as the certificate provider…

As for the other (new) issue, my java preferences are set to direct connection.

bevil:
The java console log includes this which seems significant, but I don’t know how to interpret or fix it:

Jan 15, 2014 4:47:03 PM com.servoy.j2db.util.Debug error
SEVERE: Already factory registered com.servoy.j2db.util.rmi.Zo

if you come that far, everything signing was is correct.

This is the issue i talked about on my last post
The rmi socket factory can’t be set because webstart already set it for you. Then we can’t talk to the server

see this page: https://wiki.servoy.com/display/DOCS/Ne … d+settings

under “Available Connection modes”

“However, in case Java WebStart on the client machine is configured to connect through a proxy, Servoy will not be able to instantiate Two-Way socket and thus falls back to the Direct Connection mode, with the restrictions that come with Direct Connection mode. It is possible to configure Java WebStart on each client machine to not use a proxy, but this needs to be done on each individual machine and might conflict with other Java WebStart applications that do require the proxy settings. If this happens then on the client the java preferences → network settings need to be changed, so that the proxy settings are configured as “direct connection” instead of “use browser”. Better is to use one of the tunnels below.”

So you have to change your java preferences (on every client) or switch from 2 way socket to a tunnel mode one.

Hi Johan, Nice to see you at ServoyCamp 3…

I am still having trouble with this, and I am not sure if it is a signing issue still or a direct connection problem.

I have again resigned my jars in my servoy 4.1.7 solution with my bought Comodo code signing certificate. It seems to unsign repack and resign them successfully (although I don’t know if there is any way to check or confirm it once it is done… It verifies whether I re-sign my jars or not.)

Once done, I try to launch servoy client from my laptop, and I get a grey screen with Ready at the bottom. After a while it says “Cannot find dataservice, it may not be running on server.”

My console says this:

CacheEntry[http://www.templeton-smith.com:8080/servoy-client/servoy_client.jnlp]: updateAvailable=false,lastModified=Mon Jan 27 12:42:05 GMT 2014,length=-1
CacheEntry[http://www.templeton-smith.com:8080/servoy-client/servoy_client.jnlp]: updateAvailable=false,lastModified=Mon Jan 27 12:42:05 GMT 2014,length=-1
Java Web Start 10.51.2.13
Using JRE version 1.7.0_51-b13 Java HotSpot™ 64-Bit Server VM
User home directory = /Users/bevil

c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to

Jan 27, 2014 1:29:25 PM com.servoy.j2db.util.Debug error
SEVERE: Throwable
java.net.ConnectException: Operation timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
at sun.security.ssl.SSLSocketImpl.(SSLSocketImpl.java:407)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
at com.servoy.j2db.util.rmi.Zj.Zb(Zj.java:104)
at com.servoy.j2db.util.rmi.Zj.(Zj.java:91)
at com.servoy.j2db.util.rmi.Zo.Za(Zo.java:58)
at com.servoy.j2db.J2DBClient.Za(J2DBClient.java:1549)
at com.servoy.j2db.J2DBClient.Zi(J2DBClient.java:6)
at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:595)
at com.servoy.j2db.J2DBClient.main(J2DBClient.java:201)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)

Jan 27, 2014 1:29:25 PM com.servoy.j2db.util.Debug error
SEVERE: Already factory registered com.servoy.j2db.util.rmi.Zo
java.net.ConnectException: Operation timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
at sun.security.ssl.SSLSocketImpl.(SSLSocketImpl.java:407)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
at com.servoy.j2db.util.rmi.Zo.createSocket(Zo.java:37)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:101)
at com.servoy.j2db.J2DBClient.getServerService(J2DBClient.java:1497)
at com.servoy.j2db.J2DBClient.Ze(J2DBClient.java:1145)
at com.servoy.j2db.ClientState.dataServerInit(ClientState.java:207)
at com.servoy.j2db.J2DBClient.dataServerInit(J2DBClient.java:1365)
at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:171)
at com.servoy.j2db.J2DBClient.main(J2DBClient.java:201)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)
Jan 27, 2014 1:29:35 PM com.servoy.j2db.util.Debug error
SEVERE: Connection failed to: http://www.templeton-smith.com:1101 with endpoint: Endpoint:www.templeton-smith.com:1101, waiting a bit (4s)
java.io.IOException: Operation timed out
at com.servoy.j2db.util.rmi.Zo.createSocket(Zo.java:38)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:101)
at com.servoy.j2db.J2DBClient.getServerService(J2DBClient.java:1497)
at com.servoy.j2db.J2DBClient.Ze(J2DBClient.java:1145)
at com.servoy.j2db.ClientState.dataServerInit(ClientState.java:207)
at com.servoy.j2db.J2DBClient.dataServerInit(J2DBClient.java:1365)
at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:171)
at com.servoy.j2db.J2DBClient.main(J2DBClient.java:201)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)

java.net.ConnectException: Operation timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
at sun.security.ssl.SSLSocketImpl.(SSLSocketImpl.java:407)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
at com.servoy.j2db.util.rmi.Zo.createSocket(Zo.java:37)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:101)
at com.servoy.j2db.J2DBClient.getServerService(J2DBClient.java:1497)
at com.servoy.j2db.J2DBClient.Ze(J2DBClient.java:1145)
at com.servoy.j2db.ClientState.dataServerInit(ClientState.java:207)
at com.servoy.j2db.J2DBClient.dataServerInit(J2DBClient.java:1365)
at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:171)
at com.servoy.j2db.J2DBClient.main(J2DBClient.java:201)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)
Jan 27, 2014 1:29:48 PM com.servoy.j2db.util.Debug error
SEVERE: Connection failed to: http://www.templeton-smith.com:1101 with endpoint: Endpoint:www.templeton-smith.com:1101, waiting a bit (8s)
java.io.IOException: Operation timed out
at com.servoy.j2db.util.rmi.Zo.createSocket(Zo.java:38)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:101)
at com.servoy.j2db.J2DBClient.getServerService(J2DBClient.java:1497)
at com.servoy.j2db.J2DBClient.Ze(J2DBClient.java:1145)
at com.servoy.j2db.ClientState.dataServerInit(ClientState.java:207)
at com.servoy.j2db.J2DBClient.dataServerInit(J2DBClient.java:1365)
at com.servoy.j2db.J2DBClient.startupApplication(J2DBClient.java:171)
at com.servoy.j2db.J2DBClient.main(J2DBClient.java:201)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)

I have tried with and without ‘SocketFactory.useTwoWaySocket:’ ticked.

If I try to run Servoy client on the server its-self, I get an error that “Failed to validate certificate. The application will not be executed.” I don’t know if there are cached certificates on the server? Does it need to be purged once I’ve signed my jars?

Therefore I am still unclear whether signing the jars has been successful, and it is difficult to know whether it is that or something else that is causing the problems.

Thanks for any help or advice anyone can offer.

Bevil

On my server its-self (which is still Java 6), I get this in the console:

java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: java.security.InvalidKeyException: Wrong key usage
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(TrustDecider.java:723)
at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(AppPolicy.java:288)
at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(LaunchDownload.java:1833)
at com.sun.javaws.LaunchDownload.checkSignedResources(LaunchDownload.java:1512)
at com.sun.javaws.Launcher.prepareResources(Launcher.java:1283)
at com.sun.javaws.Launcher.prepareAllResources(Launcher.java:636)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:338)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:238)
at com.sun.javaws.Launcher.launch(Launcher.java:127)
at com.sun.javaws.Main.launchApp(Main.java:454)
at com.sun.javaws.Main.continueInSecureThread(Main.java:286)
at com.sun.javaws.Main$1.run(Main.java:119)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.security.cert.CertPathValidatorException: java.security.InvalidKeyException: Wrong key usage
at sun.security.provider.certpath.OCSPResponse.verifyResponse(OCSPResponse.java:456)
at sun.security.provider.certpath.OCSPResponse.(OCSPResponse.java:411)
at sun.security.provider.certpath.OCSP.check(OCSP.java:216)
at sun.security.provider.certpath.OCSP.check(OCSP.java:120)
at com.sun.deploy.security.TrustDecider.doOCSPEEValidation(TrustDecider.java:1010)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(TrustDecider.java:704)
… 12 more
Caused by: java.security.InvalidKeyException: Wrong key usage
at java.security.Signature.initVerify(Signature.java:459)
at sun.security.provider.certpath.OCSPResponse.verifyResponse(OCSPResponse.java:440)
… 17 more

no 2 way socket doesn’t work, you need to use the tunnel sebster/http/socket (but i don’t know if we really ship that with servoy 4 from the top of my head)

or you just say in your java preferences that it must use a direct connection. (on every client)

that second error is i guess that java 6 doesn’t understand that new kind of certificate.

I have had it with Servoy 4.1, so have moved our solution up to Servoy 7.3 (.0). It now works (with all sorts of other errors and graphical issues), but I have not re-signed the jars at all on the 7.3 install. Do I still need to do it? If I don’t, then is it worth trying to get my money back for the certificate? Despite the errors, it seems to work…

if you don’t need signing and you don’t include 3th party plugins and beans then you are fine just using Servoy’s signing.

I am still - 1.5 months later - trying to make this work. I now have customers whose Servoy clients are beginning to fail and crash and not run after IP changes and etc. Which seem to be certificate issues.

I am able to get my jars to sign, but I get an invalidKeyException: Wrong key usage error if I open servoy client with a Java 6 machine, and

ERROR - Debug - Fatal Exception
ERROR - Debug - Throwable
java.lang.RuntimeException: Cannot open solution
at com.servoy.j2db.ClientState.selectSolutionToLoad(ClientState.java:489)
at com.servoy.j2db.smart.J2DBClient.selectSolutionToLoad(J2DBClient.java:1913)
at com.servoy.j2db.ClientState.selectAndOpenSolution(ClientState.java:428)
at com.servoy.j2db.smart.J2DBClient.startupApplication(J2DBClient.java:792)
at com.servoy.j2db.smart.J2DBClient$4.run(J2DBClient.java:695)
at com.servoy.j2db.smart.J2DBClient.mainImpl(J2DBClient.java:719)
at com.servoy.j2db.smart.J2DBClient.main(J2DBClient.java:682)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)

If I try to run client on a java 7 machine.

Is there anything else to try?

From http://bugs.java.com/bugdatabase/view_b … id=7198537: A workaround is to disable certificate checking by OCSP. Use CRLs instead (in Java preferences panel > Advanced)