Prevent Quartz XSD from being fetched from the Internet [SPR-13706] #18281
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Mathieu Lachance opened SPR-13706 and commented
Quartz offer classloading spi through the org.quartz.spi.ClassLoadHelper interface.
Spring implements ClassLoadHelper in the ResourceLoaderClassLoadHelper which is use as the default Quartz value for 'org.quartz.scheduler.classLoadHelper.class'.
When I'm deploying my application inside JBoss EAP 6.1 and/or Wildfly 8.2.1.Final, the "job_scheduling_data_2_0.xsd" is getting hit from the Internet because it failed to fetch it properly from the classpath.
XMLSchedulingDataProcessorPlugin::processFile(JobFile) -> XMLSchedulingDataProcessor(classLoadHelper) -> resolveSchemaSource()
by enabling the org.quartz.xml.XMLSchedulingDataProcessor logger you'll see that inside a container the "Unable to load local schema packaged in quartz distribution jar" trace will appear.
This is especially problematic in production environment where generally machines do not have access to the Internet and/or a very limitated access for security reasons.
Here's our temporary workaround which involve of prefixing "classpath:" to any XSD resource:
This workaround always retreive the XSD resource properly from the classpath. This work, though, this is definitely ugly.
I would suggest instead of our ugly workaround to simply change the Spring implementation to:
Let me know if I've miss something.
Thanks,
Affects: 3.2.16, 4.2.2
Referenced from: commits 51f356f, 7c998a7, 6db6f23
Backported to: 3.2.17
The text was updated successfully, but these errors were encountered: