You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Gaëlle Fournier (Jira)" <ji...@apache.org> on 2024/03/13 08:50:00 UTC

[jira] [Updated] (CAMEL-20559) camel-jbang-plugin-k run command error on a multi-valued trait property

     [ https://issues.apache.org/jira/browse/CAMEL-20559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gaëlle Fournier updated CAMEL-20559:
------------------------------------
    Environment: 
Jbang version : 0.114.0

Camel version: 4.4.0

  was:
Jbang version : 0.114.0

Camel version: 4.4.0'


> camel-jbang-plugin-k run command error on a multi-valued trait property
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-20559
>                 URL: https://issues.apache.org/jira/browse/CAMEL-20559
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>    Affects Versions: 4.4.0
>         Environment: Jbang version : 0.114.0
> Camel version: 4.4.0
>            Reporter: Gaëlle Fournier
>            Priority: Major
>
> Trying to execute the `run` command with trait property `-t toleration.taints=camel.apache.org/master:NoExecute:300` results in the following parsing error:
>  
> {code:java}
> $ jbang run --deps=org.apache.camel:camel-jbang-plugin-k:4.4.0 camel@apache/camel k run Test.java -t toleration.enabled=true -t toleration.taints=camel.apache.org/master:NoExecute:300 org.apache.camel.RuntimeCamelException: Failed to parse trait options at org.apache.camel.dsl.jbang.core.commands.k.TraitHelper.parseTraits(TraitHelper.java:81) at org.apache.camel.dsl.jbang.core.commands.k.IntegrationRun.doCall(IntegrationRun.java:237) at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:71) at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:37) at picocli.CommandLine.executeUserObject(CommandLine.java:2041) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at picocli.CommandLine.execute(CommandLine.java:2170) at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:151) at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:58) at main.CamelJBang.main(CamelJBang.java:36) Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `java.util.ArrayList` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('camel.apache.org/master:NoExecute:300') at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 25] (through reference chain: org.apache.camel.v1.integrationspec.Traits["toleration"]->org.apache.camel.v1.integrationspec.traits.Toleration["taints"]) at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63) at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1754) at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1379) at com.fasterxml.jackson.databind.deser.std.StdDeserializer._deserializeFromString(StdDeserializer.java:311) at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.handleNonArray(StringCollectionDeserializer.java:286) at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:194) at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:184) at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:27) at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:310) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:310) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:342) at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:2125) at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1566) at org.apache.camel.dsl.jbang.core.commands.k.TraitHelper.parseTraits(TraitHelper.java:78) ... 14 more
> {code}
>  
> The trait property's type is described in the [Camel K's toleration trait documentation|https://camel.apache.org/camel-k/next/traits/toleration.html].



--
This message was sent by Atlassian Jira
(v8.20.10#820010)