Scenario:When trying to connect to JasperReports Server through studio, the following error is displayed instead: | [toc] |
java.lang.NullPointerException at java.security.Provider$ServiceKey.<init>(Provider.java:872) at java.security.Provider$ServiceKey.<init>(Provider.java:865) at java.security.Provider.getService(Provider.java:1039) at sun.security.jca.ProviderList.getService(ProviderList.java:332) at sun.security.jca.GetInstance.getInstance(GetInstance.java:157) at java.security.Security.getImpl(Security.java:695) at java.security.KeyStore.getInstance(KeyStore.java:848) at com.jaspersoft.studio.server.protocol.restv2.CertChainValidator.getDefaultKeyStore(CertChainValidator.java:88) at com.jaspersoft.studio.server.protocol.restv2.RestV2ConnectionJersey.connect(RestV2ConnectionJersey.java:147) at com.jaspersoft.studio.server.protocol.ProxyConnection.connect(ProxyConnection.java:102) at com.jaspersoft.studio.server.WSClientHelper.connect(WSClientHelper.java:76) at com.jaspersoft.studio.server.WSClientHelper.connectGetData(WSClientHelper.java:115) at com.jaspersoft.studio.server.ServerProvider.listServer(ServerProvider.java:406) at com.jaspersoft.studio.server.ServerProvider.access$0(ServerProvider.java:402) at com.jaspersoft.studio.server.ServerProvider$1.run(ServerProvider.java:357) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
How to overcome this problem?
Solution:
If the stack trace is like this, the most important part here for us is java.security.KeyStore.getInstance(KeyStore.java:848) and it indicates that JasperSoft Studio was not able to open the default keystore. This can happen because your global java settings are pointing to system keystore location instead. If you do java -version in the command line and see the following:
Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStoreType=Windows-ROOT
This means that the system JVM is using the Windows certificate storage as default. This doesn't work for JasperSoft Studio. To avoid this problem add the the following line to {JSS Installation dir}/Jaspersoft Studio.ini file right below the -vmargs line:
-Djavax.net.ssl.keyStoreType=jks
Save and restart studio and then try to connect to JasperReports Server or open the keystore in the Windows->Preferences section.
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now