Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2282

JBossEntityResolver is not using schemaLocation URIs that are valid non-file URLs

XMLWordPrintable

      The org.jboss.util.xml.JBossEntityResolver is not dealing with systemIDs that are valid non-file URLs. For example, this xml fragment from a testcase which uses the jboss resource URL:

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- $Id: config.xml,v 1.1 2005/07/31 23:13:44 starksm Exp $ -->

      <jaas:policy
      xsi:schemaLocation="urn:jboss:security-config resource:security-config_4_1.xsd"
      xmlns:jaas="urn:jboss:security-config"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      >

      does map to a valid URL which can be loaded, but the parsing of this URL by the getLocalEntityName ends up throwing away the full path info to produce a resource name of schema/security-config_4_1.xsd. This would work inside the jboss server provided the security-config_4_1.xsd is bundled into a classpath location following the location conventions expected by the JBossEntityResolver, but does not work in the testsuite where this is not the case, and would not work for user defined schemas located elsewhere. It would seem we should try to load the schema from systemIDs that are valid URLs before defaulting to the jboss specific logic.

          There are no Sub-Tasks for this issue.

              ropalka Richard Opalka
              starksm64 Scott Stark (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: