0

Java says that in this line, the file ssc.store was not found:

server = ((SSLServerSocketFactory) SSLServerSocketFactory.getDefault()).createServerSocket(port);

(server is a ServerSocket)

I try to use a libary containing this code, but I am not able to open this ServerSocket.

Full Error

Error opening ServerSocket
java.net.SocketException: java.security.NoSuchAlgorithmException: Error 
constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at javax.net.ssl.DefaultSSLServerSocketFactory.throwException(Unknown Source)
at javax.net.ssl.DefaultSSLServerSocketFactory.createServerSocket(Unknown Source)
at com.blogspot.debukkitsblog.Net.Server.start(Server.java:327)
at com.blogspot.debukkitsblog.Net.Server.<init>(Server.java:86)
at com.blogspot.debukkitsblog.Net.Server.<init>(Server.java:51)
at de.yee.GameServer.<init>(GameServer.java:16)
at de.yee.Main.main(Main.java:9)
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
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.SSLServerSocketFactory.getDefault(Unknown Source)
... 5 more
Caused by: java.security.PrivilegedActionException: java.io.FileNotFoundException: ssc.store (Das System kann die angegebene Datei nicht finden)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.SSLContextImpl$DefaultManagersHolder.getKeyManagers(Unknown Source)
at sun.security.ssl.SSLContextImpl$DefaultManagersHolder.<clinit>(Unknown Source)
at sun.security.ssl.SSLContextImpl$DefaultSSLContext.<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)
... 11 more
Caused by: java.io.FileNotFoundException: ssc.store (Das System kann die angegebene Datei nicht finden)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.security.ssl.SSLContextImpl$DefaultManagersHolder$2.run(Unknown Source)
at sun.security.ssl.SSLContextImpl$DefaultManagersHolder$2.run(Unknown Source)
... 19 more

What is the problem?

6
  • maybe the library is expecting a ssc.store file but it can't find it Commented Apr 13, 2017 at 9:12
  • I'm not very familiar with ssls. But mybe it has smth to do with SSLServerSocketFactory.getDefault()? Commented Apr 13, 2017 at 9:48
  • the getdefault is ok, but it raises a file not found exception. You are using a library and this library makes the ssl calls, is that right? Commented Apr 13, 2017 at 10:05
  • I think so, yeah Commented Apr 13, 2017 at 10:15
  • which library is it? so others can reproduce the problem Commented Apr 13, 2017 at 10:17

1 Answer 1

2

You need ssc.store file in the working directory where you run your code. The store is here: https://github.com/DeBukkIt/SimpleServerClient/blob/master/ssc.store (or in the specific branch or tag you checked out).

For example, if you're running main method inside IntelliJ, the store file should be in the project root directory. Or, if you pack your application into a jar and run java -jar yourapp.jar, the ssc.store should be in the same directory as the jar file.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you! That fixed it :D
@KevinMeyer if the answer helped you, please consider accepting it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.