1

I'm getting this exception:

java.lang.IllegalArgumentException: Resource location must not be null
    at org.springframework.util.Assert.notNull (Assert.java:193)
    at org.springframework.util.ResourceUtils.getURL (ResourceUtils.java:130)
    at org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizer.configureSslKeyStore (SslConnectorCustomizer.java:133)
    at org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizer.configureSsl (SslConnectorCustomizer.java:92)
    at org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizer.customize (SslConnectorCustomizer.java:58)
    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.customizeSsl (TomcatServletWebServerFactory.java:317)
    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.customizeConnector (TomcatServletWebServerFactory.java:300)
    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer (TomcatServletWebServerFactory.java:166)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer (ServletWebServerApplicationContext.java:179)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh (ServletWebServerApplicationContext.java:152)
    at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:544)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:140)
    at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:759)
    at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:395)
    at org.springframework.boot.SpringApplication.run (SpringApplication.java:327)
    at org.springframework.boot.SpringApplication.run (SpringApplication.java:1255)
    at org.springframework.boot.SpringApplication.run (SpringApplication.java:1243)
    at com.tsystems.iberia.tdev.wsecsccs.WsecSccsApplication.main (WsecSccsApplication.java:12)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    ....

As you can see is telling me that:Resource location must not be null

My spring configuration related issue is:

server.ssl.trust-store: file:keystore.jks
server.ssl.trust-store-password: secret

Obviously, keystore.jks exist and contains certificate. This is how I've built the ketstore:

$ keytool -importcert -trustcacerts -file ra-sec.pem -alias vault.ra-sec.svc -keystore keystore.jks

Any ideas?

Deadpool
  • 29,532
  • 9
  • 38
  • 73
user10063942
  • 81
  • 1
  • 9

1 Answers1

0

I didn't quite understand when this error occurred. Maybe you just need to specify the keystore.jks file in the configuration file. Add configuration in your application.yml file. For example

encrypt:
  keyStore:
    location: file://Users/folder/mykey.jks
    password: password
    alias: mytestkey
    secret: secret
GerNik
  • 31
  • 2