cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: issue with schema loading in spring
Date Fri, 13 Dec 2013 22:16:57 GMT


Most of the flipping to relative locations was to work around namespace handler issues in
Blueprint.   I think those issues are now fixed in the latest blueprint, but I’m not sure
if the latest Karaf releases have been updated yet.  If not, we could always start pushing
them a bit harder.  :-)

If we can verify the various situations in blueprint won’t go off to the internet to grab
schemas, we could revert them back.


On Dec 11, 2013, at 6:06 AM, Aki Yoshida <> wrote:

> I noticed a problem of loading a certain xsd schema in spring and I
> identified the cause. But as I remember that we have had a few rounds
> of changes in the past and I would like to ask you if the suggested
> fix makes sense.
> The problem occurs when I try to look up the schema for namespace
> "" and I have its schemaloc in my
> beans.xml correctly set to ""
> And as this location is given in the rt-ws-policy's catalog file which
> maps this location to its local resource file
> "schemas/ws-policy-200702.xsd". So far, it's fine.
> and this local schema resource has the following import:
>  <xs:import
>      namespace=""
>      schemaLocation="oasis-200401-wss-wssecurity-secext-1.0.xsd" />
> and here it hits the problem because the schema processor thinks this
> schema to be imported is located at
> as the parent schema "ws-policy.xsd" was supposed to be located at
> ""
> and tries to load  it from there and results in
> Caused by:
> at
> at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
> at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
> at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
> at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
> at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(Unknown Source)
> ... 58 more
> The real schema is located at
> and this location is also given in rt-ws-policy's catalog file and
> mapped to its local
> schemas/oasis-200401-wss-wssecurity-secext-1.0.xsd.
> One way to fix this issue is to change the way the schemaLocation is
> resolved after a catalog look up occurs that switches the location so
> that in the above case,
> schemaLocation="oasis-200401-wss-wssecurity-secext-1.0.xsd" will
> resolve directly to
> "schemas/oasis-200401-wss-wssecurity-secext-1.0.xsd" instead to its
> logical location
> "".
> But I find this approach is somehow invasive.
> The better approach would be to always use the absolute location URLs
> in the schemaLocation attribute of "import"s. In contrast, for
> "include"s, we can keep the local URLs because the namespace nor the
> location path is not switched.
> I think the original schemas always had the absolute URLs for their
> imports. So, making this change means that we can put the unmodified
> schemas in the local resources folder and let the catalog and
> blueprint handler to do the resolution.
> Should we make this change or will there be some concern or
> alternative approach?
> thanks.
> regards, aki

Daniel Kulp -
Talend Community Coder -

View raw message