Skip to content

Instantly share code, notes, and snippets.

@johnament
Created November 14, 2013 12:38
Show Gist options
  • Save johnament/7466114 to your computer and use it in GitHub Desktop.
Save johnament/7466114 to your computer and use it in GitHub Desktop.
features.xml error with karaf
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="my-feature">
<feature name="my-feature" version="1.0.0-SNAPSHOT" description="Some Connector">
<details>My Company's awesome OSGi module</details>
<bundle>wrap:mvn:com.mycomapny.anotherproj/a-shaded-jar/1.0.0-SNAPSHOT</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-io/1.4_3</bundle>
<bundle>mvn:org.apache.camel/camel-core/2.10.6</bundle>
<bundle>mvn:org.slf4j/slf4j-api/1.6.1</bundle>
<bundle>wrap:mvn:com.sun.xml.bind/jaxb-impl/2.2.5</bundle>
<bundle>mvn:org.apache.camel/camel-jms/2.10.6</bundle>
<bundle>mvn:org.apache.camel/camel-spring/2.10.6</bundle>
<bundle>mvn:org.springframework/spring-context/3.0.7.RELEASE</bundle>
<bundle>mvn:org.springframework/spring-aop/3.0.7.RELEASE</bundle>
<bundle>wrap:mvn:aopalliance/aopalliance/1.0</bundle>
<bundle>mvn:org.springframework/spring-asm/3.0.7.RELEASE</bundle>
<bundle>mvn:org.springframework/spring-beans/3.0.7.RELEASE</bundle>
<bundle>mvn:org.springframework/spring-core/3.0.7.RELEASE</bundle>
<bundle>wrap:mvn:commons-logging/commons-logging/1.1.1</bundle>
<bundle>mvn:org.springframework/spring-expression/3.0.7.RELEASE</bundle>
<bundle>mvn:org.springframework/spring-tx/3.0.7.RELEASE</bundle>
<bundle>mvn:org.springframework/spring-jms/3.0.7.RELEASE</bundle>
<bundle>mvn:org.apache.camel/camel-jackson/2.10.6</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.12</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.12</bundle>
<bundle>mvn:org.apache.activemq/activemq-core/5.7.0</bundle>
<bundle>mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
<bundle>mvn:org.apache.activemq/kahadb/5.7.0</bundle>
<bundle>wrap:mvn:org.apache.activemq.protobuf/activemq-protobuf/1.1</bundle>
<bundle>mvn:org.fusesource.mqtt-client/mqtt-client/1.3</bundle>
<bundle>mvn:org.fusesource.hawtdispatch/hawtdispatch-transport/1.11</bundle>
<bundle>mvn:org.fusesource.hawtdispatch/hawtdispatch/1.11</bundle>
<bundle>mvn:org.fusesource.hawtbuf/hawtbuf/1.9</bundle>
<bundle>mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle>
<bundle>mvn:commons-net/commons-net/3.1</bundle>
<bundle>wrap:mvn:org.jasypt/jasypt/1.9.0</bundle>
<bundle>mvn:org.apache.activemq/activemq-camel/5.7.0</bundle>
<bundle>mvn:org.apache.activemq/activemq-pool/5.7.0</bundle>
<bundle>wrap:mvn:org.apache.geronimo.specs/geronimo-jta_1.0.1B_spec/1.0.1</bundle>
<bundle>mvn:commons-pool/commons-pool/1.6</bundle>
<bundle>mvn:org.apache.xbean/xbean-spring/3.12</bundle>
<bundle>wrap:mvn:commons-logging/commons-logging/1.0.3</bundle>
<bundle>mvn:org.apache.camel/camel-cxf/2.10.6</bundle>
<bundle>mvn:org.apache.camel/camel-cxf-transport/2.10.6</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-core/2.6.8</bundle>
<bundle>mvn:org.apache.cxf/cxf-api/2.6.8</bundle>
<bundle>mvn:org.codehaus.woodstox/woodstox-core-asl/4.2.0</bundle>
<bundle>mvn:org.codehaus.woodstox/stax2-api/3.1.1</bundle>
<bundle>mvn:org.apache.ws.xmlschema/xmlschema-core/2.0.3</bundle>
<bundle>mvn:org.apache.geronimo.specs/geronimo-javamail_1.4_spec/1.7.1</bundle>
<bundle>wrap:mvn:wsdl4j/wsdl4j/1.6.3</bundle>
<bundle>wrap:mvn:com.sun.xml.bind/jaxb-impl/2.2.5.1</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-bindings-soap/2.6.8</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-databinding-jaxb/2.6.8</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-frontend-jaxrs/2.6.8</bundle>
<bundle>mvn:javax.ws.rs/jsr311-api/1.1.1</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-bindings-xml/2.6.8</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-transports-http/2.6.8</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-frontend-jaxws/2.6.8</bundle>
<bundle>wrap:mvn:xml-resolver/xml-resolver/1.2</bundle>
<bundle>wrap:mvn:asm/asm/3.3.1</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-frontend-simple/2.6.8</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-ws-addr/2.6.8</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-ws-policy/2.6.8</bundle>
<bundle>mvn:org.apache.neethi/neethi/3.0.2</bundle>
<bundle>mvn:org.apache.camel/camel-blueprint/2.10.6</bundle>
<bundle>wrap:mvn:org.apache.camel/camel-core-xml/2.10.6</bundle>
<bundle>mvn:org.apache.camel/camel-core-osgi/2.10.6</bundle>
<bundle>mvn:org.apache.aries.blueprint/org.apache.aries.blueprint/0.3</bundle>
<bundle>mvn:org.apache.aries/org.apache.aries.util/0.3</bundle>
<bundle>mvn:org.apache.aries.testsupport/org.apache.aries.testsupport.unit/0.3</bundle>
<bundle>mvn:org.apache.aries.proxy/org.apache.aries.proxy.api/0.3</bundle>
<bundle>mvn:log4j/log4j/1.2.16</bundle>
<bundle>mvn:org.slf4j/slf4j-log4j12/1.6.1</bundle>
<bundle>mvn:org.apache.cxf/cxf-rt-transports-http-jetty/2.6.8</bundle>
<bundle>mvn:org.eclipse.jetty/jetty-server/7.5.4.v20111024</bundle>
<bundle>mvn:org.eclipse.jetty/jetty-continuation/7.5.4.v20111024</bundle>
<bundle>mvn:org.eclipse.jetty/jetty-http/7.5.4.v20111024</bundle>
<bundle>mvn:org.eclipse.jetty/jetty-io/7.5.4.v20111024</bundle>
<bundle>mvn:org.eclipse.jetty/jetty-util/7.5.4.v20111024</bundle>
<bundle>mvn:org.eclipse.jetty/jetty-security/7.5.4.v20111024</bundle>
<bundle>wrap:mvn:javax.servlet/servlet-api/2.5</bundle>
<bundle>mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2</bundle>
<bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr311-api-1.1.1/2.2.0</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/3.1_7</bundle>
<bundle>wrap:mvn:commons-logging/commons-logging/1.0.4</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/1.3_2</bundle>
<bundle>wrap:mvn:xerces/xercesImpl/2.9.1</bundle>
<bundle>wrap:mvn:xml-apis/xml-apis/1.3.04</bundle>
<bundle>wrap:mvn:com.mycompany.another-proj/another-shaded-jar/1.0.0-SNAPSHOT</bundle>
<bundle>wrap:mvn:bouncycastle/bcprov-jdk16/140</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-jaxrs/1.9.10</bundle>
<bundle>mvn:joda-time/joda-time/2.3</bundle>
</feature>
</features>
java.lang.IllegalArgumentException: Unable to validate mvn:com.mycompany.myfeature/myfeature/1.0.0-SNAPSHOT/xml/features
at org.apache.karaf.features.internal.FeatureValidationUtil.validate(FeatureValidationUtil.java:69)
at org.apache.karaf.features.internal.FeaturesServiceImpl.validateRepository(FeaturesServiceImpl.java:199)
at org.apache.karaf.features.internal.FeaturesServiceImpl.internalAddRepository(FeaturesServiceImpl.java:210)
at org.apache.karaf.features.internal.FeaturesServiceImpl.start(FeaturesServiceImpl.java:974)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_45]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_45]
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:225)[10:org.apache.aries.blueprint:0.3.2]
at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:838)[10:org.apache.aries.blueprint:0.3.2]
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)[10:org.apache.aries.blueprint:0.3.2]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:726)[10:org.apache.aries.blueprint:0.3.2]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[10:org.apache.aries.blueprint:0.3.2]
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[10:org.apache.aries.blueprint:0.3.2]
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)[10:org.apache.aries.blueprint:0.3.2]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:631)[10:org.apache.aries.blueprint:0.3.2]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:337)[10:org.apache.aries.blueprint:0.3.2]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:230)[10:org.apache.aries.blueprint:0.3.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_45]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_45]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_45]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_45]
at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]
Caused by: org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the declaration of element 'features'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)[:]
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)[:]
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)[:]
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)[:]
at org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown Source)[:]
at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)[:]
at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)[:]
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)[:]
at javax.xml.validation.Validator.validate(Validator.java:94)[:]
at org.apache.karaf.features.internal.FeatureValidationUtil.validate(FeatureValidationUtil.java:67)
... 24 more
@cemmersb
Copy link

cemmersb commented Mar 8, 2014

Did you figure out how to resolve this issue?

I'm facing a similar behaviour.

@roozbeh73
Copy link

I am having the same issue here. Anyone came up with a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment