[jira] [Commented] (CAMEL-17088) Provide a GraphQL consumer

2024-04-21 Thread Luca Ferrari (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-17088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17839404#comment-17839404
 ] 

Luca Ferrari commented on CAMEL-17088:
--

you can ignore the apollo server example

> Provide a GraphQL consumer
> --
>
> Key: CAMEL-17088
> URL: https://issues.apache.org/jira/browse/CAMEL-17088
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-graphql
>Reporter: Luca Ferrari
>Priority: Minor
>  Labels: help-wanted
> Fix For: 4.x
>
>
> at the moment only producer is supported but there are libraries that allow 
> for supporting this scenario as well 
> [https://www.graphql-java.com/tutorials/getting-started-with-spring-boot/]
> it would be interesting to offer an alternative to something like Apollo 
> Server based on camel, with all the possible transformation and logic that 
> you can apply to query and response



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


[jira] [Closed] (CAMEL-18364) camel-jsonpath not working on primitives

2022-08-08 Thread Luca Ferrari (Jira)


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

Luca Ferrari closed CAMEL-18364.

Resolution: Not A Bug

> camel-jsonpath not working on primitives
> 
>
> Key: CAMEL-18364
> URL: https://issues.apache.org/jira/browse/CAMEL-18364
> Project: Camel
>  Issue Type: Bug
>  Components: camel-jsch
>Affects Versions: 3.18.0
>Reporter: Luca Ferrari
>Priority: Major
>
> running the following as part of my route:
>  
> {code:java}
> .marshal().json() .choice() .when().jsonpath("$[?(@.counter>0)]") 
> .log("watchout");{code}
> with the following payload:
> {code:java}
> {"counter":1}{code}
> and I'm getting the below error even though the expression evaluate fine here 
> [http://jsonpath.herokuapp.com/?path=$..book[2]] 
>  
> {code:java}
> 2022-08-08 14:00:39,074 WARN  [org.apa.cam.com.jms.EndpointMessageListener] 
> (Camel (camel-23) thread #20 - JmsConsumer[sensor]) Execution of JMS message 
> listener failed. Caused by: [org.apache.camel.ExpressionEvaluationException - 
> com.jayway.jsonpath.InvalidPathException: Filter: [?] can not be applied to 
> primitives. Current context is: {'counter':1}]: 
> org.apache.camel.ExpressionEvaluationException: 
> com.jayway.jsonpath.InvalidPathException: Filter: [?] can not be applied to 
> primitives. Current context is: {'counter':1}
>         at 
> org.apache.camel.jsonpath.JsonPathExpression.evaluate(JsonPathExpression.java:159)
>         at 
> org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:45)
>         at 
> org.apache.camel.support.ExpressionSupport.matches(ExpressionSupport.java:36)
>         at 
> org.apache.camel.builder.ExpressionClause.matches(ExpressionClause.java:1155)
>         at 
> org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:89)
>  
> {code}
>  



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


[jira] [Commented] (CAMEL-18364) camel-jsonpath not working on primitives

2022-08-08 Thread Luca Ferrari (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-18364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17576839#comment-17576839
 ] 

Luca Ferrari commented on CAMEL-18364:
--

my bad it is working, I was somehow using an invalid json payload

> camel-jsonpath not working on primitives
> 
>
> Key: CAMEL-18364
> URL: https://issues.apache.org/jira/browse/CAMEL-18364
> Project: Camel
>  Issue Type: Bug
>  Components: camel-jsch
>Affects Versions: 3.18.0
>Reporter: Luca Ferrari
>Priority: Major
>
> running the following as part of my route:
>  
> {code:java}
> .marshal().json() .choice() .when().jsonpath("$[?(@.counter>0)]") 
> .log("watchout");{code}
> with the following payload:
> {code:java}
> {"counter":1}{code}
> and I'm getting the below error even though the expression evaluate fine here 
> [http://jsonpath.herokuapp.com/?path=$..book[2]] 
>  
> {code:java}
> 2022-08-08 14:00:39,074 WARN  [org.apa.cam.com.jms.EndpointMessageListener] 
> (Camel (camel-23) thread #20 - JmsConsumer[sensor]) Execution of JMS message 
> listener failed. Caused by: [org.apache.camel.ExpressionEvaluationException - 
> com.jayway.jsonpath.InvalidPathException: Filter: [?] can not be applied to 
> primitives. Current context is: {'counter':1}]: 
> org.apache.camel.ExpressionEvaluationException: 
> com.jayway.jsonpath.InvalidPathException: Filter: [?] can not be applied to 
> primitives. Current context is: {'counter':1}
>         at 
> org.apache.camel.jsonpath.JsonPathExpression.evaluate(JsonPathExpression.java:159)
>         at 
> org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:45)
>         at 
> org.apache.camel.support.ExpressionSupport.matches(ExpressionSupport.java:36)
>         at 
> org.apache.camel.builder.ExpressionClause.matches(ExpressionClause.java:1155)
>         at 
> org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:89)
>  
> {code}
>  



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


[jira] [Created] (CAMEL-18364) camel-jsonpath not working on primitives

2022-08-08 Thread Luca Ferrari (Jira)
Luca Ferrari created CAMEL-18364:


 Summary: camel-jsonpath not working on primitives
 Key: CAMEL-18364
 URL: https://issues.apache.org/jira/browse/CAMEL-18364
 Project: Camel
  Issue Type: Bug
  Components: camel-jsch
Affects Versions: 3.18.0
Reporter: Luca Ferrari


running the following as part of my route:
 
{code:java}
.marshal().json() .choice() .when().jsonpath("$[?(@.counter>0)]") 
.log("watchout");{code}
with the following payload:
{code:java}
{"counter":1}{code}
and I'm getting the below error even though the expression evaluate fine here 
[http://jsonpath.herokuapp.com/?path=$..book[2]] 

 
{code:java}
2022-08-08 14:00:39,074 WARN  [org.apa.cam.com.jms.EndpointMessageListener] 
(Camel (camel-23) thread #20 - JmsConsumer[sensor]) Execution of JMS message 
listener failed. Caused by: [org.apache.camel.ExpressionEvaluationException - 
com.jayway.jsonpath.InvalidPathException: Filter: [?] can not be applied to 
primitives. Current context is: {'counter':1}]: 
org.apache.camel.ExpressionEvaluationException: 
com.jayway.jsonpath.InvalidPathException: Filter: [?] can not be applied to 
primitives. Current context is: {'counter':1}
        at 
org.apache.camel.jsonpath.JsonPathExpression.evaluate(JsonPathExpression.java:159)
        at 
org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:45)
        at 
org.apache.camel.support.ExpressionSupport.matches(ExpressionSupport.java:36)
        at 
org.apache.camel.builder.ExpressionClause.matches(ExpressionClause.java:1155)
        at 
org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:89)
 
{code}
 



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


[jira] [Created] (CAMEL-18363) improve the documentation for updates

2022-08-08 Thread Luca Ferrari (Jira)
Luca Ferrari created CAMEL-18363:


 Summary: improve the documentation for updates
 Key: CAMEL-18363
 URL: https://issues.apache.org/jira/browse/CAMEL-18363
 Project: Camel
  Issue Type: Bug
  Components: camel-couchdb
Affects Versions: 3.18.0
Reporter: Luca Ferrari


at the moment looking at the documentation it seems to update an entry you need 
to provide an 'update' operation and 'doc_rev' id as headers, while this is not 
really the way the update is implemented.

To perform an actual update using the couchdb connector you would need to set 
the '_id' and '_rev' fields in the json payload sent to couchdb



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


[jira] [Created] (CAMEL-17088) Provide a GraphQL consumer

2021-10-15 Thread Luca Ferrari (Jira)
Luca Ferrari created CAMEL-17088:


 Summary: Provide a GraphQL consumer
 Key: CAMEL-17088
 URL: https://issues.apache.org/jira/browse/CAMEL-17088
 Project: Camel
  Issue Type: Improvement
Reporter: Luca Ferrari


at the moment only producer is supported but there are libraries that allow for 
supporting this scenario as well 
[https://www.graphql-java.com/tutorials/getting-started-with-spring-boot/]

it would be interesting to offer an alternative to something like Apollo Server 
based on camel, with all the possible transformation and logic that you can 
apply to query and response



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Reopened] (CAMEL-15685) http4 ssl connection

2020-10-14 Thread Luca Ferrari (Jira)


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

Luca Ferrari reopened CAMEL-15685:
--

> http4 ssl connection
> 
>
> Key: CAMEL-15685
> URL: https://issues.apache.org/jira/browse/CAMEL-15685
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-http4
>Reporter: Luca Ferrari
>Priority: Major
>
> it is not clear from the component documentation how to use https4 when in 
> fact that's the easieast way to connect to an HTTPS service without even 
> needing to provide your own packaged version of HTTP4



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CAMEL-15685) http4 ssl connection

