[ 
https://issues.apache.org/jira/browse/ARIES-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15857736#comment-15857736
 ] 

ASF GitHub Bot commented on ARIES-1682:
---------------------------------------

GitHub user johnpoth opened a pull request:

    https://github.com/apache/aries/pull/65

    [ARIES-1682] Use the URL Api when resolving relative URIs

    https://issues.apache.org/jira/browse/ARIES-1682
    
    Checkout 
http://stackoverflow.com/questions/13046150/java-net-uri-relativize-doesnt-work-with-jar-uris
 for more information on why the URI api doesn't work on JAR URIs but URL does. 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/johnpoth/aries ARIES-1682

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/aries/pull/65.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #65
    
----
commit a7e8ad0d876e1f85b67ee2fac8524744c92436df
Author: jpoth <[email protected]>
Date:   2017-02-08T09:42:39Z

    [ARIES-1682] Use the URL Api when resolving relative URIs

----


> Aries Blueprint Core 1.7.1 breaks relative JAR URI handling
> -----------------------------------------------------------
>
>                 Key: ARIES-1682
>                 URL: https://issues.apache.org/jira/browse/ARIES-1682
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: blueprint-core-1.7.1
>            Reporter: John Poth
>
> When 
> [resolving|(https://github.com/apache/aries/blob/fbc9ce10264b5c87e2a466b163824045c1817dcb/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java#L577]
>  relative xsd paths, blueprint will throw the error:
> {code}
> java.lang.RuntimeException: java.net.MalformedURLException: no protocol: 
> ../wsdl/http-conf.xsd
>       at 
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl$Loader.resolveResource(NamespaceHandlerRegistryImpl.java:514)
>       at 
> com.sun.org.apache.xerces.internal.util.DOMEntityResolverWrapper.resolveEntity(DOMEntityResolverWrapper.java:117)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:1081)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(XMLSchemaLoader.java:657)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchemaSource(XSDHandler.java:2109)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1092)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:623)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:613)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:572)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:538)
>       at 
> com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:255)
>       at 
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.createSchema(NamespaceHandlerRegistryImpl.java:628)
>       at 
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.doGetSchema(NamespaceHandlerRegistryImpl.java:458)
>       at 
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.getSchema(NamespaceHandlerRegistryImpl.java:443)
>       at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:343)
>       at 
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at 
> org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
>       at 
> org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.net.MalformedURLException: no protocol: ../wsdl/http-conf.xsd
>       at java.net.URL.<init>(URL.java:593)
>       at java.net.URL.<init>(URL.java:490)
>       at java.net.URL.<init>(URL.java:439)
>       at 
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl$Loader.resolveResource(NamespaceHandlerRegistryImpl.java:512)
>       ... 26 more
> {code}
> This was caused by the relative path in 
> [CXF|https://github.com/apache/cxf/blob/a8bf13d406548837a307842aca3e8cbcc267135c/rt/transports/http/src/main/resources/schemas/configuration/http-conf.xsd#L34]
>  in the xsd. 
> To reproduce simply deploy any bundle using the  
> http://cxf.apache.org/transports/http/configuration namespace.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to