You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by abdelb <ab...@live.co.uk> on 2019/01/24 16:06:30 UTC

Error opening blueprint xml url" when deploying blueprint file on custom distribution (Karaf 4.2.2)

I'm writing a custom distribution and have a feature.xml for my camel
features. I want to be able to drop a blueprint xml file in deploy/ and have
it listed as a bundle - however, I'm getting a strange error message: 

14:31:36.322 ERROR
[fileinstall-C:\LocalFolder\mwkaraf\mw-karaf-assembly\target\assembly/deploy]
Failed to install artifact:
C:\LocalFolder\mwkaraf\mw-karaf-assembly\target\assembly\deploy\mycamel.xml 
java.io.IOException: Error opening blueprint xml url 
        at
org.apache.karaf.deployer.blueprint.BlueprintURLHandler$Connection.getInputStream(BlueprintURLHandler.java:78)
~[?:?] 
        at java.net.URL.openStream(URL.java:1045) ~[?:?] 
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:962)
[8:org.apache.felix.fileinstall:3.6.4] 
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:884)
[8:org.apache.felix.fileinstall:3.6.4] 
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:489)
[8:org.apache.felix.fileinstall:3.6.4] 
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365)
[8:org.apache.felix.fileinstall:3.6.4] 
        at
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316)
[8:org.apache.felix.fileinstall:3.6.4] 
Caused by: java.lang.IllegalArgumentException: Not supported:
http://javax.xml.XMLConstants/property/accessExternalDTD
        at
org.apache.xalan.processor.TransformerFactoryImpl.setAttribute(TransformerFactoryImpl.java:571)
~[?:?] 
        at org.apache.karaf.util.XmlUtils.transformer(XmlUtils.java:154)
~[?:?] 
        at org.apache.karaf.util.XmlUtils.transform(XmlUtils.java:96) ~[?:?] 
        at
org.apache.karaf.deployer.blueprint.BlueprintTransformer.analyze(BlueprintTransformer.java:129)
~[?:?] 
        at
org.apache.karaf.deployer.blueprint.BlueprintTransformer.transform(BlueprintTransformer.java:71)
~[?:?] 
        at
org.apache.karaf.deployer.blueprint.BlueprintURLHandler$Connection.getInputStream(BlueprintURLHandler.java:73)
~[?:?] 
        ... 6 more 

The blueprint file is valid - I know this because if I run a non-custom
Karaf 4.2.2 and install camel, it works fine. Running feature:install camel
leads to the following features being installed: 
xml-specs-api 
camel 
camel-core 
camel-blueprint 

I have these features in my custom distribution so I can't figure out where
this error is coming from. My feature.xml looks like this (camel version is
2.23.1): 

<?xml version='1.0' encoding='UTF-8'?> 
<features name='camel'
xmlns='http://karaf.apache.org/xmlns/features/v1.3.0'>

  <feature name='camel' version='${camel.version}'
description='camel-${camel.version}' install='auto'>
    <feature>camel-core</feature>
    <feature>camel-spring</feature>
    <feature>camel-blueprint</feature>
    <feature>camel-cxf</feature>
  </feature>

  <feature name='camel-core' version='${camel.version}'>
    <feature version='2.9.0'>xml-specs-api</feature>

    <bundle>mvn:org.apache.camel/camel-core/${camel.version}</bundle>

    <config name='jmx.acl.org.apache.camel'>
      * = * 
    </config>
  </feature>

  <feature name='xml-specs-api' version='2.9.0'>
    <bundle
dependency='true'>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/${cxf.servicemix.specs.version}</bundle>
    <bundle
dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan/2.7.2_3</bundle>
    <bundle
dependency='true'>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/2.9.0</bundle>
    <bundle
dependency='true'>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/2.9.0</bundle>
    <bundle>mvn:org.codehaus.woodstox/stax2-api/3.1.4</bundle>
    <bundle>mvn:org.codehaus.woodstox/woodstox-core-asl/4.4.1</bundle>
   
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.11_1</bundle>
  </feature>

  <feature name='camel-spring' version='${camel.version}'>
    <feature version='${camel.version}'>camel-core</feature>
    <feature version='${spring.version.range}'>spring</feature>
    <feature version='${spring.version.range}'>spring-tx</feature>

    <bundle>mvn:org.apache.camel/camel-spring/${camel.version}</bundle>

  </feature>

  <feature name='camel-blueprint' version='${camel.version}'>
    <feature>camel-core</feature>
    <feature>aries-blueprint</feature>
    <bundle>mvn:org.apache.camel/camel-blueprint/${camel.version}</bundle>
  </feature>

  <feature name='camel-cxf' version='${camel.version}'>
    <feature>camel-spring</feature>
    <feature>camel-blueprint</feature>
    <feature>cxf-core</feature>
    <feature>cxf-jaxrs</feature>
    <feature>cxf-jaxws</feature>
    <feature>cxf-http-provider</feature>
    <feature>cxf-databinding-jaxb</feature>
    <feature>cxf-bindings-soap</feature>
    <feature>cxf-features-logging</feature>

    <bundle>mvn:org.apache.camel/camel-http-common/${camel.version}</bundle>
   
<bundle>mvn:org.apache.camel/camel-cxf-transport/${camel.version}</bundle>
    <bundle>mvn:org.apache.camel/camel-cxf/${camel.version}</bundle>
  </feature>
</features>

Have spent quite some time trying to fix this without any luck so far -
would really appreciate any assistance



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html