2020-10-13 Thread Luca Ferrari (Jira)
Luca Ferrari created CAMEL-15685:


 Summary: http4 ssl connection
 Key: CAMEL-15685
 URL: https://issues.apache.org/jira/browse/CAMEL-15685
 Project: Camel
  Issue Type: Improvement
  Components: camel-http4
Reporter: Luca Ferrari


it is not clear from the component documentation how to use https4 when in fact 
that's the easieast way to connect to an HTTPS service without even needing to 
provide your own packaged version of HTTP4



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CAMEL-15668) can't find class org.apache.camel.common.http.HttpOperationFailedException

2020-10-09 Thread Luca Ferrari (Jira)
Luca Ferrari created CAMEL-15668:


 Summary: can't find class 
org.apache.camel.common.http.HttpOperationFailedException
 Key: CAMEL-15668
 URL: https://issues.apache.org/jira/browse/CAMEL-15668
 Project: Camel
  Issue Type: Bug
  Components: camel-http4
Affects Versions: 2.23.2
Reporter: Luca Ferrari
 Attachments: pom.xml

I'm calling an external system and trying to catch the http exception but can't 
start the route as I receive the following error:

 
{code:java}
Caused by: java.lang.ClassNotFoundException: 
org.apache.camel.common.http.HttpOperationFailedException{code}
this is the relevant part of the route I'm executing and I've attached the 
pom.xml

 
{noformat}
  
 POST  
http://localhost:8090/api/commitOrder?bridgeEndpoint=true; />   
org.apache.camel.common.http.HttpOperationFailedException
   
true   
{noformat}
[^pom.xml]

as you can see I included all possible libraries containing that class

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CAMEL-15595) math (and other) calculation in route

2020-09-29 Thread Luca Ferrari (Jira)
Luca Ferrari created CAMEL-15595:


 Summary: math (and other) calculation in route
 Key: CAMEL-15595
 URL: https://issues.apache.org/jira/browse/CAMEL-15595
 Project: Camel
  Issue Type: Bug
  Components: came-core
Reporter: Luca Ferrari


at the moment simple calculations with maths operators like:
 * addition
 * multiplication
 * division
 * subtraction
 * modulus

are not supported in simple language. It is true that you could use groovy or 
javascript, but given simple syntax overall prevalence in camel it would make 
it easier to support this directly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-4169) simple calculations in route

2020-09-29 Thread Luca Ferrari (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-4169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17204111#comment-17204111
 ] 

Luca Ferrari commented on CAMEL-4169:
-

are other math operators tracked in other JIRAs? I feel this is an important 
requirement especially if you want to manipulate the payload for quick math 
expressions

> simple calculations in route
> 
>
> Key: CAMEL-4169
> URL: https://issues.apache.org/jira/browse/CAMEL-4169
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Affects Versions: 2.7.2
>Reporter: Marco Westermann
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.9.0
>
>
> create calculation possibilities in simple language. For example to increment 
> a header property: ${header.counter}++
> example:
> from("direct:getLastValueFromCache")
> .transform().simple("${header.lastProcessedOrder}++")
> .to("direct:createNewOrderWithNewProcessingNumber");



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CAMEL-7881) camel-resetlet feature should include httpclient4 bundle

2020-06-02 Thread Luca Ferrari (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-7881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17123395#comment-17123395
 ] 

Luca Ferrari commented on CAMEL-7881:
-

I still see this issue:
{code:java}
19:29:52.001 [main] INFO org.restlet - Unable to register the helper 
org.restlet.ext.httpclient.HttpClientHelper
java.lang.NoClassDefFoundError: 
org/apache/http/conn/ClientConnectionManager{code}
when using camel-restlet with version 2.21.0.fuse-760027-redhat-1

