Hi,

Have you added jackson-jq-extra to the application classpath?

--
James

On Mon, 17 Apr 2023 at 16:32, Mikael Koskinen <mijap...@gmail.com> wrote:

> Hi,
>
> When using the following JQ expression:
>
> now | strftime("%Y-%d-%m")
>
> I get the following error:
>
>   CaughtExceptionType: org.apache.camel.RuntimeCamelException
> CaughtExceptionMessage:
> net.thisptr.jackson.jq.exception.JsonQueryException: Function
> strftime/1 does not exist  StackTrace:
> org.apache.camel.RuntimeCamelException:
> net.thisptr.jackson.jq.exception.JsonQueryException: Function
> strftime/1 does not exist
>         at
> org.apache.camel.language.jq.JqExpression.evaluate(JqExpression.java:198)
>         at
> org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:45)
>
> I checked the following project (which I think Camel uses?)
> https://github.com/eiiches/jackson-jq and based on the documentation,
> I think it should support strftime:
>
>
> https://github.com/eiiches/jackson-jq/blob/ad9dba1eb618640cf8c72634a5ee99c04ddc8e5b/README.md?plain=1#L530
>
> Also tested in this format but same issue:
>
> strftime("yyyy-MM-dd")
>
> Here's a link to jqplayground which shows how the function should work:
>
> https://jqplay.org/s/tl0HuDi71wF
>
> Best regards,
> Mikael
>

Reply via email to