You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jesper de Jong (Jira)" <ji...@apache.org> on 2019/08/26 10:35:00 UTC

[jira] [Created] (AMQ-7287) Cannot resolve XSDs with 'https' systemId (PluggableSchemaResolver is out of date)

Jesper de Jong created AMQ-7287:
-----------------------------------

             Summary: Cannot resolve XSDs with 'https' systemId (PluggableSchemaResolver is out of date)
                 Key: AMQ-7287
                 URL: https://issues.apache.org/jira/browse/AMQ-7287
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.15.9
            Reporter: Jesper de Jong


ActiveMQ overrides a number of Spring Framework classes; activemq-all.jar version 5.15.9 contains a package org.springframework with its own version of a set of Spring Framework classes. (Why is this necessary?).

One of the classes it overrides isĀ org.springframework.beans.factory.xml.PluggableSchemaResolver, which resolves XML namespace URIs to XSDs.

When I look at the source code of this class of Spring Framework 4.3.24, I see that in the resolveEntity() method it contains special handling for 'https' URLs of XSDs.
{code:java}
// PluggableSchemaResolver lines 112-116, Spring Framework 4.3.24
String resourceLocation = getSchemaMappings().get(systemId);
if (resourceLocation == null && systemId.startsWith("https:")) {
   // Retrieve canonical http schema mapping even for https declaration
   resourceLocation = getSchemaMappings().get("http:" + systemId.substring(6));
}{code}
This special handling is missing from the ActiveMQ version of the class.

The consequence is that for XSDs for which the URL starts with 'https', my application is trying to download the XSD from Internet instead of getting it from one of the Spring jar files.

This fails, because the server I'm running it on does not have an Internet connection.

Please update class PluggableSchemaResolver; but it would be better if ActiveMQ did not override the Spring classes, so that my app would use the version from the Spring Framework itself instead of the overridden versions.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)