[JIRA] (JENKINS-58530) Library(JollyDay)'s properties file cannot be found by WebAppClassLoader in Jenkins runtime.

5 views
Skip to first unread message

angus0314shen@gmail.com (JIRA)

unread,
Jul 17, 2019, 10:23:02 AM7/17/19
to jenkinsc...@googlegroups.com
Jack Shen created an issue
 
Jenkins / Bug JENKINS-58530
Library(JollyDay)'s properties file cannot be found by WebAppClassLoader in Jenkins runtime.
Issue Type: Bug Bug
Assignee: Jeff Pearce
Components: working-hours-plugin
Created: 2019-07-17 14:22
Priority: Minor Minor
Reporter: Jack Shen

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

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dnusbaum@cloudbees.com (JIRA)

unread,
Jul 17, 2019, 10:34:03 AM7/17/19
to jenkinsc...@googlegroups.com

jxpearce@godaddy.com (JIRA)

unread,
Jul 17, 2019, 10:50:05 AM7/17/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages