Login api issue
Closed this issue · 2 comments
Caused by: java.io.EOFException: null
at java.io.DataInputStream.readInt(DataInputStream.java:392) ~[na:1.8.0_45]
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:645) ~[na:1.8.0_45]
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55) ~[na:1.8.0_45]
at java.security.KeyStore.load(KeyStore.java:1445) ~[na:1.8.0_45]
at com.reddit.redditapp.security.JwtProvider.init(JwtProvider.java:24) ~[classes/:na]
... 57 common frames omitted
please help
@shyamvirani
This problem occurs because of not proper generation of the JKS file.
keytool -genkey -alias redditclone -keyalg RSA -keystore redditclone.jks -keysize 2048
you have to run the above command in cmd in your project's resources folder. It will generate a JKS file
Yes, if you generate the JKS file in another folder and try to copy it to the resources folder through IDE the the JKS file will not be copied correctly.
As Niket suggested if you generate the JKS file directly under the resources folder it should solve the issue.