You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caused by: java.lang.NullPointerException
at org.opencadc.luskan.LuskanConfig.getConfig(LuskanConfig.java:132) ~[classes/:?]
at org.opencadc.luskan.LuskanConfig.initConfig(LuskanConfig.java:107) ~[classes/:?]
at org.opencadc.luskan.LuskanInitAction.doInit(LuskanInitAction.java:90) ~[classes/:?]
I think it would be better if the PropertiesReader constructor failed in two different ways to give the caller some information; a FileNotFoundException if the file does not exist, and an IOException (or IllegalArgumentException) if the file cannot be read. The callers can let those exception messages pass through then.
The NumberFormatExceptions cannot be trapped, I don't think. They are expected in the context.xml at load time by the Java Container (Tomcat).
I agree that PropertiesReader needs to throw those and services need to catch and report errors that are clear.
There is an InvalidConfigException (currently in cadc-storage-adapter) that adapter ctors can throw... maybe that can/should be moved somewhere to be more widely usable?? For storage adapters, it can happen in services (minoc) and programs (critwall and tantar)... so not cadc-inventory-server and not cadc-rest. All the way to cadc-util?
aside: the comment in the code for InvalidConfigException says it is a "Runtime exception ..." but it is currently a checked exception. It could really be a RuntimeException. I recall recently changing TransientException to RuntimeException so it could be thrown in places that could happen.
Great, I can move InvalidConfigException to cadc-util and see how it fits. The impact could be largish, which is why I added a full minor version increment to cadc-util. Thanks.
try running with no config and see how the fail looks
ringhold: prints FATAL error (this one is OK)
usually: PropertiesReader prints 3 WARN messages and then
minoc: NPE
tantar: NPE
fenwick: NPE
critwall: NPE
raven: NumberFormatException (misssing catalina.properties causes context.xml load to fail)
luskan: RuntimeException: INIT FAIL (caused by NPE), no PropertiesReader WARN
The text was updated successfully, but these errors were encountered: