Luc14860 / jwebsocket

Automatically exported from code.google.com/p/jwebsocket
0 stars 0 forks source link

"jWebSocket TCP-Engine (80, non secured)" java.lang.NoClassDefFoundError: com/sun/net/ssl/internal/ssl/SSLSocketImpl #140

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Launched jWebSocketServer 1.0b1 on port 80 as a standalone. I use Ubuntu 
10.10(maverick) with Java 1.6.

When I try to connect to it I get "jWebSocket TCP-Engine (80, non secured)" 
java.lang.NoClassDefFoundError: com/sun/net/ssl/internal/ssl/SSLSocketImpl.

I had the same issue on windows server but I found out that it does not play 
nice with Java 7 so I reverted to Java 6 and it worked.

Original issue reported on code.google.com by vikram.2...@gmail.com on 14 Nov 2011 at 8:22

GoogleCodeExporter commented 9 years ago
Hi vikram.2.cold, com/sun/net/ssl/internal/ssl/SSLSocketImpl was required in 
old versions of jWebSocket to support SSL communication. The SSLSocketImpl 
class was part of SUN JDK 1.6 implementation and does not exists in OpenJDK. If 
you are using JDK 1.6 version, I quite sure that you are using OpenJDK in 
ubuntu. How to solve it? Simply install SUN JDK 1.6 and remove the OpenJDK.

But, this is solved in new versions of jWebSocket. The new Java 7 OpenJDK 
include this SSL support. So OpenJDK 7 is the unique JVM we need for the future 
;)

Original comment by kyberne...@gmail.com on 14 Nov 2011 at 9:43

GoogleCodeExporter commented 9 years ago
I've downloaded last version jWebSocket1.0b1, and have same problem in windows 
XP, it works pretty well with Java 6, but after installing Java 7, same problem 
arises

[code]

Exception in thread "jWebSocket TCP-Engine (8787, non secured)" java.lang.NoClas
sDefFoundError: com/sun/net/ssl/internal/ssl/SSLSocketImpl
        at org.jwebsocket.tcp.TCPEngine.processHandshake(TCPEngine.java:341)
        at org.jwebsocket.tcp.TCPEngine.access$200(TCPEngine.java:54)
        at org.jwebsocket.tcp.TCPEngine$EngineListener.run(TCPEngine.java:445)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.SSLSoc
ketImpl
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 4 more

[/code]

Then will be a fix to work in Oracle Java 7 JDK ? 

Original comment by hernan.e...@gmail.com on 16 Nov 2011 at 4:17

GoogleCodeExporter commented 9 years ago
I just installed Java 7 and got the same problem. With Java 6 it was working 
properly.

Original comment by stojadin...@gmail.com on 16 Dec 2011 at 12:14

GoogleCodeExporter commented 9 years ago
Any update on this?

Original comment by Jan.Hol...@gmail.com on 2 Mar 2012 at 4:02

GoogleCodeExporter commented 9 years ago
I ran into this problem a long time ago. Here's what's going on. An interface 
(Socket, if I remember correctly) is being cast to an implementation type 
(SSLSocketImpl) to check for the SSL connection. The particular implementation 
type will be specific to a given JRE and hence isn't portable (ie, might not 
work in Java 7). The check should look for SSLSocket (the interface type which 
is part of the stable API) instead if SSLSocketImpl. I thought the type casting 
was fixed a while back though.

Original comment by cuc...@gmail.com on 16 Mar 2012 at 6:00

GoogleCodeExporter commented 9 years ago
We will check for that ASAP.

Original comment by fivefeetfurther@gmail.com on 14 Apr 2012 at 12:48