I'm trying to use [*JollyDay* |https://github.com/svendiedrichsen/jollyday]to 
provide ability to get holidays, but its day-calculate algorithm is based 
on some .porperties file(typically Jollyday.properties). These files can be 
found in running unit test, but when running it in jenkins, they're missed.

When looking at the stack trace, this lib is using *current thread's 
context classloader* ( WebappClassLoader)  to get resource, but the loader 
returned null.

However, using HolidayCalendar(one class of 
JollyDay).class.getClassLoader().getResource() works fine.( But the 
returned URL is from my system maven repo)

Are there anything I missed to do, like mvn install? I tryed that, but it's 
not the cause.

PS, are all the temp file in the "target" dir? I guess it's because there 
is no jollyday.properties in the dir.

Should I add some more config to include it? But I'm not quite clear about 
how to handle this.

 

*Stack Trace*:

Caused by: java.lang.NullPointerExceptionCaused by: 
java.lang.NullPointerException 

at 
de.jollyday.configuration.impl.DefaultConfigurationProvider.getProperties(DefaultConfigurationProvider.java:59)
 
at 
de.jollyday.configuration.ConfigurationProviderManager.addInternalConfigurationProviderProperies(ConfigurationProviderManager.java:63)
 
at 
de.jollyday.configuration.ConfigurationProviderManager.mergeConfigurationProperties(ConfigurationProviderManager.java:57)
 
at de.jollyday.HolidayManager.createManager(HolidayManager.java:163) at 
de.jollyday.HolidayManager.getInstance(HolidayManager.java:148) at 
de.jollyday.HolidayManager.getInstance(HolidayManager.java:124) at 
org.jenkinsci.plugins.workinghours.WorkingHoursUI.getRegionHolidays(WorkingHoursUI.java:84)
 
at 
org.jenkinsci.plugins.workinghours.WorkingHoursUI.doDynamic(WorkingHoursUI.java:64)
 
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) 
at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343) 
... 64 more

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/94ed1b72-fa50-4c1c-9863-3127be439d29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to