 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
menkaur@gmail.com Guest
|
Posted: Tue Apr 17, 2007 1:29 pm Post subject: exception in jsse client |
|
|
Hi. I'm new to java and i'm trying to implement a simple secure client-
server communication using jsse. The server seems to work properly,
but when the client tryes to connect to it, it gets exception:
HelloClient exception: Exception creating connection to: 10.10.10.10;
nested exception is:
java.net.SocketException:
java.security.NoSuchAlgorithmException: Error constructing
implementation (algorithm: Default, provider: SunJSSE, cl
ass: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
java.rmi.ConnectIOException: Exception creating connection to:
10.10.10.10; nested exception is:
java.net.SocketException:
java.security.NoSuchAlgorithmException: Error constructing
implementation (algorithm: Default, provider: SunJSSE, cl
ass: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
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.invoke(Unknown Source)
at
java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown
Source)
at
java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
at $Proxy0.sayHello(Unknown Source)
at HelloClient.main(HelloClient.java:25)
Caused by: java.net.SocketException:
java.security.NoSuchAlgorithmException: Error constructing
implementation (algorithm: Default, provider: SunJSSE,
class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
at
javax.net.ssl.DefaultSSLSocketFactory.throwException(Unknown Source)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(Unknown
Source)
at
RMISSLClientSocketFactory.createSocket(RMISSLClientSocketFactory.java:
55)
... 8 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing
implementation (algorithm: Default, provider: SunJSSE, class:
com.sun.net.ssl.in
ternal.ssl.DefaultSSLContextImpl)
at java.security.Provider$Service.newInstance(Unknown Source)
at sun.security.jca.GetInstance.getInstance(Unknown Source)
at sun.security.jca.GetInstance.getInstance(Unknown Source)
at javax.net.ssl.SSLContext.getInstance(Unknown Source)
at javax.net.ssl.SSLContext.getDefault(Unknown Source)
at javax.net.ssl.SSLSocketFactory.getDefault(Unknown Source)
at
RMISSLClientSocketFactory.createSocket(RMISSLClientSocketFactory.java:
54)
... 8 more
Caused by: java.security.UnrecoverableKeyException: Password must not
be null
at sun.security.provider.JavaKeyStore.engineGetKey(Unknown
Source)
at sun.security.provider.JavaKeyStore$JKS.engineGetKey(Unknown
Source)
at java.security.KeyStore.getKey(Unknown Source)
at
com.sun.net.ssl.internal.ssl.SunX509KeyManagerImpl.<init>(Unknown
Source)
at com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl
$SunX509.engineInit(Unknown Source)
at javax.net.ssl.KeyManagerFactory.init(Unknown Source)
at
com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl.getDefaultKeyManager(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl.<init>(Unknown
Source)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
... 15 more
C:\Documents and Settings\user\My Documents\Ун?верситет\10 сем\subjects
\java\lrr\4\test\rmi\secureClient>secureClient.bat
C:\Documents and Settings\user\My Documents\Ун?верситет\10 сем\subjects
\java\lrr\4\test\rmi\secureClient>java -jar -
Djavax.net.ssl.keyStore=testkeys s
ecureClient.jar
HelloClient exception: Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
java.rmi.server.ExportException: Port already in use: 1099; nested
exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown
Source)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown
Source)
at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unknown
Source)
at sun.rmi.registry.RegistryImpl.setup(Unknown Source)
at sun.rmi.registry.RegistryImpl.<init>(Unknown Source)
at java.rmi.registry.LocateRegistry.createRegistry(Unknown
Source)
at HelloClient.main(HelloClient.java:20)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(Unknown
Source)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(Unknown
Source)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown
Source)
... 9 more
The command line for client is: java -jar -
Djavax.net.ssl.keyStore=testkeys secureClient.jar
What's wrong? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|