> camel-resetlet feature should include httpclient4 bundle
> 
>
> Key: CAMEL-7881
> URL: https://issues.apache.org/jira/browse/CAMEL-7881
> Project: Camel
>  Issue Type: Bug
>Affects Versions: 2.12.4, 2.13.2, 2.14.0
>Reporter: Willem Jiang
>Assignee: Willem Jiang
>Priority: Major
> Fix For: 2.12.5, 2.13.3, 2.14.1
>
>
> {code}
> 2014-09-29 16:26:41,670 | INFO  | FelixStartLevel  | restlet  
> | org.restlet.engine.Engine 900 | 75 - org.restlet - 
> 2.2.1.v20140506-1533 | Unable to register the helper 
> org.restlet.ext.httpclient.HttpClientHelper
> java.lang.NoClassDefFoundError: org/apache/http/params/HttpParams
>   at java.lang.Class.getDeclaredConstructors0(Native Method)[:1.7.0_45]
>   at 
> java.lang.Class.privateGetDeclaredConstructors(Class.java:2493)[:1.7.0_45]
>   at java.lang.Class.getConstructor0(Class.java:2803)[:1.7.0_45]
>   at java.lang.Class.getConstructor(Class.java:1718)[:1.7.0_45]
>   at 
> org.restlet.engine.Engine.registerHelper(Engine.java:896)[75:org.restlet:2.2.1.v20140506-1533]
>   at 
> org.restlet.engine.Engine.registerHelpers(Engine.java:928)[75:org.restlet:2.2.1.v20140506-1533]
>   at 
> org.restlet.engine.internal.Activator.registerHelper(Activator.java:96)[75:org.restlet:2.2.1.v20140506-1533]
>   at 
> org.restlet.engine.internal.Activator.registerHelper(Activator.java:78)[75:org.restlet:2.2.1.v20140506-1533]
>   at 
> org.restlet.engine.internal.Activator.registerHelpers(Activator.java:117)[75:org.restlet:2.2.1.v20140506-1533]
>   at 
> org.restlet.engine.internal.Activator.start(Activator.java:143)[75:org.restlet:2.2.1.v20140506-1533]
>   at 
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)[org.apache.felix.framework-4.0.3.jar:]
>   at 
> org.apache.felix.framework.Felix.activateBundle(Felix.java:1977)[org.apache.felix.framework-4.0.3.jar:]
>   at 
> org.apache.felix.framework.Felix.startBundle(Felix.java:1895)[org.apache.felix.framework-4.0.3.jar:]
>   at 
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)[org.apache.felix.framework-4.0.3.jar:]
>   at 
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)[org.apache.felix.framework-4.0.3.jar:]
>   at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.http.params.HttpParams not found by org.restlet.ext.httpclient [76]
>   at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)[org.apache.felix.framework-4.0.3.jar:]
>   at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)[org.apache.felix.framework-4.0.3.jar:]
>   at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_45]
>   ... 16 more
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (CAMEL-15104) camel-couchbase connection error

2020-05-22 Thread Luca Ferrari (Jira)
Luca Ferrari created CAMEL-15104:


 Summary: camel-couchbase connection error
 Key: CAMEL-15104
 URL: https://issues.apache.org/jira/browse/CAMEL-15104
 Project: Camel
  Issue Type: Bug
Affects Versions: 2.23.2
 Environment: Couchbase cluster installed using the Operator on 
Openshift 4.3

Couchbase version 6.5.1

Camel couchbase component used inside Fuse 7.6 running on SpringBoot
Reporter: Luca Ferrari


I'm trying to connect to a CB cluster while configuring the connector in the 
following way:
{code:java}
.to("couchbase:http://{{couchbase.server}}/{{couchbase.bucket}}?operation=CCB_PUT={{bucket.pass}};){code}
 

with application properties:
{code:java}
couchbase.server=cb-cluster.unicredit.svc:8091
couchbase.bucket=my-bucket
bucket.pass=password{code}
 

after noticing that the most recent authentication mode (RBAC) with username 
and password is not really supported but the client is automatically calling 
the SASL authentication mode. So had to create a user with the same bucket name 
as its username.

 

The result of the connection initialization in logs is:
{code:java}
2020-05-22 15:35:13.552 INFO net.spy.memcached.auth.AuthThread: Authenticated 
to cb-cluster.unicredit.svc/10.128.0.81:11210
2020-05-22 15:35:13.580 WARN 
com.couchbase.client.vbucket.provider.BucketConfigurationProvider: Could not 
parse config, retrying bootstrap.
java.text.ParseException: JSONObject["proxy"] not found.{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)