Servoy R2 2.2.1 build-333 Serious Java Web Start Error

This is a brand new installation of Developer.
The Servoy version is the just-released 2.2.1 final.
Platform is Windwos XP.

Installation is on a totally clean box.
Client is local to the server.
No additional beans or plugins have been deployed.

Java (server) and JRE/JWS (client) environments are both 1.5.0.5.
Same results under 1.5.0.4

JAVA WEB START CLIENT:

Java Web Start 1.5.0_05
Using JRE version 1.5.0_05 Java HotSpot™ Client VM
User home directory = D:\Documents and Settings\w72214

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
0-5: set trace level to

Starting Servoy from C:\Program Files\Mozilla Firefox
Servoy R2 2.2.1 build-333 on Windows XP using Java 1.5.0_05
java.net.SocketException: factory already defined
java.net.SocketException: factory already defined
at java.rmi.server.RMISocketFactory.setSocketFactory(Unknown Source)
at com.servoy.j2db.J2DBClient.bh(Unknown Source)
at com.servoy.j2db.J2DBClient.if(Unknown Source)
at com.servoy.j2db.J2DBClient.main(Unknown Source)
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 com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
getWebStartURL http://localhost:8080/
java.rmi.ConnectIOException: non-JRMP server at remote endpoint
java.rmi.ConnectIOException: non-JRMP server at remote endpoint
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at com.servoy.j2db.J2DBClient.aG(Unknown Source)
at com.servoy.j2db.ClientState.dataBaseInit(Unknown Source)
at com.servoy.j2db.J2DBClient.dataBaseInit(Unknown Source)
at com.servoy.j2db.J2DBClient.if(Unknown Source)
at com.servoy.j2db.J2DBClient.main(Unknown Source)
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 com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

SERVER/DEVELOPER:

D:\tools\servoy\2.2.1\installation>servoy_developer.bat
Starting Servoy from D:\tools\servoy\2.2.1\installation
Servoy R2 2.2.1 build-333 on Windows XP using Java 1.5.0_05
Loading servoy.properties from D:\tools\servoy\2.2.1\installation\servoy.properties
Loading - Done
java.net.UnknownHostException: downloads.servoy.com
java.net.UnknownHostException: downloads.servoy.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at com.servoy.j2db.develop.c.g.a(Unknown Source)
at com.servoy.j2db.develop.c.g$2.run(Unknown Source)
at com.servoy.j2db.util.ap.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
20/10/2005 10:01:24 net.sf.hibernate.dialect.Dialect
INFO: Using dialect: net.sf.hibernate.dialect.SybaseAnywhereDialect
Using RMI registry on port 1099
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
20/10/2005 10:01:29 net.sf.hibernate.dialect.Dialect
INFO: Using dialect: net.sf.hibernate.dialect.SybaseAnywhereDialect
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
20/10/2005 10:01:35 net.sf.hibernate.dialect.Dialect
INFO: Using dialect: net.sf.hibernate.dialect.SybaseAnywhereDialect
Loading servoy.properties from D:\tools\servoy\2.2.1\installation\servoy.properties
Loading - Done
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.DataInputStream.readInt(Unknown Source)
at com.servoy.j2db.util.a.d$b.accept(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

SalernoJ:
This is a brand new installation of Developer.
The Servoy version is the just-released 2.2.1 final.
Platform is Windwos XP.

Installation is on a totally clean box.
Client is local to the server.
No additional beans or plugins have been deployed.

Java (server) and JRE/JWS (client) environments are both 1.5.0.5.
Same results under 1.5.0.4

Hi Julian –

I don’t have a brand new box to test on, but I just uninstalled the older version of Servoy on my XP Pro (SP2) and installed a freshly downloaded copy of the 2.2.1 (build 333) release. I had no problem launching Client to access the sample crm solution, using WebStart.

I don’t know how to check what Java server & JRE client versions that are running on the box, if you tell me where to look I’d be happy to do so.

I do not have the XP firewall on.

Dumb question: have you tried a restart?

kazar

Hi Ilyse.

Start the ‘Java Application Cache Viewer’ (another name for Java Web Start).
Then, Edit → Preferences → Java (Tab) → Java Application Runtime Settings → User Tab

Which Platform/product is enabled ?

Also,
Edit → Preferences → Advanced (Tab) → Java console → Show console.

Restart your app.

What appears at the top of your console ?

On the server/developer side, copy the console output to determine what version of java is running.

Are u Mac, Win or Lin ?

J

Maybe this is a 1.4 build ?
I recall the last stable was a 1.5 and there were no problems.
I think a 1.5 build with 1.4 source-level would be nice if that’s the case :)

Even if I completely uninstall 1.5.0.5, destroy my cache, reboot, have 3 coffees and install Servoy 2.2.1 completely into a brand new dir, and making sure that no repository is running thru any of this…

Problem stays :(

Bugger…I really wanted to get my OLE out today.

No problems overhere, customers also have this version in production without problems.

Do you run with servoy plugins only, ie clean install in new directory?

A lib/jar, driver or plugin could set the rmisocket before we do in a static block or something…so remove all non servoy code from your install

This is a Servoy-only install.
Nothing else.
Absolutely clean.

Hi

This seems to be a problem with proxying RMI over HTTP. The problem is that it’s not possible to use both 2-way sockets and RMI proxying over HTTP. There are 3 solutions to this problem:

  1. Disable 2-way socket: this is probably a bad solution, because it’s probably enabled for a reason, and it’s not possible to use SSL if you disable it.

  2. We can make a server property in the next release which makes sure that when 2-way is set the clients don’t try to use an HTTP proxy even if your browser says that it should. This is probably a good idea, except that it won’t help you immediately.

  3. Configure your browser so that when connecting to the Servoy Application Server you make a direct connection (and don’t use a proxy). This will have to be compatible with your firewall settings (but to use Servoy at all you need to be tune your firewall anyway, in general). This is the best option and should immediately solve your problem.

Hi guys :)

