-
Bug
-
Resolution: Done
-
Undefined
-
JWS 3.1.0 GA
-
None
If you don't create a vault.properties file when using vault you will see two exceptions logged:
SEVERE [main] org.apache.tomcat.vault.util.PropertyFileManager.load /opt/rh/jws4/root/usr/share/tomcat/conf/vault.properties (No such file or directory) java.io.FileNotFoundException: /opt/rh/jws4/root/usr/share/tomcat/conf/vault.properties (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at java.io.FileInputStream.<init>(FileInputStream.java:101) at org.apache.tomcat.vault.util.PropertyFileManager.load(PropertyFileManager.java:46) at org.apache.tomcat.vault.util.PropertySourceVault.init(PropertySourceVault.java:45) at org.apache.tomcat.vault.util.PropertySourceVault.<init>(PropertySourceVault.java:37) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:383) at org.apache.tomcat.util.digester.Digester.<clinit>(Digester.java:94) at org.apache.catalina.startup.Catalina.createStartDigester(Catalina.java:272) at org.apache.catalina.startup.Catalina.load(Catalina.java:514) at org.apache.catalina.startup.Catalina.load(Catalina.java:630) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494) SEVERE [main] org.apache.tomcat.vault.util.PropertySourceVault.init Option [KEYSTORE_URL] is null or empty org.apache.tomcat.vault.security.vault.SecurityVaultException: Option [KEYSTORE_URL] is null or empty at org.apache.tomcat.vault.security.vault.PicketBoxSecurityVault.init(PicketBoxSecurityVault.java:164) at org.apache.tomcat.vault.util.PropertySourceVault.init(PropertySourceVault.java:55) at org.apache.tomcat.vault.util.PropertySourceVault.<init>(PropertySourceVault.java:37) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:383) at org.apache.tomcat.util.digester.Digester.<clinit>(Digester.java:94) at org.apache.catalina.startup.Catalina.createStartDigester(Catalina.java:272) at org.apache.catalina.startup.Catalina.load(Catalina.java:514) at org.apache.catalina.startup.Catalina.load(Catalina.java:630) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
This could be confusing for users (hence the minor prio) because there are two exceptions instead of just the one FileNotFoundException. We should only log the FNFE because the other will always be present if the properties file isn't there.