Hi, I am trying to create a bundle that will provide me with custom commands in the console.
My blueprint file looks like this: <blueprint xmlns=*"http://www.osgi.org/xmlns/blueprint/v1.0.0"*> <command-bundle xmlns=*"http://karaf.apache.org/xmlns/shell/v1.1.0"*> <command name=*"test/sample"*> <action class=*"com.test.sample.shell.commands.SampleCommand"* /> </command> </command-bundle> </blueprint> The pom.xml has the bundle-plugin configured like this: <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.3.7</version> <extensions>true</extensions> <configuration> <instructions> <Import-Package> org.apache.felix.service.command, org.apache.karaf.shell.commands, org.apache.karaf.shell.console, org.osgi.service.blueprint.container, org.osgi.service.blueprint.reflect, org.apache.aries.blueprint, * </Import-Package> </instructions> </configuration> </plugin> However, when I deploy this to Karaf 3.0-SNAPSHOT, I am getting the following error: Unable to start blueprint container for bundle com.fico.ifm.scheduler.shell.commands org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate xml at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:288)[25:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:304)[25:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[25:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintExtender.checkBundle(BlueprintExtender.java:315)[25:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintExtender.bundleChanged(BlueprintExtender.java:235)[25:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintBundleTrackerCustomizer.modifiedBundle(BlueprintExtender.java:434)[25:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:198)[8:org.apache.aries.util:1.0.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:128)[8:org.apache.aries.util:1.0.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:468)[8:org.apache.aries.util:1.0.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:161)[8:org.apache.aries.util:1.0.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:117)[8:org.apache.aries.util:1.0.0] at org.eclipse.osgi.framework.internal.core.Framework$10.call(Framework.java:1606)[osgi-3.8.0.v20120529-1548.jar:] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyHookPrivileged(ServiceRegistry.java:1239)[osgi-3.8.0.v20120529-1548.jar:] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyHooksPrivileged(ServiceRegistry.java:1222)[osgi-3.8.0.v20120529-1548.jar:] at org.eclipse.osgi.framework.internal.core.Framework.notifyEventHooksPrivileged(Framework.java:1603)[osgi-3.8.0.v20120529-1548.jar:] at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1558)[osgi-3.8.0.v20120529-1548.jar:] at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1505)[osgi-3.8.0.v20120529-1548.jar:] at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1500)[osgi-3.8.0.v20120529-1548.jar:] at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:391)[osgi-3.8.0.v20120529-1548.jar:] at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)[osgi-3.8.0.v20120529-1548.jar:] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1247)[17:org.apache.felix.fileinstall:3.2.6] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1219)[17:org.apache.felix.fileinstall:3.2.6] at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:508)[17:org.apache.felix.fileinstall:3.2.6] at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)[17:org.apache.felix.fileinstall:3.2.6] Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'name' is not allowed to appear in element 'command'. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)[:1.6.0_24] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)[:1.6.0_24] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:387)[:1.6.0_24] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:321)[:1.6.0_24] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:421)[:1.6.0_24] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3186)[:1.6.0_24] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(XMLSchemaValidator.java:2663)[:1.6.0_24] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2070)[:1.6.0_24] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:709)[:1.6.0_24] at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:276)[:1.6.0_24] at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:243)[:1.6.0_24] at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:189)[:1.6.0_24] at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:108)[:1.6.0_24] at javax.xml.validation.Validator.validate(Unknown Source)[:2.2.0] at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:285)[25:org.apache.aries.blueprint.core:1.0.1] ... 23 more Any clue how to resolve this? Regards, Aritra Chatterjee