I understand what’s going on.
I’ll respond in point form and then explain what I think is a part of the problem.

  1. Disable 2-way socket: this is probably a bad solution, because it’s probably enabled for a reason, and it’s not possible to use SSL if you disable it.

I agree it’s a bad solution to disable, but I will do that in the interim to get over the hump.
Generally it should be left intact, I agree.

  1. We can make a server property in the next release which makes sure that when 2-way is set the clients don’t try to use an HTTP proxy even if your browser says that it should. This is probably a good idea, except that it won’t help you immediately.

I agree with your assessment here.
There is a rolling/repeating error (about every 5 seconds) in the JWS console. Here it is:

java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
at com.servoy.j2db.util.a.k.createSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.transport.DGCImpl_Stub.dirty(Unknown Source)
at sun.rmi.transport.DGCClient$EndpointEntry.makeDirtyCall(Unknown Source)
at sun.rmi.transport.DGCClient$EndpointEntry.access$1600(Unknown Source)
at sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

  1. Configure your browser so that when connecting to the Servoy Application Server you make a direct connection (and don’t use a proxy). This will have to be compatible with your firewall settings (but to use Servoy at all you need to be tune your firewall anyway, in general). This is the best option and should immediately solve your problem.

Understood.
What’s interesting here is that I’ve uncovered a bug in Sun’s Application Manager (aka Java Web Start); it often doesn’t honour changes to the Network Settings…selection of “Direct Connection” is often overriden by “Use Browser Settings”…and, of course, it looks at IE settings which I never use - so, 1 bug here and 1 very undesirable piece of behaviour ;)

Lastly, I have found what I think is a bug in Servoy, server-side.
I have found that 2 instances of my IServerPlugin impl class (ServoyRMIDataStreamProvider) appearing at the servoy-admin web page. Either that means 2 instances are loaded (unlikely) or there are 2 configuration instances for that server plugin. See attachment.

I’ve looked through all of my jar’s to locate potentially more than 1 instance of the class (ServoyRMIDataStreamProvider), but only one exists.
In any case, Servoy (server) would complain that a plugin with that name had already been loaded. The jar is named ‘DataStreamServerPlugin.jar’.

And as for ‘application descriptors’ - only one .jar.jnlp descriptor refers to the jar which does contain this class, and that is ‘DataStreamServerPlugin.jar.jnlp’.

So, I think there is a bug here.

What is also a bit curious is that server plugins are delivered to the JWS client.

cheers
Julian

btw…I can get everything working now, but the 2 server plugin instances and the rolling exception are bothersome.

here’s the attachment i missed…

Hi,

  1. When is the exception occurring? It seems to be using SSL? Are you sure you disabled useSSL?

  2. I’ll see that I implement the server property solution.

  3. About the double server plugin and it getting sent to the client side, I have some questions:
    a) Is there a class that implements IClientPlugin in the .jar file? Because as soon as Servoy finds one of these, the entire jar is sent to the client.
    b) Is there a class that extends a class that implements the IServerPlugin interface. Because in that case BOTH classes will be recognized as a server plugin, and it will look like there is a duplicated plugin (unless the approriate method is overridden to change the display name).

Hi Sebastian.

It seems to be using SSL? Are you sure you disabled useSSL?

Sorry, I wasn’t clear in my final statement. With SSL disabled, the exception has gone.

Is there a class that implements IClientPlugin in the .jar file?

No. There is definitely not a client plugin class impl in that jar.

Is there a class that extends a class that implements the IServerPlugin interface.

No. Definitely not.
I will send you the jar privately.

Thanks
J

Hi,

The jar you sent me is a bit incomplete (since it has dependencies that I don’t have). However I did notice that it currently only warns for duplicate CLIENT plugins, not duplicate SERVER plugins, so it is still possible that you load the class twice. Please really check to make sure this is not the case.

Furthermore, it is indeed because you have a .jnlp file that the jar is sent to the client. Do you need it on the client? If not, then just get rid of the jnlp file.

However I did notice that it currently only warns for duplicate CLIENT plugins, not duplicate SERVER plugins

Ugly :)
Maybe a fix in the next release ?

so it is still possible that you load the class twice

No…I just made the class that declares implementation of the interface to be a final class.
Compiles ok (so, no sub-classes could exist).
Same outcome wrt the duplication.

.jnlp file that the jar is sent to the client

Just like we thought :)
I’ll get rid of it.

Removing the JNLP file on the server plugin removed the 2nd instance of the server plugin class from the Server Plugin Settings screen :)

So, this (probably) means that the server (at least in Developer), loads all Server Plugin classes from jars, and then loads all Client plugins via JNLP’s and if one happens to implement IServerPlugin it gets it own config entry on that screen.

That kinda makes sense.

Hi,

This is pretty strange, since the server does not actually do anything with the JNLP files except serve them to clients when they request a jar. So you only need JNLP files for plugins that need to be sent tot he client as well.

Glad it works now though! :?