Hi,

you are missing the name attribute on the command tag like in this example:

|<command*name="test/hello"*>
      <action class="org.apache.karaf.shell.samples.HelloShellCommand"/>
</command>

|


regards, Marco

Am 22.01.2014 09:48, schrieb Roedl Lukas:
Hi JB,

I've tested it once again and I still get an error when deploying a command 
with version 1.1.0 in Karaf 2.3.3:

[ERROR] BlueprintContainerImpl - Unable to start blueprint container for bundle 
at.ac.ait.hbs.homer.core.shell.scheduler
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to 
validate xml
         at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:288)
         at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:313)
         at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:261)
         at 
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:259)
         at 
org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:222)
         ...
         at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.4: Attribute 'name' 
must appear on element 'command'.
         at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
Source)[:]
         ...
         ... 29 more

My command looks like this:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
         xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
             http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd";>
     <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0"; 
xsi:schemaLocation="http://karaf.apache.org/xmlns/shell/v1.1.0 
http://karaf.apache.org/xmlns/shell/v1.1.0";>
         <command>
             <action 
class="at.ac.ait.hbs.homer.core.shell.scheduler.commands.SchedulerList">
             </action>
         </command>
     </command-bundle>
</blueprint>

Best regards,

Lukas

-----Ursprüngliche Nachricht-----
Von: Jean-Baptiste Onofré [mailto:j...@nanthrax.net]
Gesendet: Mittwoch, 22. Januar 2014 07:30
An: user@karaf.apache.org
Betreff: Re: AW: Schema for custom shell commands

Hi Vinu,

I checked and if you use shell namespace 1.1.0, you have to NOT use the name 
attribute on the command element (the name is now taken from the command class).
The name attribute is required only if you use shell namespace 1.0.0.

However, namespace 1.0.0 is still supported in Karaf 3.0.0.

Regards
JB

On 01/22/2014 07:26 AM, Vinu Raj wrote:
Any further updates on this issue. I am using karaf 3.0.0 and facing
the same issue. With namespace v1.1.0 and command element with about
name attribute, getting following error.

Caused by:
org.osgi.service.blueprint.container.ComponentDefinitionException:
Unable to find a matching factory method getScope on class
org.apache.karaf.shell.console.commands.NamespaceHandler for arguments
[com.test.cmd.list] when instanciating bean #recipe-7




--
View this message in context:
http://karaf.922171.n3.nabble.com/Schema-for-custom-shell-commands-tp4
029047p4031242.html Sent from the Karaf - User mailing list archive at
Nabble.com.

--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


--
++ Business-Software aus einer Hand ++
++ Internet, Warenwirtschaft, Linux, Virtualisierung ++
http://www.intersales.de
http://www.eisxen.org
http://www.tarantella-partner.de
http://www.medisales.de
http://www.eisfair.net

interSales AG Internet Commerce
Weinsbergstr. 190
50825 Köln

Tel  02 21 - 27 90 50
Fax  02 21 - 27 90 517
Mail isi...@intersales.de
Mail m...@intersales.de
Web  www.intersales.de

Handelsregister Köln HR B 30904
Ust.-Id.: DE199672015
Finanzamt Köln-Nord. UstID: nicht vergeben
Aufsichtsratsvorsitzender: Michael Hippler
Vorstand: Andrej Radonic, Peter Zander

Reply via email to