Hi,

you need to add a index to the argument.

like for example
@Argument(index=0, name = "name", description = "Create user", required =
true,
multiValued = false)

where the second argument is index 1 :)

regards, Achim



2014-09-26 11:29 GMT+02:00 rcbandit <[email protected]>:

> I tested this:
>
> @Argument(name = "name", description = "Create user", required = true,
> multiValued = false)
>     String user;
>
>     @Argument(name = "password", description = "Create user password",
> required = true, multiValued = false)
>     String passwd;
>
> karaf@root(kernel)> create user username password pass
> Error executing command: Duplicate argument index: 0 on Action
> org.DX_57.osgi.commands.kernel.impl.U
> sersShellCommands
>
> Am I wrong somewhere? I removed index from @Argument
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Execute-commands-with-arguments-in-Karaf-tp4035537p4035546.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Reply via email to