Re: Camel 4 migration blog post - Feedback welcome
Hi folks, what's the reason that camel-atlasmap has been removed in Camel 4. Is there any alternative planned for mapping processors that don't need to be coded? Best Gerald > ski n hat am 06.10.2023 10:51 CEST geschrieben: > > > Sure happy to give feedback. I plan to upgrade from 3.20.x to 4.x. > > Currently, thus not migrating yet, but planning has started. > > The things I need to consider: > > - I first need to finish some stuff to upgrade from 2.x to 3.x (Currently > the docs for 2.0 are gone, is the archive to Camel 2.0 documentation still > available? Like to compare sometimes. > - Jakarta stuff in my own code/dependencies. > - Jakarta stuff in other libraries (then Camel). For example ActiveMQ > Classic (embedded) server doesn't support it yet. > - Deprecated components: I use the following components: > > camel-atlasmap > camel-directvm > camel-elasticsearch-rest > camel-rabbitmq > camel-rest-swagger > camel-websocket > camel-vm > > So I need to change these dependencies and some code here > > - I use extendedCamelContext a lot, so need to check the API changes out. > For example use the PluginHelper instead of the extendedCamelContext > - Update SLFJ to version 2.0 > > Will let you know if I'm running into any issues. > > I'm planning to use OpenRewrite to update to Spring Boot 3/Jakarta ( > https://docs.openrewrite.org/recipes/java/spring/boot3). If there was a > recipe to move to Camel 4 then it would be probably easier to do the > migration. > > Raymond > > > On Fri, Oct 6, 2023 at 9:49 AM Claus Ibsen wrote: > > > Hi > > > > If you have been migrating to Camel 4 already, then any feedback is > > welcome. > > > > You can comment in the PR, or post here in the mailing list > > https://github.com/apache/camel-website/pull/1071 > > > > > > > > > > -- > > Claus Ibsen > > - > > @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 > >
Re: NoopHostnameVerifier seems to not working any longer - Camel 3.20.2
Tx Andrea. The issue can be find her https://issues.apache.org/jira/browse/CAMEL-19856 Best Gerald P.S. I'm going to open another one for the trustore linking. > Andrea Cosentino hat am 12.09.2023 20:01 CEST geschrieben: > > > Can you open an issue so we won't forget? Thanks > > Il mar 12 set 2023, 19:55 Gerald Kallas ha > scritto: > > > Folks, > > > > we had a code (XML DSL) that was already working to skip SSL hostname > > validation like > > > > > class="org.apache.http.conn.ssl.NoopHostnameVerifier"/> > > ... > > > > > > > > It's not working anymore, getting > > > > javax.net.ssl.SSLHandshakeException: PKIX path building failed: > > sun.security.provider.certpath.SunCertPathBuilderException: unable to find > > valid certification path to requested target > > > > I tried also > > > > > > > > > > same error. > > > > The underlying Java (within a Docker containe) is > > > > openjdk version "11.0.11" 2021-04-20 > > OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) > > OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed > > mode) > > > > Any ideas? > > > > Best > > Gerald
NoopHostnameVerifier seems to not working any longer - Camel 3.20.2
Folks, we had a code (XML DSL) that was already working to skip SSL hostname validation like ... It's not working anymore, getting javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target I tried also same error. The underlying Java (within a Docker containe) is openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode) Any ideas? Best Gerald
Connect to an HTTPS endpoint with self signed certificate
Hi all, I'm trying to connect to a HTTPS endpoint like http://camel.apache.org/schema/blueprint;> http://camel.apache.org/schema/blueprint; streamCache="true"> ... With this I'm getting an error “trustAnchors parameter must be non-empty” Both, keystore and truststore, are available in the etc folder. Any hints? P.S. Can I completely disable the SSL validation? In earlier Camel versions it worked with the x509HostnameVerifier=noopHostnameVerifier Camel is v3.20.2 Best Gerald
Re: [VOTE] Release Apache Camel K 1.11.1
+1 (non-binding) Sent by my mobile device - Gerald Kallas > Am 24.01.2023 um 18:54 schrieb Andrea Cosentino > : > > Side note: This is not a combined vote, but a single vote for camel-k only. > > -- > Andrea Cosentino > -- > Apache Camel PMC Chair > Apache Karaf Committer > Apache Servicemix PMC Member > Email: ancosen1...@yahoo.com > Twitter: @oscerd2 > Github: oscerd > > > > > > > On Tuesday, January 24, 2023 at 06:51:27 PM GMT+1, Andrea Cosentino > wrote: > > > > > > Hello, > > This is a combined vote to release Apache Camel K 1.11.1 > > Camel K 1.11.1 wasn't supposed to be an LTS release, but since OpenJDK > image for JDK 11 has been discontinued (and suddenly removed from Docker > hub), we are upgrading the base image from openjdk for JDK 11 to Temurin > JDK11 (since Openjdk won't release JDK 11 image anymore). > > Essentially, a fresh installation of Camel k 1.11.0 won't work OOTB, there > will need to be some env variables tuning. That's reason behind this > non-LTS patch release. > > Camel K release files: > https://dist.apache.org/repos/dist/dev/camel/camel-k/1.11.1/ > Camel K Tag: > https://gitbox.apache.org/repos/asf?p=camel-k.git;a=shortlog;h=refs/tags/v1.11.1 > > Staging container image repository: > https://hub.docker.com/r/camelk/camel-k/tags > > It's possible to install all staging artifacts with a single command: > > kamel install --operator-image=camelk/camel-k:1.11.1 --olm=false > > Please test this release candidate and cast your vote. > > [ ] +1 Release the binary as Apache Camel K 1.11.1 > [ ] -1 Veto the release (provide specific comments) > > The vote is open for at least 72 hours. > > Here's my +1. > > Thanks, > Andrea Cosentino
Re: [VOTE] Release Apache Camel K 1.10.3 and Camel K Runtime 1.15.2
+1 > Andrea Cosentino hat am 11.11.2022 10:31 CET geschrieben: > > > Hello, > > This is a combined vote to release Apache Camel K 1.10.3 and Camel K Runtime > 1.15.2. > > We are upgrading to Camel 3.18.3 and Camel-Kamelets 0.9.3, this means > Camel-Quarkus will be updated to 2.13.1. > > Runtime source files: > https://dist.apache.org/repos/dist/dev/camel/camel-k-runtime/1.15.2/ > Runtime staging repository: > https://repository.apache.org/content/repositories/orgapachecamel-1495 > Runtime Tag: > https://gitbox.apache.org/repos/asf?p=camel-k-runtime.git;a=shortlog;h=refs/tags/camel-k-runtime-project-1.15.2 > > Camel K release files: > https://dist.apache.org/repos/dist/dev/camel/camel-k/1.10.3/ > Camel K Tag: > https://gitbox.apache.org/repos/asf?p=camel-k.git;a=shortlog;h=refs/tags/v1.10.3 > > Staging container image repository: > https://hub.docker.com/r/camelk/camel-k/tags > > It's possible to install all staging artifacts with a single command: > > kamel install --operator-image=camelk/camel-k:1.10.3 --maven-repository= > https://repository.apache.org/content/repositories/orgapachecamel-1495 > --olm=false > > Please test this release candidate and cast your vote. > > [ ] +1 Release the binary as Apache Camel K 1.10.3 and > Apache Camel K Runtime > 1.15.2 > [ ] -1 Veto the release (provide specific comments) > > The vote is open for at least 72 hours. > > Here's my +1. > > Thanks, > Andrea Cosentino
Re: [VOTE] Release Apache Camel K 1.9.2
+1 Sent by my mobile device - Gerald Kallas > Am 17.05.2022 um 11:30 schrieb Andrea Cosentino : > > Hello all: > > This is a combined vote to release Apache Camel K 1.9.2. > > This is a patch release fixing an issue with OLM installation and Kamelets > support. > > Camel K release files: > https://dist.apache.org/repos/dist/dev/camel/camel-k/1.9.2/ > Camel K Tag: > https://gitbox.apache.org/repos/asf?p=camel-k.git;a=shortlog;h=refs/tags/v1.9.2 > > Staging container image repository: > https://hub.docker.com/r/camelk/camel-k/tags > > It's possible to install all staging artifacts with a single command: > > kamel install --operator-image=camelk/camel-k:1.9.2 --olm=false > > Please test this release candidate and cast your vote. > > [ ] +1 Release the binary as Apache Camel K 1.9.2 > [ ] -1 Veto the release (provide specific comments) > > The vote is open for at least 72 hours. > > Here's my +1. > > Thanks, > Andrea Cosentino
Re: [VOTE] Release Apache Camel K 1.9.1 and Camel-Kamelets 0.8.1
+1 > Jean-Baptiste Onofré hat am 10.05.2022 08:27 geschrieben: > > > +1 (binding) > > Regards > JB > > On Mon, May 9, 2022 at 2:42 PM Andrea Cosentino wrote: > > > > Hello all: > > > > This is a combined vote to release Apache Camel K 1.9.1 and Kamelets 0.8.1. > > > > This is a patch release fixing an issue with OLM installation and a little > > bug on the AWS Kinesis source Kamelet. > > > > Kamelets release files: > > https://dist.apache.org/repos/dist/dev/camel/camel-kamelets/0.8.1/ > > Kamelets staging repository: > > https://repository.apache.org/content/repositories/orgapachecamel-1436 > > Kamelets Tag: > > https://gitbox.apache.org/repos/asf?p=camel-kamelets.git;a=shortlog;h=refs/tags/v0.8.1 > > > > Camel K release files: > > https://dist.apache.org/repos/dist/dev/camel/camel-k/1.9.1/ > > Camel K Tag: > > https://gitbox.apache.org/repos/asf?p=camel-k.git;a=shortlog;h=refs/tags/v1.9.1 > > > > Staging container image repository: > > https://hub.docker.com/r/camelk/camel-k/tags > > > > It's possible to install all staging artifacts with a single command: > > > > kamel install --operator-image=camelk/camel-k:1.9.1 --maven-repository= > > https://repository.apache.org/content/repositories/orgapachecamel-1436 > > --olm=false > > > > Please test this release candidate and cast your vote. > > > > [ ] +1 Release the binary as Apache Camel K 1.9.1 and Apache Camel Kamelets > > 0.8.1 > > [ ] -1 Veto the release (provide specific comments) > > > > The vote is open for at least 72 hours. > > > > Here's my +1. > > > > Thanks, > > Andrea Cosentino
Camel-K builders garbage collection
Hi all, we're experiencing that the Camel-K builders remain in the cluster after a successful build. Does there exist an option that the builders are automatically being removed after their job is done? Many thanks in advance Gerald
Re: Camel-K Tracing Trait error
Hi Andrea, thanks for your response. I opened an issue. See https://github.com/apache/camel-k/issues/2633 Best Gerald > Gerald Kallas hat am 14.09.2021 12:49 > geschrieben: > > > Dear Camel-K folks. > > I did install on a GKE > * Camel-K 1.6 > * the Jaeger Operator following > https://github.com/jaegertracing/jaeger-operator > The Jaeger starts well. > > Afterwards I did execute > > kamel run --trait tracing.enabled=true --trait tracing.auto=true hello.groovy > > hello.groovy looks like > > from('timer:tick?period=3000') > .setBody().constant('Hello world from Camel K') > .to('log:info') > > The log of the Camel-K route shows periodically > > [1] 2021-09-14 10:38:03,978 WARN [io.jae.int.rep.RemoteReporter] > (jaeger.RemoteReporter-QueueProcessor) FlushCommand execution failed! > Repeated errors of this command will not be logged.: > io.jaegertracing.internal.exceptions.SenderException: Failed to flush spans. > [1] at > io.jaegertracing.thrift.internal.senders.ThriftSender.flush(ThriftSender.java:116) > [1] at > io.jaegertracing.internal.reporters.RemoteReporter$FlushCommand.execute(RemoteReporter.java:160) > [1] at > io.jaegertracing.internal.reporters.RemoteReporter$QueueProcessor.run(RemoteReporter.java:182) > [1] at java.base/java.lang.Thread.run(Thread.java:829) > [1] Caused by: io.jaegertracing.internal.exceptions.SenderException: Could > not send 1 spans > [1] at > io.jaegertracing.thrift.internal.senders.UdpSender.send(UdpSender.java:86) > [1] at > io.jaegertracing.thrift.internal.senders.ThriftSender.flush(ThriftSender.java:114) > [1] ... 3 more > [1] Caused by: org.apache.thrift.transport.TTransportException: Cannot flush > closed transport > [1] at > io.jaegertracing.thrift.internal.reporters.protocols.ThriftUdpTransport.flush(ThriftUdpTransport.java:151) > [1] at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73) > [1] at org.apache.thrift.TServiceClient.sendBaseOneway(TServiceClient.java:66) > [1] at > io.jaegertracing.agent.thrift.Agent$Client.send_emitBatch(Agent.java:70) > [1] at io.jaegertracing.agent.thrift.Agent$Client.emitBatch(Agent.java:63) > [1] at > io.jaegertracing.thrift.internal.senders.UdpSender.send(UdpSender.java:84) > [1] ... 4 more > [1] Caused by: java.net.PortUnreachableException: ICMP Port Unreachable > [1] at java.base/java.net.PlainDatagramSocketImpl.send(Native Method) > [1] at java.base/java.net.DatagramSocket.send(DatagramSocket.java:695) > [1] at > io.jaegertracing.thrift.internal.reporters.protocols.ThriftUdpTransport.flush(ThriftUdpTransport.java:149) > [1] ... 9 more > [1] > > Any idea what's missing here? > > Thanks in advance > Gerald
Camel-K Tracing Trait error
Dear Camel-K folks. I did install on a GKE * Camel-K 1.6 * the Jaeger Operator following https://github.com/jaegertracing/jaeger-operator The Jaeger starts well. Afterwards I did execute kamel run --trait tracing.enabled=true --trait tracing.auto=true hello.groovy hello.groovy looks like from('timer:tick?period=3000') .setBody().constant('Hello world from Camel K') .to('log:info') The log of the Camel-K route shows periodically [1] 2021-09-14 10:38:03,978 WARN [io.jae.int.rep.RemoteReporter] (jaeger.RemoteReporter-QueueProcessor) FlushCommand execution failed! Repeated errors of this command will not be logged.: io.jaegertracing.internal.exceptions.SenderException: Failed to flush spans. [1] at io.jaegertracing.thrift.internal.senders.ThriftSender.flush(ThriftSender.java:116) [1] at io.jaegertracing.internal.reporters.RemoteReporter$FlushCommand.execute(RemoteReporter.java:160) [1] at io.jaegertracing.internal.reporters.RemoteReporter$QueueProcessor.run(RemoteReporter.java:182) [1] at java.base/java.lang.Thread.run(Thread.java:829) [1] Caused by: io.jaegertracing.internal.exceptions.SenderException: Could not send 1 spans [1] at io.jaegertracing.thrift.internal.senders.UdpSender.send(UdpSender.java:86) [1] at io.jaegertracing.thrift.internal.senders.ThriftSender.flush(ThriftSender.java:114) [1] ... 3 more [1] Caused by: org.apache.thrift.transport.TTransportException: Cannot flush closed transport [1] at io.jaegertracing.thrift.internal.reporters.protocols.ThriftUdpTransport.flush(ThriftUdpTransport.java:151) [1] at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73) [1] at org.apache.thrift.TServiceClient.sendBaseOneway(TServiceClient.java:66) [1] at io.jaegertracing.agent.thrift.Agent$Client.send_emitBatch(Agent.java:70) [1] at io.jaegertracing.agent.thrift.Agent$Client.emitBatch(Agent.java:63) [1] at io.jaegertracing.thrift.internal.senders.UdpSender.send(UdpSender.java:84) [1] ... 4 more [1] Caused by: java.net.PortUnreachableException: ICMP Port Unreachable [1] at java.base/java.net.PlainDatagramSocketImpl.send(Native Method) [1] at java.base/java.net.DatagramSocket.send(DatagramSocket.java:695) [1] at io.jaegertracing.thrift.internal.reporters.protocols.ThriftUdpTransport.flush(ThriftUdpTransport.java:149) [1] ... 9 more [1] Any idea what's missing here? Thanks in advance Gerald
Re: Feature camel-atlasmap not found
Ok, sound good. Tx JB. > Jean-Baptiste Onofré hat am 18.08.2021 16:41 geschrieben: > > > Hi Gerald, > > Thanks, I created the Jira at Camel (with karaf as component) as it's > not really a Karaf task. > > Regards > JB > > On 18/08/2021 16:36, Gerald Kallas wrote: > > Hi JB, > > > > done. See > > https://issues.apache.org/jira/projects/KARAF/issues/KARAF-7241 > > > > Best > > Gerald > > > >> Jean-Baptiste Onofré hat am 16.08.2021 14:08 > >> geschrieben: > >> > >> > >> Hi, > >> > >> IMHO, we should create a Jira to add Karaf support for non existing > >> features. > >> > >> I can work on it (using component private package or creating required > >> bundle). > >> > >> @Gerald, can you please create a Jira about atlasmap ? > >> > >> Thanks, > >> Regards > >> JB > >> > >> On 13/08/2021 22:24, Gerald Kallas wrote: > >>> Ah ok. Tx. > >>> > >>> Is it supported in Camel-K? And if yes, how to hand over the map file to > >>> the integration? > >>> > >>> Best > >>> Gerald > >>> > >>>> Andrea Cosentino hat am 13.08.2021 22:12 geschrieben: > >>>> > >>>> > >>>> Hello, > >>>> > >>>> It's not supported in OSGi > >>>> > >>>> Il ven 13 ago 2021, 22:06 Gerald Kallas ha > >>>> scritto: > >>>> > >>>>> Dear all. > >>>>> > >>>>> I did install a vanilla karaf 4.2.9 w/ Camel 3.11.1. > >>>>> > >>>>> The command > >>>>> > >>>>> feature:install camel-atlasmap > >>>>> > >>>>> responds with > >>>>> > >>>>> Error executing command: No matching features for camel-atlasmap/0 > >>>>> > >>>>> Same with Camel 3.7.5. Did I miss something? The documentation says > >>>>> camel-atlasmap is available from Camel 3.7. > >>>>> > >>>>> Best > >>>>> Gerald
Re: Feature camel-atlasmap not found
Hi JB, done. See https://issues.apache.org/jira/projects/KARAF/issues/KARAF-7241 Best Gerald > Jean-Baptiste Onofré hat am 16.08.2021 14:08 geschrieben: > > > Hi, > > IMHO, we should create a Jira to add Karaf support for non existing > features. > > I can work on it (using component private package or creating required > bundle). > > @Gerald, can you please create a Jira about atlasmap ? > > Thanks, > Regards > JB > > On 13/08/2021 22:24, Gerald Kallas wrote: > > Ah ok. Tx. > > > > Is it supported in Camel-K? And if yes, how to hand over the map file to > > the integration? > > > > Best > > Gerald > > > >> Andrea Cosentino hat am 13.08.2021 22:12 geschrieben: > >> > >> > >> Hello, > >> > >> It's not supported in OSGi > >> > >> Il ven 13 ago 2021, 22:06 Gerald Kallas ha > >> scritto: > >> > >>> Dear all. > >>> > >>> I did install a vanilla karaf 4.2.9 w/ Camel 3.11.1. > >>> > >>> The command > >>> > >>> feature:install camel-atlasmap > >>> > >>> responds with > >>> > >>> Error executing command: No matching features for camel-atlasmap/0 > >>> > >>> Same with Camel 3.7.5. Did I miss something? The documentation says > >>> camel-atlasmap is available from Camel 3.7. > >>> > >>> Best > >>> Gerald
Re: Feature camel-atlasmap not found
Ah ok. Tx. Is it supported in Camel-K? And if yes, how to hand over the map file to the integration? Best Gerald > Andrea Cosentino hat am 13.08.2021 22:12 geschrieben: > > > Hello, > > It's not supported in OSGi > > Il ven 13 ago 2021, 22:06 Gerald Kallas ha > scritto: > > > Dear all. > > > > I did install a vanilla karaf 4.2.9 w/ Camel 3.11.1. > > > > The command > > > > feature:install camel-atlasmap > > > > responds with > > > > Error executing command: No matching features for camel-atlasmap/0 > > > > Same with Camel 3.7.5. Did I miss something? The documentation says > > camel-atlasmap is available from Camel 3.7. > > > > Best > > Gerald
Feature camel-atlasmap not found
Dear all. I did install a vanilla karaf 4.2.9 w/ Camel 3.11.1. The command feature:install camel-atlasmap responds with Error executing command: No matching features for camel-atlasmap/0 Same with Camel 3.7.5. Did I miss something? The documentation says camel-atlasmap is available from Camel 3.7. Best Gerald
Re: Update Camel-K - uninstall and namespace deletion w/ k8s let all Camel-K Integrations alive
Hi Pasquale, thanks for your reply. I have opened a github issue for, see https://github.com/apache/camel-k/issues/2533 Best Gerald > Pasquale Congiusti hat am 26.07.2021 16:56 > geschrieben: > > > Hi Gerald, > the way you're describing, it appears to be a bug. Do you mind opening a > github issue so we can verify and track the findings over there? > > Thanks, > Pasquale. > > On Mon, Jul 26, 2021 at 4:33 PM Gerald Kallas > wrote: > > > Hi Camel-K folks, > > > > I tried to install the new Camel-K 1.5 in our k8s Cluster. > > > > The uninstall command and Namespace removal worked, but the Integrations > > still remain. Finally these lead to a deadlock at a fresh Camel-K > > installation. > > > > After manual removal of all Integrations the setup of Camel-K works as > > expected. > > > > Any comments or hints would be really helpful. > > > > Best > > - Gerald
Update Camel-K - uninstall and namespace deletion w/ k8s let all Camel-K Integrations alive
Hi Camel-K folks, I tried to install the new Camel-K 1.5 in our k8s Cluster. The uninstall command and Namespace removal worked, but the Integrations still remain. Finally these lead to a deadlock at a fresh Camel-K installation. After manual removal of all Integrations the setup of Camel-K works as expected. Any comments or hints would be really helpful. Best - Gerald
Re: Camel-K 1.4 - some architecture guidance needed
Many thanks for your response, Nikola. The answers make the things more clear. Best Gerald > Nicola Ferraro hat am 11.05.2021 16:42 geschrieben: > > > Hi, I'll try to answer inline. > > Il giorno ven 7 mag 2021 alle ore 01:36 Gerald Kallas > ha scritto: > > > Dear Camel-K folks, > > > > we're currently evaluating Camel-K for a new integration platform of a > > fashion retailer. At first, many thanks for all your effort of designing > > and developing the Camel-K platform! > > > > With the current version 1.4 we've some questions for those I wasn't able > > to find all the answers on the Camel-K website and on other sources. I've > > researched a lot for all those details. > > > > I'm curious whether the current architecture is still valid shown here > > https://camel.apache.org/camel-k/latest/architecture/architecture.html > > (referenced to version 1.1.1). If not, do you have a newer architecture and > > maybe also in any case some explanations to the building blocks within the > > architecture? > > > > That has not changed. There are some changes needed wrt Kamelets, but the > core is still the same. > > > > Further we want to run integrations real "serverless". What do you > > recommend in this case? Pre-compile based on GraalVM to small binary? How > > looks like the recommended approach from development over test to > > production? > > > > Some further questions we got from our client .. > > * For a common deployment of an integration, will there be created an > > image including a JVM every time? > > > > Yes, for now. We do create JVM based images now, the promise is to do > native mode in one of the next releases: > https://github.com/apache/camel-k/issues/991. > It's been postponed since it's a hard task, but that's one of the reasons > why we switched to Camel-quarkus as sole runtime, so definitely a main goal. > > > > * What are the requirements to build the image locally (not on the > > cluster)? > > > > This is a new feature added (to build images using "kamel local build"), > but the images are meant to be run locally, we're not testing the full > workflow in CI (i.e. reusing the same images on the cluster). We'll > appreciate feedback on that. Building locally requires docker and java JDK > 11 locally. > > > > * What connections are possible to deliver runtime events to Grafana and > > Prometheus? > > > > Any integration can send metrics to Prometheus via the prometheus trait. > Additionally you can also configure your own custom metrics and inject them > in the integrations. Grafana talks to prometheus then. > > > > * What are the recommendations to perform debugging and later on unit > > tests? > > > > We've added a "kamel debug command" to do debugging on running code in a > remote cluster. There's also a "kamel local run" that usually helps doing > troubleshooting without having to connect to a cluster. > Unit tests can be added to the libraries of code you use in the integration > routes, while for the full integrations you can use YAKS to do e2e tests. > > > > A lot of questions but I would be more than happy if one could make the > > details more clear for us. > > > > Many thanks in advance. > > Best - Gerald
Camel-K route in native mode (GraalVM) on k8s?
Hi folks, when running a simple Camel-K route like from('timer:tick?period=3000') .setBody().constant('Hello world from Camel K') .to('log:info') the memory consumption is around 192 MByte on k8s. Could this be compiled for GraalVM and deployed to reduce the memory footprint? It's better to have the route as Java instead? Best Gerald
Camel-K 1.4 - some architecture guidance needed
Dear Camel-K folks, we're currently evaluating Camel-K for a new integration platform of a fashion retailer. At first, many thanks for all your effort of designing and developing the Camel-K platform! With the current version 1.4 we've some questions for those I wasn't able to find all the answers on the Camel-K website and on other sources. I've researched a lot for all those details. I'm curious whether the current architecture is still valid shown here https://camel.apache.org/camel-k/latest/architecture/architecture.html (referenced to version 1.1.1). If not, do you have a newer architecture and maybe also in any case some explanations to the building blocks within the architecture? Further we want to run integrations real "serverless". What do you recommend in this case? Pre-compile based on GraalVM to small binary? How looks like the recommended approach from development over test to production? Some further questions we got from our client .. * For a common deployment of an integration, will there be created an image including a JVM every time? * What are the requirements to build the image locally (not on the cluster)? * What connections are possible to deliver runtime events to Grafana and Prometheus? * What are the recommendations to perform debugging and later on unit tests? A lot of questions but I would be more than happy if one could make the details more clear for us. Many thanks in advance. Best - Gerald
Camel-K on Google Cloud Run
Hi all, does Camel-K run on Google Cloud Run? Best Gerald
Fwd: Sample API run with Camel-K does .. almost nothing
Hi folks, any ideas about? Thanks .. Gerald -- Ursprüngliche Nachricht -- Von: Gerald Kallas An: "users@camel.apache.org" Datum: 12.03.2021 20:40 Betreff: Sample API run with Camel-K does .. almost nothing Hi everybody, I just tried to run the example under https://github.com/apache/camel-k-examples/tree/master/02-serverless-api After this command E:\camel-k-examples-master\02-serverless-api>kamel run API.java --source test/MinioCustomizer.java --property-file test/minio.properties --open-api=openapi.yaml --dependency=camel-openapi-java --dev Modeline options have been loaded from source files Full command: kamel run API.java --source test/MinioCustomizer.java --property-file test/minio.properties --open-api=openapi.yaml --dependency=camel-openapi-java --dev --open-api=openapi.yaml --dependency=camel-openapi-java integration "api" created nothing more happens. The Minio pod is running. Any ideas about? Best Gerald
Sample API run with Camel-K does .. almost nothing
Hi everybody, I just tried to run the example under https://github.com/apache/camel-k-examples/tree/master/02-serverless-api After this command E:\camel-k-examples-master\02-serverless-api>kamel run API.java --source test/MinioCustomizer.java --property-file test/minio.properties --open-api=openapi.yaml --dependency=camel-openapi-java --dev Modeline options have been loaded from source files Full command: kamel run API.java --source test/MinioCustomizer.java --property-file test/minio.properties --open-api=openapi.yaml --dependency=camel-openapi-java --dev --open-api=openapi.yaml --dependency=camel-openapi-java integration "api" created nothing more happens. The Minio pod is running. Any ideas about? Best Gerald
Re: Camel K - serverless example
Ok, thanks Nicola. I've just watched some of your videos on YT. Does that statement below mean that Knative Camel Sources will become a part of Kamel Integrations soon and there's no more need for Knative Camel Sources on top? Still wondering .. Best Gerald > Nicola Ferraro hat am 16.11.2020 11:22 geschrieben: > > > "Knative Camel Sources" is a wrapper around Camel K integrations that used > to provide a closer integration with Knative tools (CLI or UI consoles). > But we're now providing the same level of integration with plain Camel K > and we're going to deprecate them, to also reduce the installation hassle > from users and maintenance issues from our side. > > A Knative "CamelSource" can be easily converted into a Camel K > "Integration" and we're going to change also the examples to use pure Camel > K (especially with Kamelet / KameletBinding model which has been first > released with 1.2.0). > > Nicola > > On Mon, Nov 16, 2020 at 11:16 AM Gerald Kallas wrote: > > > Thanks, Nicola. Will try this out. > > > > What are the additional features that the Knative Apache Camel Operator > > provides on top of the Kamel K Operator? > > > > Best > > - Gerald > > > > > Nicola Ferraro hat am 16.11.2020 10:43 > > geschrieben: > > > > > > > > > Hi, > > > no need to install the Knative Apache Camel Operator in this case. > > > The example needs to be updated because in 1.2.0 we enforce every source > > to > > > be a RoutesBuilder, so if you just extend RoutesBuilder and provide an > > > empty configure() method it should work again. > > > There's also a more idiomatic way to run that example using only > > > property-based configuration without customizers. > > > > > > Nicola > > > > > > On Mon, Nov 16, 2020 at 10:23 AM Gerald Kallas > > > > > wrote: > > > > > > > Hi everybody, > > > > > > > > I was digging into the examples and tried to get this one running with > > > > minio .. > > > > > > > > > > https://github.com/apache/camel-k-examples/tree/master/02-serverless-api > > > > > > > > Whilst deployment I'm getting an error > > > > > > > > 2020-11-16 09:10:01,876 INFO [org.apa.cam.k.Runtime] (main) Apache > > Camel K > > > > Runtime 1.5.0 > > > > 2020-11-16 09:10:01,900 INFO > > [org.apa.cam.qua.cor.CamelBootstrapRecorder] > > > > (main) bootstrap runtime: > > org.apache.camel.quarkus.main.CamelMainRuntime > > > > 2020-11-16 09:10:01,990 INFO [org.apa.cam.k.lis.SourcesConfigurer] > > (main) > > > > Loading routes from: SourceDefinition{name='API', language='java', > > > > location='file:/etc/camel/sources/i-source-000/API.java', } > > > > 2020-11-16 09:10:02,888 INFO [org.apa.cam.k.lis.SourcesConfigurer] > > (main) > > > > Loading routes from: SourceDefinition{name='MinioCustomizer', > > > > language='java', > > > > location='file:/etc/camel/sources/i-source-001/MinioCustomizer.java', } > > > > 2020-11-16 09:10:03,135 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] > > > > (main) Failed to start application: > > org.apache.camel.RuntimeCamelException: > > > > java.lang.ClassCastException: class test.MinioCustomizer cannot be > > cast to > > > > class org.apache.camel.RoutesBuilder (test.MinioCustomizer is in > > unnamed > > > > module of loader org.joor.Compile$ByteArrayClassLoader @5b9396d3; > > > > org.apache.camel.RoutesBuilder is in unnamed module of loader 'app') > > > > at > > > > > > org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:51) > > > > at > > org.apache.camel.k.support.SourcesSupport.load(SourcesSupport.java:112) > > > > at > > > > > > org.apache.camel.k.support.SourcesSupport.loadSources(SourcesSupport.java:85) > > > > at > > > > > > org.apache.camel.k.listener.SourcesConfigurer.accept(SourcesConfigurer.java:73) > > > > at > > > > > > org.apache.camel.k.listener.AbstractPhaseListener.accept(AbstractPhaseListener.java:32) > > > > at > > > > > > org.apache.camel.k.quarkus.Application$ListenerAdapter.invokeListeners(Application.java:141) > > > > at > > > > > > org.apache.camel.k.quarkus.Application$ListenerAdapter.beforeConfigure(Application.java:103) > > > > at > > > > &
Camel K API Design
Dear all, I've created a simple REST API (see below) and deployed this in an existing OpenShift cluster with the Camel-K Operator. The API can be reached under http://hello-kamel./say/hello The next steps are * change the URL (hello - app, kamel - project) * change the scheme to HTTPS * secure the API I did search around but didn't find anything that helps. Maybe someone who is more familiar with Camel-K could help with the questions above? Many thanks for any hints in advance. Best - Gerald Attachments api-hello.json { "swagger": "2.0", "info": { "title": "HelloAPI", "description": "Hello API", "version": "1.0" }, "host": "", "basePath": "/say/", "tags": [ { "name": "Hello", "description": "HelloAPI" } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/hello": { "get": { "summary": "getHello", "description": "Get Message Hello World!", "operationId": "getHello", "responses": { "200": { "description": "Response", "schema": { "$ref": "#/definitions/HelloData" } } } } } }, "definitions": { "HelloData": { "title": "Root Type for HelloData", "description": "Hello Data", "type": "object", "properties": { "message": { "type": "string" } }, "example": "{}" } } } api-hello.xml http://www.w3.org/2001/XMLSchema-instance; xmlns="http://camel.apache.org/schema/spring; xsi:schemaLocation=" http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd;> Hello World! deployment kamel run --name hello --property camel.rest.port=8080 --open-api hello-api.json hello-api.xml
Commonalities and difference between Camel K and Camel Quarkus
Dear all, I'm digging into both worlds a bit more in detail and I wonder what are the commonalities and differences between Camel K and Camel Quarkus? Many thanks in advance for some words about this .. Best Gerald
Camel K - best practices
Dear community, when using Camel K I'm interested in some best practices. Assuming the case of a REST API that needs to be securely called from an external application, process some data (with data transformation) and route the data to one ore more external (secured) HTTP endpoints (APIs or plain). 1. What's recommended for authentication of the API - defining the security for the API itself (leveraging Quarkus security) or using an dedicated gateway (ingress or similar). In the second case, how to publish the API endpoint when deploying the API? 2. Where to store configuration information for the routes? At deployment time only? 3. Where to store credentials for the external endpoints securely? 4. When coupling multiple routes that are defined in multiple applications, is Service Mesh recommended? If yes, how to interact from routes to other ones? Best Gerald
Re: Camel K - serverless example
Thanks, Nicola. Will try this out. What are the additional features that the Knative Apache Camel Operator provides on top of the Kamel K Operator? Best - Gerald > Nicola Ferraro hat am 16.11.2020 10:43 geschrieben: > > > Hi, > no need to install the Knative Apache Camel Operator in this case. > The example needs to be updated because in 1.2.0 we enforce every source to > be a RoutesBuilder, so if you just extend RoutesBuilder and provide an > empty configure() method it should work again. > There's also a more idiomatic way to run that example using only > property-based configuration without customizers. > > Nicola > > On Mon, Nov 16, 2020 at 10:23 AM Gerald Kallas > wrote: > > > Hi everybody, > > > > I was digging into the examples and tried to get this one running with > > minio .. > > > > https://github.com/apache/camel-k-examples/tree/master/02-serverless-api > > > > Whilst deployment I'm getting an error > > > > 2020-11-16 09:10:01,876 INFO [org.apa.cam.k.Runtime] (main) Apache Camel K > > Runtime 1.5.0 > > 2020-11-16 09:10:01,900 INFO [org.apa.cam.qua.cor.CamelBootstrapRecorder] > > (main) bootstrap runtime: org.apache.camel.quarkus.main.CamelMainRuntime > > 2020-11-16 09:10:01,990 INFO [org.apa.cam.k.lis.SourcesConfigurer] (main) > > Loading routes from: SourceDefinition{name='API', language='java', > > location='file:/etc/camel/sources/i-source-000/API.java', } > > 2020-11-16 09:10:02,888 INFO [org.apa.cam.k.lis.SourcesConfigurer] (main) > > Loading routes from: SourceDefinition{name='MinioCustomizer', > > language='java', > > location='file:/etc/camel/sources/i-source-001/MinioCustomizer.java', } > > 2020-11-16 09:10:03,135 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] > > (main) Failed to start application: org.apache.camel.RuntimeCamelException: > > java.lang.ClassCastException: class test.MinioCustomizer cannot be cast to > > class org.apache.camel.RoutesBuilder (test.MinioCustomizer is in unnamed > > module of loader org.joor.Compile$ByteArrayClassLoader @5b9396d3; > > org.apache.camel.RoutesBuilder is in unnamed module of loader 'app') > > at > > org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:51) > > at org.apache.camel.k.support.SourcesSupport.load(SourcesSupport.java:112) > > at > > org.apache.camel.k.support.SourcesSupport.loadSources(SourcesSupport.java:85) > > at > > org.apache.camel.k.listener.SourcesConfigurer.accept(SourcesConfigurer.java:73) > > at > > org.apache.camel.k.listener.AbstractPhaseListener.accept(AbstractPhaseListener.java:32) > > at > > org.apache.camel.k.quarkus.Application$ListenerAdapter.invokeListeners(Application.java:141) > > at > > org.apache.camel.k.quarkus.Application$ListenerAdapter.beforeConfigure(Application.java:103) > > at > > org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:651) > > at > > org.apache.camel.quarkus.main.CamelMain.initCamelContext(CamelMain.java:97) > > at org.apache.camel.quarkus.main.CamelMain.doInit(CamelMain.java:67) > > at org.apache.camel.support.service.BaseService.init(BaseService.java:83) > > at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:118) > > at > > org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49) > > at > > org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45) > > at > > io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy_0(CamelBootstrapProcessor$boot-173480958.zig:101) > > at > > io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy(CamelBootstrapProcessor$boot-173480958.zig:40) > > at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:752) > > at io.quarkus.runtime.Application.start(Application.java:90) > > at > > io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:91) > > at io.quarkus.runtime.Quarkus.run(Quarkus.java:61) > > at io.quarkus.runtime.Quarkus.run(Quarkus.java:38) > > at io.quarkus.runtime.Quarkus.run(Quarkus.java:106) > > at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29) > > Caused by: java.lang.ClassCastException: class test.MinioCustomizer cannot > > be cast to class org.apache.camel.RoutesBuilder (test.MinioCustomizer is in > > unnamed module of loader org.joor.Compile$ByteArrayClassLoader @5b9396d3; > > org.apache.camel.RoutesBuilder is in unnamed module of loader 'app') > > at > > org.apache.camel.k.loader.java.JavaSourceLoader.load(JavaSourceLoader.java:51) > > at org.apache.camel.k.support.SourcesSupport.load(SourcesSupport.java:104) > > ... 21 more > > > > Any ideas what might be wrong here? > > > > P.S. I'm using OpenShift 4.5.15 with Kamel K Operator 1.2.0 > > > > P.S. #2 With Kamel K Operator .. do I need to install Knative Apache Camel > > Operator as well? > > > > Best > > Gerald
Camel K - serverless example
Hi everybody, I was digging into the examples and tried to get this one running with minio .. https://github.com/apache/camel-k-examples/tree/master/02-serverless-api Whilst deployment I'm getting an error 2020-11-16 09:10:01,876 INFO [org.apa.cam.k.Runtime] (main) Apache Camel K Runtime 1.5.0 2020-11-16 09:10:01,900 INFO [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) bootstrap runtime: org.apache.camel.quarkus.main.CamelMainRuntime 2020-11-16 09:10:01,990 INFO [org.apa.cam.k.lis.SourcesConfigurer] (main) Loading routes from: SourceDefinition{name='API', language='java', location='file:/etc/camel/sources/i-source-000/API.java', } 2020-11-16 09:10:02,888 INFO [org.apa.cam.k.lis.SourcesConfigurer] (main) Loading routes from: SourceDefinition{name='MinioCustomizer', language='java', location='file:/etc/camel/sources/i-source-001/MinioCustomizer.java', } 2020-11-16 09:10:03,135 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] (main) Failed to start application: org.apache.camel.RuntimeCamelException: java.lang.ClassCastException: class test.MinioCustomizer cannot be cast to class org.apache.camel.RoutesBuilder (test.MinioCustomizer is in unnamed module of loader org.joor.Compile$ByteArrayClassLoader @5b9396d3; org.apache.camel.RoutesBuilder is in unnamed module of loader 'app') at org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:51) at org.apache.camel.k.support.SourcesSupport.load(SourcesSupport.java:112) at org.apache.camel.k.support.SourcesSupport.loadSources(SourcesSupport.java:85) at org.apache.camel.k.listener.SourcesConfigurer.accept(SourcesConfigurer.java:73) at org.apache.camel.k.listener.AbstractPhaseListener.accept(AbstractPhaseListener.java:32) at org.apache.camel.k.quarkus.Application$ListenerAdapter.invokeListeners(Application.java:141) at org.apache.camel.k.quarkus.Application$ListenerAdapter.beforeConfigure(Application.java:103) at org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:651) at org.apache.camel.quarkus.main.CamelMain.initCamelContext(CamelMain.java:97) at org.apache.camel.quarkus.main.CamelMain.doInit(CamelMain.java:67) at org.apache.camel.support.service.BaseService.init(BaseService.java:83) at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:118) at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49) at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45) at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy_0(CamelBootstrapProcessor$boot-173480958.zig:101) at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot-173480958.deploy(CamelBootstrapProcessor$boot-173480958.zig:40) at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:752) at io.quarkus.runtime.Application.start(Application.java:90) at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:91) at io.quarkus.runtime.Quarkus.run(Quarkus.java:61) at io.quarkus.runtime.Quarkus.run(Quarkus.java:38) at io.quarkus.runtime.Quarkus.run(Quarkus.java:106) at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29) Caused by: java.lang.ClassCastException: class test.MinioCustomizer cannot be cast to class org.apache.camel.RoutesBuilder (test.MinioCustomizer is in unnamed module of loader org.joor.Compile$ByteArrayClassLoader @5b9396d3; org.apache.camel.RoutesBuilder is in unnamed module of loader 'app') at org.apache.camel.k.loader.java.JavaSourceLoader.load(JavaSourceLoader.java:51) at org.apache.camel.k.support.SourcesSupport.load(SourcesSupport.java:104) ... 21 more Any ideas what might be wrong here? P.S. I'm using OpenShift 4.5.15 with Kamel K Operator 1.2.0 P.S. #2 With Kamel K Operator .. do I need to install Knative Apache Camel Operator as well? Best Gerald
camel-k API definition and test - some questions
Hi all, I've started to play around with camel-k. I found this https://github.com/abouchama/CamelK-customerAPI The first try as described war running into an error during the deployment in my OpenShift cluster. I removed the "-dependency camel-undertow" and now the API is running. Some questions so far .. 1. Do I need to define dependencies or does the camel-k operator resolve these automatically? 2. How can I see the error details when a deployment fails? 3. The API can be called from everyone. How can I secure the API (authentication/authorization)? I'm aware that camel-k requires a lot of re-think the common camel approach. Thanks for any responses. Best - Gerald
Re: Stream Huge JSON File
Hi, we did similar some time ago to read a large JSON file content. It looks for a JSON array with a given name and splits it to chunks with a given size. Works with an input stream. See the following code .. import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import java.io.InputStream; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.ProducerTemplate; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class JsonSplitter implements Processor { private static final transient Log log = LogFactory.getLog(JsonSplitter.class.getName()); // constants for property names private static final String ARRAY_NAME = "arrayName"; private static final String SPLIT_SIZE = "splitSize"; // initialize variables private ProducerTemplate producer; private String splitString; public void setProducer(ProducerTemplate producer) { this.producer = producer; } public void process(Exchange exchange) throws Exception { // get variables from Exchange properties String arrayName = (String) exchange.getProperty(ARRAY_NAME); int splitSize = Integer.parseInt((String) exchange.getProperty(SPLIT_SIZE)); // log the values log.info("arrayName: " + arrayName); log.info("splitSize: " + splitSize); // get JSON parser from Exchange Body with type java.io.InputStream JsonFactory f = new MappingJsonFactory(); JsonParser jp = f.createParser((InputStream) exchange.getIn().getBody()); JsonToken current; // get JSON root and validate if it is a JSON object current = jp.nextToken(); // throw an exception when the root isn't a JSON object if (current != JsonToken.START_OBJECT) { throw new Exception("Input root is not a JSON object."); } // traverse the JSON object tree while (jp.nextToken() != JsonToken.END_OBJECT) { String fieldName = jp.getCurrentName(); current = jp.nextToken(); // check if the field name matches the ARRAY_NAME if (fieldName.equals(arrayName)) { // check if the token matches the START_ARRAY if (current == JsonToken.START_ARRAY) { // initialize loop variables int i = 1; int j = 1; splitString = ""; // for each of the records in the array while (jp.nextToken() != JsonToken.END_ARRAY) { // read the record into a tree model, // this moves the parsing position to the end of it JsonNode node = jp.readValueAsTree(); // concatenate the array objects as strings if (splitString == "") { splitString = node.toString(); } else { splitString = splitString + "," + node.toString(); } // check if the split size has been reached if (i % splitSize == 0) { // wrap the splitted chunk into the array boundaries splitString = "{\"" + arrayName + "\":[" + splitString + "]}"; log.info("splitIndex: " + j); // process the chunk producer.send(new Processor() { public void process(Exchange outExchange) { outExchange.getIn().setBody(splitString); } }); // re-initialize the split string splitString = ""; }
casisp-runtime - an Apache Camel / Karaf based integration container with a simple model driven deployment
Dear all, I've just published the first release of an Apache Camel / Karaf based integration container with a simple model driven deployment under https://github.com/catshout/casisp-runtime We're using this for simple and common integration use cases for our clients. The casisp-runtime is an Open Source integration runtime container that: * is based on a Docker image that needs less than 5 minutes setup * uses Apache Karaf runtime and Apache Camel components * supports a model driven approach for Integration Service and API deployment Any suggestions and comments are appreciated. Have fun .. Gerald
Re: json-validator full error message
I've created the JIRA ticket https://issues.apache.org/jira/browse/CAMEL-15663 for the improvement. > Claus Ibsen hat am 28.09.2020 21:14 geschrieben: > > > You can do an onException(JsonValidationException) and then output > some more details from that exception. > > But yeah out of the box, then it should likely report some more > details, you can create a JIRA. > And are welcome to work on a PR > > On Mon, Sep 28, 2020 at 9:12 PM Gerald Kallas wrote: > > > > Hi, > > > > I'm using Camel 3.4.4. > > > > The full blown error stack is > > > > org.apache.camel.component.jsonvalidator.JsonValidationException: JSON > > validation error with 1 errors. Exchange[ID-700bc59e90f0-1601310667823-13-2] > > at > > org.apache.camel.component.jsonvalidator.DefaultJsonValidationErrorHandler.handleErrors(DefaultJsonValidationErrorHandler.java:30) > > at > > org.apache.camel.component.jsonvalidator.JsonValidatorEndpoint.onExchange(JsonValidatorEndpoint.java:120) > > at > > org.apache.camel.support.ProcessorEndpoint$1.process(ProcessorEndpoint.java:63) > > at > > org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:67) > > at > > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:168) > > at > > org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) > > at > > org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) > > at > > org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60) > > at org.apache.camel.processor.Pipeline.process(Pipeline.java:147) > > at > > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286) > > at > > org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83) > > at > > org.apache.camel.support.AsyncProcessorSupport.process(AsyncProcessorSupport.java:40) > > at > > org.apache.camel.http.common.CamelServlet.doService(CamelServlet.java:214) > > at > > org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:80) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > > at > > io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) > > at > > io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) > > at > > io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:64) > > at > > io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) > > at > > org.ops4j.pax.web.service.undertow.internal.Context$1.lambda$wrap$0(Context.java:614) > > at > > io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) > > at > > io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) > > at > > io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33) > > at > > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > > at > > io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53) > > at > > io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) > > at > > io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) > > at > > io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59) > > at > > io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) > > at > > io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) > > at > > io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) >
Re: Camel 3.4.4 feature:install camel-json-validator causes an error
Done https://issues.apache.org/jira/browse/CAMEL-15662 > Jean-Baptiste Onofre hat am 30.09.2020 05:53 geschrieben: > > > Hi, > > What JDK version are you using ? > > I bet you are using JDK 11 (this bnd error can occurs with JDK 11 or "old" > maven-bundle-plugin version). > > The problem is probably in the camel-json-validator bundle. > > Can you please create a Jira and assign to me, I gonna fix that. > > Regards > JB > > > Le 28 sept. 2020 à 21:38, Gerald Kallas a écrit : > > > > Dear all, > > > > I'm trying to install > > > > feature:install camel-json-validator > > > > on Karaf 4.2.9. It causes an error > > > > java.lang.ArrayIndexOutOfBoundsException: Index 19 out of bounds for length > > 19 > > at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:576) > > at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:494) > > at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:483) > > at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:473) > > at aQute.bnd.osgi.Analyzer.analyzeJar(Analyzer.java:2177) > > at aQute.bnd.osgi.Analyzer.analyzeBundleClasspath(Analyzer.java:2083) > > at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:138) > > at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:616) > > at org.ops4j.pax.swissbox.bnd.BndUtils.createBundle(BndUtils.java:161) > > at > > org.ops4j.pax.url.wrap.internal.Connection.getInputStream(Connection.java:83) > > at java.base/java.net.URL.openStream(URL.java:1140) > > at > > org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:78) > > at > > org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60) > > at > > java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) > > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) > > at > > java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) > > at > > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > > at > > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > > at java.base/java.lang.Thread.run(Thread.java:834) > > java.lang.ArrayIndexOutOfBoundsException: Index 19 out of bounds for length > > 19 > > at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:576) > > at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:494) > > at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:483) > > at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:473) > > at aQute.bnd.osgi.Analyzer.analyzeJar(Analyzer.java:2177) > > at aQute.bnd.osgi.Analyzer.analyzeBundleClasspath(Analyzer.java:2083) > > at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:138) > > at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:616) > > at org.ops4j.pax.swissbox.bnd.BndUtils.createBundle(BndUtils.java:161) > > at > > org.ops4j.pax.url.wrap.internal.Connection.getInputStream(Connection.java:83) > > at java.base/java.net.URL.openStream(URL.java:1140) > > at > > org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:78) > > at > > org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60) > > at > > java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) > > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) > > at > > java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) > > at > > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > > at > > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > > at java.base/java.lang.Thread.run(Thread.java:834) > > > > Should I raise a ticket? > > > > Best > > Gerald
Camel 3.4.4 - Update Blueprint DSL file - "Error occurred while stopping lifecycle strategies."
Dear all, I'm working with Camel 3.4.4 and Karaf 4.2.9. When updating a Blueprint DSL file in deploy folder I'm getting this error message (finally a WARN). Any hints and comments on this? Thanks in advance Gerald 2020-10-01T07:32:22,976 | INFO | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall | 10 - org.apache.felix.fileinstall - 3.6.6 | Updating bundle isp.route.hello.xml / 0.0.0 2020-10-01T07:32:22,977 | INFO | fileinstall-/opt/apache-karaf-4.2.9/deploy | BlueprintExtender | 106 - org.apache.aries.blueprint.core - 1.10.2 | Destroying container for blueprint bundle isp.route.hello.xml/0.0.0 2020-10-01T07:32:23,018 | INFO | fileinstall-/opt/apache-karaf-4.2.9/deploy | AbstractCamelContext | 116 - org.apache.camel.camel-base - 3.4.4 | Apache Camel 3.4.4 (isp.context.user.hello) is shutting down 2020-10-01T07:32:23,029 | INFO | fileinstall-/opt/apache-karaf-4.2.9/deploy | DefaultShutdownStrategy | 116 - org.apache.camel.camel-base - 3.4.4 | Starting to graceful shutdown 1 routes (timeout 45 seconds) 2020-10-01T07:32:23,032 | INFO | Camel (isp.context.user.hello) thread #3 - ShutdownTask | DefaultShutdownStrategy | 116 - org.apache.camel.camel-base - 3.4.4 | Route: isp.route.user.hello shutdown complete, was consuming from: servlet:/get 2020-10-01T07:32:23,032 | INFO | fileinstall-/opt/apache-karaf-4.2.9/deploy | DefaultShutdownStrategy | 116 - org.apache.camel.camel-base - 3.4.4 | Graceful shutdown of 1 routes completed in 0 seconds 2020-10-01T07:32:23,036 | WARN | fileinstall-/opt/apache-karaf-4.2.9/deploy | AbstractCamelContext | 116 - org.apache.camel.camel-base - 3.4.4 | Error occurred while stopping lifecycle strategies. This exception will be ignored. org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'blueprintBundle' could be found at org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:805) ~[!/:1.10.2] at org.apache.camel.blueprint.BlueprintContainerBeanRepository.lookupByType(BlueprintContainerBeanRepository.java:104) ~[!/:3.4.4] at org.apache.camel.blueprint.BlueprintContainerBeanRepository.lookupByType(BlueprintContainerBeanRepository.java:100) ~[!/:3.4.4] at org.apache.camel.blueprint.BlueprintContainerBeanRepository.findByType(BlueprintContainerBeanRepository.java:94) ~[!/:3.4.4] at org.apache.camel.support.DefaultRegistry.findByType(DefaultRegistry.java:203) ~[!/:3.4.4] at org.apache.camel.impl.engine.OnCamelContextLifecycleStrategy.onContextStop(OnCamelContextLifecycleStrategy.java:60) ~[!/:3.4.4] at org.apache.camel.impl.engine.AbstractCamelContext.doStop(AbstractCamelContext.java:2910) [!/:3.4.4] at org.apache.camel.support.service.BaseService.stop(BaseService.java:155) [!/:3.4.4] at org.apache.camel.blueprint.BlueprintCamelContext.destroy(BlueprintCamelContext.java:145) [!/:3.4.4] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?] at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:337) [!/:1.10.2] at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:835) [!/:1.10.2] at org.apache.aries.blueprint.container.BeanRecipe.destroy(BeanRecipe.java:742) [!/:1.10.2] at org.apache.aries.blueprint.container.BlueprintRepository.destroy(BlueprintRepository.java:434) [!/:1.10.2] at org.apache.aries.blueprint.container.BlueprintContainerImpl.destroyComponents(BlueprintContainerImpl.java:778) [!/:1.10.2] at org.apache.aries.blueprint.container.BlueprintContainerImpl.tidyupComponents(BlueprintContainerImpl.java:987) [!/:1.10.2] at org.apache.aries.blueprint.container.BlueprintContainerImpl.destroy(BlueprintContainerImpl.java:923) [!/:1.10.2] at org.apache.aries.blueprint.container.BlueprintExtender$3.run(BlueprintExtender.java:336) [!/:1.10.2] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:?] at java.util.concurrent.FutureTask.run(Unknown Source) [?:?] at org.apache.aries.blueprint.container.BlueprintExtender.destroyContainer(BlueprintExtender.java:357) [!/:1.10.2] at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:249) [!/:1.10.2] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500) [!/:1.10.2] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433) [!/:1.10.2] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725) [!/:1.10.2] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463) [!/:1.10.2] at
Camel 3.4.4 feature:install camel-json-validator causes an error
Dear all, I'm trying to install feature:install camel-json-validator on Karaf 4.2.9. It causes an error java.lang.ArrayIndexOutOfBoundsException: Index 19 out of bounds for length 19 at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:576) at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:494) at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:483) at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:473) at aQute.bnd.osgi.Analyzer.analyzeJar(Analyzer.java:2177) at aQute.bnd.osgi.Analyzer.analyzeBundleClasspath(Analyzer.java:2083) at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:138) at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:616) at org.ops4j.pax.swissbox.bnd.BndUtils.createBundle(BndUtils.java:161) at org.ops4j.pax.url.wrap.internal.Connection.getInputStream(Connection.java:83) at java.base/java.net.URL.openStream(URL.java:1140) at org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:78) at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) java.lang.ArrayIndexOutOfBoundsException: Index 19 out of bounds for length 19 at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:576) at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:494) at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:483) at aQute.bnd.osgi.Clazz.parseClassFile(Clazz.java:473) at aQute.bnd.osgi.Analyzer.analyzeJar(Analyzer.java:2177) at aQute.bnd.osgi.Analyzer.analyzeBundleClasspath(Analyzer.java:2083) at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:138) at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:616) at org.ops4j.pax.swissbox.bnd.BndUtils.createBundle(BndUtils.java:161) at org.ops4j.pax.url.wrap.internal.Connection.getInputStream(Connection.java:83) at java.base/java.net.URL.openStream(URL.java:1140) at org.apache.karaf.features.internal.download.impl.SimpleDownloadTask.download(SimpleDownloadTask.java:78) at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Should I raise a ticket? Best Gerald
Re: json-validator full error message
Tx Claus, will do so. > Claus Ibsen hat am 28.09.2020 21:14 geschrieben: > > > You can do an onException(JsonValidationException) and then output > some more details from that exception. > > But yeah out of the box, then it should likely report some more > details, you can create a JIRA. > And are welcome to work on a PR > > On Mon, Sep 28, 2020 at 9:12 PM Gerald Kallas wrote: > > > > Hi, > > > > I'm using Camel 3.4.4. > > > > The full blown error stack is > > > > org.apache.camel.component.jsonvalidator.JsonValidationException: JSON > > validation error with 1 errors. Exchange[ID-700bc59e90f0-1601310667823-13-2] > > at > > org.apache.camel.component.jsonvalidator.DefaultJsonValidationErrorHandler.handleErrors(DefaultJsonValidationErrorHandler.java:30) > > at > > org.apache.camel.component.jsonvalidator.JsonValidatorEndpoint.onExchange(JsonValidatorEndpoint.java:120) > > at > > org.apache.camel.support.ProcessorEndpoint$1.process(ProcessorEndpoint.java:63) > > at > > org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:67) > > at > > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:168) > > at > > org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395) > > at > > org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) > > at > > org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60) > > at org.apache.camel.processor.Pipeline.process(Pipeline.java:147) > > at > > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286) > > at > > org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83) > > at > > org.apache.camel.support.AsyncProcessorSupport.process(AsyncProcessorSupport.java:40) > > at > > org.apache.camel.http.common.CamelServlet.doService(CamelServlet.java:214) > > at > > org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:80) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > > at > > io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) > > at > > io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) > > at > > io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:64) > > at > > io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) > > at > > org.ops4j.pax.web.service.undertow.internal.Context$1.lambda$wrap$0(Context.java:614) > > at > > io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) > > at > > io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) > > at > > io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33) > > at > > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > > at > > io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53) > > at > > io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) > > at > > io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) > > at > > io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59) > > at > > io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) > > at > > io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) > > at > > io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) > > at > > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
Re: json-validator full error message
) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Best Gerald > Claus Ibsen hat am 28.09.2020 20:58 geschrieben: > > > Hi > > What version of Camel do you use? > > The exception has some details, but I guess the default toString does > not output any of that > https://github.com/apache/camel/blob/master/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidationException.java > > > On Mon, Sep 28, 2020 at 8:33 PM Gerald Kallas wrote: > > > > Dear all, > > > > I've tried the json-validator. When an error occurs it is shown only > > > > "JSON validation error with 1 errors. > > Exchange[ID-700bc59e90f0-1601310667823-12-4]" > > > > I there an option to get a more qualified error message (e.g. what's wrong > > in the JSON document)? > > > > Best > > Gerald > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2
json-validator full error message
Dear all, I've tried the json-validator. When an error occurs it is shown only "JSON validation error with 1 errors. Exchange[ID-700bc59e90f0-1601310667823-12-4]" I there an option to get a more qualified error message (e.g. what's wrong in the JSON document)? Best Gerald
Re: SAP RFC calls with Apache Camel
Cool, thanks. I'll try this out. > Alisson Gomes hat am 15.09.2020 22:07 geschrieben: > > > I wrote a rustic Camel Component that can read RFC (Jco 3) > > http://jkniv.sourceforge.net/jkniv-camel-sap-jco3/index.html > > Restrictions: > - Supports Apache Camel 2.X and Spring DSL. > - There is not bundle for OSGI. > - This is a independent implementation > > ps: maybe can works for you. > > > On Tue, Sep 15, 2020 at 4:22 PM Gerald Kallas wrote: > > > Hi all, > > > > I know that there's a camel-sap component from RedHat Fuse. Is there a > > similar way to interact with SAP over RFC with Apache Camel? > > > > Thanks in advance > > - Gerald > >
SAP RFC calls with Apache Camel
Hi all, I know that there's a camel-sap component from RedHat Fuse. Is there a similar way to interact with SAP over RFC with Apache Camel? Thanks in advance - Gerald
Re: HTTPS with Karaf 4.2.9 and underpinning undertow web server
Thanks Grzegorz. Yes, I did found the same in between and changed the undertow.xml. Finally it works and undertow pax web seems a bit more flexible than jetty. Would it be a further part of Pax Web 8 and Karaf as well? Best - Gerald > Grzegorz Grzybek hat am 03.09.2020 08:29 geschrieben: > > > Hello > > Sorry for late response (holidays!), but I tried your example with tiny > (not relevant) details. > > I used Karaf 4.2.9, but Camel 2.23.2. So I used > "org.apache.camel.component.servlet.osgi.OsgiServletRegisterer" instead of > "org.apache.camel.component.osgi.OsgiServletRegisterer", but no more > changes to blueprint.xml or etc/org.ops4j.pax.web.cfg. > > However, I had ONE problem with TLS connection: > > $ curl -k -v https://localhost:8443/camel/services/hello1 > * Trying ::1:8443... > * Connected to localhost (::1) port 8443 (#0) > * ALPN, offering h2 > * ALPN, offering http/1.1 > * successfully set certificate verify locations: > * CAfile: /etc/pki/tls/certs/ca-bundle.crt > CApath: none > * TLSv1.3 (OUT), TLS handshake, Client hello (1): > * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:8443 > * Closing connection 0 > curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to > localhost:8443 > > I think (and I'll review it at some point in Pax Web itself) it's the > mismatch between "enabled-protocols" and "enabled-cipher-suites" in > undertow.xml. Please remove: > > enabled-cipher-suites="TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 > TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" > > and it should work (note that change to undertow.xml WON'T automatically > restart relevant bundles). > > $ curl -k -v https://localhost:8443/camel/services/hello1 > * Trying ::1:8443... > * Connected to localhost (::1) port 8443 (#0) > * ALPN, offering h2 > * ALPN, offering http/1.1 > * successfully set certificate verify locations: > * CAfile: /etc/pki/tls/certs/ca-bundle.crt > CApath: none > * TLSv1.3 (OUT), TLS handshake, Client hello (1): > * TLSv1.3 (IN), TLS handshake, Server hello (2): > * TLSv1.2 (IN), TLS handshake, Certificate (11): > * TLSv1.2 (IN), TLS handshake, Server key exchange (12): > * TLSv1.2 (IN), TLS handshake, Server finished (14): > * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): > * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): > * TLSv1.2 (OUT), TLS handshake, Finished (20): > * TLSv1.2 (IN), TLS handshake, Finished (20): > * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384 > * ALPN, server did not agree to a protocol > * Server certificate: > * subject: C=PL; ST=Dolny Śląsk; L=Wrocław; O=Red Hat; CN=localhost; > emailAddress=ggrzy...@redhat.com > * start date: Aug 17 11:14:46 2017 GMT > * expire date: Aug 17 11:14:46 2027 GMT > * issuer: C=PL; ST=Dolny Śląsk; L=Wrocław; O=Red Hat; CN=everfree-ca; > emailAddress=ggrzy...@redhat.com > * SSL certificate verify result: unable to get local issuer certificate > (20), continuing anyway. > > GET /camel/services/hello1 HTTP/1.1 > > Host: localhost:8443 > > User-Agent: curl/7.69.1 > > Accept: */* > > > * Mark bundle as not supporting multiuse > < HTTP/1.1 200 OK > < Accept: */* > < Connection: keep-alive > < X-Powered-By: Pax-HTTP-Undertow/7.2.16 > < breadcrumbId: ID-everfree-forest-1599112295273-1-1 > < Server: Pax-HTTP-Undertow > < Transfer-Encoding: chunked > < User-Agent: curl/7.69.1 > < Date: Thu, 03 Sep 2020 05:59:31 GMT > < > * Connection #0 to host localhost left intact > Hello 1 > > kind regards > Grzegorz Grzybek > > pt., 7 sie 2020 o 11:53 Gerald Kallas napisał(a): > > > Hi, > > > > I tried this out but it doesnt work properly. (keystore and truststore are > > the same as with jetty setuo, they're valid). > > > > See below my configuration and the log. The HTTPS listener starts but > > neither the webconsole nor the servlet does work. > > > > On client side I'm getting > > > > Error: Client network socket disconnected before secure TLS connection was > > established > > > > > > undertow.xml > > > > > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > > xmlns:w="urn:jboss:domain:5.0" > > xmlns:io="urn:jboss:domain:io:3.0" > > xsi:schemaLocation=" > > urn:jboss:domain:io:3.0 > > http://www.jboss.org/schema/jbossas/wildfly-io_3_0.xsd > > urn:jboss:domain:undertow:4.0 >
claimCheck availability within ServiceMix 7.0.1 (Apache Camel 2.16.5)
Dear all, for a legacy project we're working with Apache Servicemix 7.0.1. This contains Camel 2.16.5. While trying to use the claimCheck pattern I'm getting org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 106 in XML document from URL [bundle://425.8:0/META-INF/spring/eib.routes.mappings.RDHRDH011.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'claimCheck'. Is claimCheck not supported with Camel 2.16.5? The route starts with http://www.springframework.org/schema/beans; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:camel="http://camel.apache.org/schema/spring; xmlns:prop="http://camel.apache.org/schema/placeholder; xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd;> http://camel.apache.org/schema/spring; streamCache="true"> Best Gerald
Re: Camel 3.4.3 REST DSL - valid JSON response?
Perfect, thanks Alex, it works! > Alex Soto hat am 20.08.2020 18:32 geschrieben: > > > Your binding mode is JSON. > > > bindingMode=“json" > > You are supposed to return an object, but you are returning a JSON string. > Add bindingMode=“off” to this rest service. > > Best regards, > Alex soto > > > > > > On Aug 20, 2020, at 12:20 PM, Gerald Kallas wrote: > > > > bindingMode="json"
Camel 3.4.3 REST DSL - valid JSON response?
Dear all, I've following Blueprint REST DSL configuration http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> http://camel.apache.org/schema/blueprint; streamCache="true" useBreadcrumb="true"> {"status": 200} When calling curl --location --request POST 'https://localhost:8443/apiisp001/base/1' \ --header 'Content-Type: application/json' \ --data-raw '{}' I'm getting back the response "{\"status\": 200}" Content-Type is already set to "application/json" Any idea how I can get rid of the enclosing "" and provide a valid JSON response? Best Gerald
Re: Rép. : Camel REST DSL with servlet - API URL?
A servlet runs with a context (path). As we'll define and deploy the Blueprint files/bundles independently they should nevertheless share the same servlet context to avoid the unique context path for every HTTP consumer. Best Gerald > Alex Soto hat am 19.08.2020 19:19 geschrieben: > > > I am not sure you can do that but can try. > Also, I don’t understand why you would want to share a servlet across bundles. > > Best regards, > Alex soto > > > > > > On Aug 19, 2020, at 12:02 PM, Gerald Kallas wrote: > > > > Thanks Alex. > > > > That seems to be a problem as I'll have every Blueprint file is being > > deployed separately and resides so far in a dedicated bundle. > > > > I wonder if I could access the servlet in the registry anyway from a > > dedicated bundle/Blueprint file as it is registered with > > > > org.apache.camel.component.osgi.OsgiServletRegisterer > > > > Best > > Gerald > > > >> Alex Soto hat am 19.08.2020 15:33 geschrieben: > >> > >> > >> Hi Gerald, > >> > >> All Blueprint files in the same bundle share the same namespace/context, > >> so yes, a bean defined in one file is visible in another, as long as it is > >> the same bundle. I usually have one file “beans.xml” where all beans are > >> declared, and a separate file “camel-context.xml” defining the camel > >> context. Furthermore, you can move routes to separate files by using > >> “routeContextRef”, for example: > >> > >> > >> http://camel.apache.org/schema/blueprint; > >> id=“my-context"> > >>http://www.osgi.org/xmlns/blueprint/v1.0.0; > >>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > >>xsi:schemaLocation=" > >> http://www.osgi.org/xmlns/blueprint/v1.0.0 > >> https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> > >> > >> >> xmlns="http://camel.apache.org/schema/blueprint”> > >> > >> > >>. . . > >> > >> > >> > >> Again, all files need to be in the same bundle. > >> > >> Best regards, > >> Alex soto > >> > >> > >> > >> > >>> On Aug 19, 2020, at 7:59 AM, Gerald Kallas wrote: > >>> > >>> Thanks Daniel. > >>> > >>> Not sure if I did explain right. > >>> > >>> I want to define > >>> > >>>>>> interface="org.osgi.service.http.HttpService" /> > >>> > >>>>>> class="org.apache.camel.component.servlet.CamelHttpTransportServlet"/> > >>> > >>>>>>init-method="register" > >>>destroy-method="unregister"> > >>> > >>> > >>> > >>> > >>> > >>> > >>> in one common Blueprint file and refer in an other blueprint file to the > >>> registered servlet above like > >>> > >>> > >>> > >>> Is there a way in the second Blueprint to get a reference to the servlet > >>> defined in the first one? > >>> > >>> Best > >>> Gerald > >>> > >>>> Daniel Langevin hat am 19.08.2020 13:48 > >>>> geschrieben: > >>>> > >>>> > >>>> Hi Gerald, > >>>> > >>>> the only way i know to do that is to refer this way. > >>>> > >>>> uri="direct-vm:xx?block=truetimeout=30" > >>>> > >>>> > >>>> > >>>> > >>>> hope this help! > >>>> > >>>> > >>>> > >>>> Daniel > >>>>>>> > >>>> De : Gerald Kallas > >>>> À : , Daniel Langevin > >>>> > >>>> Date : 2020-08-19 00:15 > >>>> Objet : Re: Rép. : Camel REST DSL with servlet - API URL? > >>>> The idea is to define a servlet once and to re-use it with it's context > >>>> in multiple routes in different Blueprint files. > >>>> > >>>> Best > >>>> Gerald >
Re: Rép. : Camel REST DSL with servlet - API URL?
Thanks Alex. That seems to be a problem as I'll have every Blueprint file is being deployed separately and resides so far in a dedicated bundle. I wonder if I could access the servlet in the registry anyway from a dedicated bundle/Blueprint file as it is registered with org.apache.camel.component.osgi.OsgiServletRegisterer Best Gerald > Alex Soto hat am 19.08.2020 15:33 geschrieben: > > > Hi Gerald, > > All Blueprint files in the same bundle share the same namespace/context, so > yes, a bean defined in one file is visible in another, as long as it is the > same bundle. I usually have one file “beans.xml” where all beans are > declared, and a separate file “camel-context.xml” defining the camel context. > Furthermore, you can move routes to separate files by using > “routeContextRef”, for example: > > > http://camel.apache.org/schema/blueprint; > id=“my-context"> > http://www.osgi.org/xmlns/blueprint/v1.0.0; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > xsi:schemaLocation=" >http://www.osgi.org/xmlns/blueprint/v1.0.0 > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> > >xmlns="http://camel.apache.org/schema/blueprint”> > > > . . . > > > > Again, all files need to be in the same bundle. > > Best regards, > Alex soto > > > > > > On Aug 19, 2020, at 7:59 AM, Gerald Kallas wrote: > > > > Thanks Daniel. > > > > Not sure if I did explain right. > > > > I want to define > > > > > interface="org.osgi.service.http.HttpService" /> > > > > > class="org.apache.camel.component.servlet.CamelHttpTransportServlet"/> > > > > > init-method="register" > > destroy-method="unregister"> > > > > > > > > > > > > > > in one common Blueprint file and refer in an other blueprint file to the > > registered servlet above like > > > > > > > > Is there a way in the second Blueprint to get a reference to the servlet > > defined in the first one? > > > > Best > > Gerald > > > >> Daniel Langevin hat am 19.08.2020 13:48 > >> geschrieben: > >> > >> > >> Hi Gerald, > >> > >> the only way i know to do that is to refer this way. > >> > >> uri="direct-vm:xx?block=truetimeout=30" > >> > >> > >> > >> > >> hope this help! > >> > >> > >> > >> Daniel > >>>>> > >> De : Gerald Kallas > >> À :, Daniel Langevin > >> > >> Date : 2020-08-19 00:15 > >> Objet :Re: Rép. : Camel REST DSL with servlet - API URL? > >> The idea is to define a servlet once and to re-use it with it's context in > >> multiple routes in different Blueprint files. > >> > >> Best > >> Gerald > >> > >>> Gerald Kallas hat am 18.08.2020 22:35 geschrieben: > >>> > >>> > >>> Thanks a lot, Daniel. It works. > >>> > >>> Is it possible to refer to a servlet that has been defined in another > >>> Blueprint file? > >>> > >>> Best > >>> Gerald > >>> > >>>> Daniel Langevin hat am 18.08.2020 14:29 > >>>> geschrieben: > >>>> > >>>> > >>>> Try this it's work for me. > >>>> > >>>> > >>>> > >>>> >>>> bindingMode="json" scheme="https" port="8443" > >>>> apiContextPath="/api-doc" apiContextListing="false" enableCORS="true"> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> apiisp001 - Echo rest service > >>>> > >>>> APIISP001 - Connectivity test > >&g
Re: Rép. : Camel REST DSL with servlet - API URL?
Thanks Daniel. Not sure if I did explain right. I want to define in one common Blueprint file and refer in an other blueprint file to the registered servlet above like Is there a way in the second Blueprint to get a reference to the servlet defined in the first one? Best Gerald > Daniel Langevin hat am 19.08.2020 13:48 > geschrieben: > > > Hi Gerald, > > the only way i know to do that is to refer this way. > > uri="direct-vm:xx?block=truetimeout=30" > > > > > hope this help! > > > > Daniel > >>> > De : Gerald Kallas > À : , Daniel Langevin > > Date :2020-08-19 00:15 > Objet : Re: Rép. : Camel REST DSL with servlet - API URL? > The idea is to define a servlet once and to re-use it with it's context in > multiple routes in different Blueprint files. > > Best > Gerald > > > Gerald Kallas hat am 18.08.2020 22:35 geschrieben: > > > > > > Thanks a lot, Daniel. It works. > > > > Is it possible to refer to a servlet that has been defined in another > > Blueprint file? > > > > Best > > Gerald > > > > > Daniel Langevin hat am 18.08.2020 14:29 > > > geschrieben: > > > > > > > > > Try this it's work for me. > > > > > > > > > > > > > > bindingMode="json" scheme="https" port="8443" > > > apiContextPath="/api-doc" apiContextListing="false" enableCORS="true"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > apiisp001 - Echo rest service > > > > > > APIISP001 - Connectivity test > > > > > > > > > /APIISP001/echo PONG. > > > > > > > > > > > > > > > > > > Daniel Langevin > > > Direction de l’assistance et des technologies > > > Direction des ressources informationnelles > > > > > > Société d’habitation du Québec > > > Édifice Marie-Guyart > > > 1054, rue Louis-Alexandre-Taschereau > > > Aile Jacques-Parizeau, 1er étage > > > Québec (Québec) G1R 5E7 > > > Téléphone : 418 643-4035, poste 1191 > > > Sans frais : 1 800 463-4315 > > > > > > > > > > > > > > > > > > > > > >>> > > > De : Gerald Kallas > > > À : , Daniel Langevin > > > > > > Date : 2020-08-18 03:33 > > > Objet : Re: Rép. : Camel REST DSL with servlet - API URL? > > > > > > Thanks for the hint. But it doesn't work either. I modified my Blueprint > > > as following > > > > > > http://www.osgi.org/xmlns/blueprint/v1.0.0; > > > xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > > > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 > > > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> > > > > > > > > > xmlns="http://camel.apache.org/schema/blueprint; streamCache="true" > > > useBreadcrumb="true"> > > > > > > > > > > > > > > > > > > > > bindingMode="json" scheme="https" port="8443"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The (untertow) web server runs with HTTPS on port 8443, other servlets > > > are working. I tried > > > > > > https://localhost:8443/apiisp001/base/1 > > > > > > > where I'd expect the response but did get a HTTP 404 error. > > > > > > Any hints are appreciated. > > > > > > See also the log for deployment > > > > > > 2020-08-18T07:31:28,421 | INFO | > > > fileinstall-/opt/apache-karaf-4.2.9/deploy | BlueprintContainerImpl | 105 > > > - org.apache.aries.blueprint.core
Re: Rép. : Camel REST DSL with servlet - API URL?
The idea is to define a servlet once and to re-use it with it's context in multiple routes in different Blueprint files. Best Gerald > Gerald Kallas hat am 18.08.2020 22:35 geschrieben: > > > Thanks a lot, Daniel. It works. > > Is it possible to refer to a servlet that has been defined in another > Blueprint file? > > Best > Gerald > > > Daniel Langevin hat am 18.08.2020 14:29 > > geschrieben: > > > > > > Try this it's work for me. > > > > > > > > >bindingMode="json" scheme="https" port="8443" > >apiContextPath="/api-doc" apiContextListing="false" > > enableCORS="true"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > apiisp001 - Echo rest service > > > > APIISP001 - Connectivity test > > > > > >/APIISP001/echo PONG. > > > > > > > > > > > > Daniel Langevin > > Direction de l’assistance et des technologies > > Direction des ressources informationnelles > > > > Société d’habitation du Québec > > Édifice Marie-Guyart > > 1054, rue Louis-Alexandre-Taschereau > > Aile Jacques-Parizeau, 1er étage > > Québec (Québec) G1R 5E7 > > Téléphone : 418 643-4035, poste 1191 > > Sans frais : 1 800 463-4315 > > > > > > > > > > > > > > >>> > > De :Gerald Kallas > > À : , Daniel Langevin > > > > Date : 2020-08-18 03:33 > > Objet : Re: Rép. : Camel REST DSL with servlet - API URL? > > > > Thanks for the hint. But it doesn't work either. I modified my Blueprint as > > following > > > > http://www.osgi.org/xmlns/blueprint/v1.0.0; > > > > xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > > > > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 > > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> > > > > > xmlns="http://camel.apache.org/schema/blueprint; streamCache="true" > > useBreadcrumb="true"> > > > > > > > > > > > > > > > > > bindingMode="json" scheme="https" port="8443"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The (untertow) web server runs with HTTPS on port 8443, other servlets are > > working. I tried > > > > https://localhost:8443/apiisp001/base/1 > > > > where I'd expect the response but did get a HTTP 404 error. > > > > Any hints are appreciated. > > > > See also the log for deployment > > > > 2020-08-18T07:31:28,421 | INFO | > > fileinstall-/opt/apache-karaf-4.2.9/deploy | BlueprintContainerImpl > > | 105 - org.apache.aries.blueprint.core - 1.10.2 | Blueprint bundle > > isp.api.APIISP001.xml/0.0.0 has been started > > 2020-08-18T07:31:28,432 | INFO | Blueprint Event Dispatcher: 1 | > > BlueprintCamelContext| 169 - > > org.apache.camel.karaf.camel-blueprint - 3.4.2 | Attempting to start > > CamelContext: isp.api.APIISP001 > > 2020-08-18T07:31:28,437 | INFO | Blueprint Event Dispatcher: 1 | > > JmxManagementStrategy| 144 - org.apache.camel.camel-management > > - 3.4.2 | JMX is enabled > > 2020-08-18T07:31:28,484 | INFO | Blueprint Event Dispatcher: 1 | > > AbstractCamelContext | 115 - org.apache.camel.camel-base - > > 3.4.2 | Apache Camel 3.4.2 (isp.api.APIISP001) is starting > > 2020-08-18T07:31:28,484 | INFO | Blueprint Event Dispatcher: 1 | > > AbstractCamelContext | 115 - org.apache.camel.camel-base - > > 3.4.2 | St
Re: Rép. : Camel REST DSL with servlet - API URL?
Thanks a lot, Daniel. It works. Is it possible to refer to a servlet that has been defined in another Blueprint file? Best Gerald > Daniel Langevin hat am 18.08.2020 14:29 > geschrieben: > > > Try this it's work for me. > > > > bindingMode="json" scheme="https" port="8443" >apiContextPath="/api-doc" apiContextListing="false" > enableCORS="true"> > > > > > > > > > > > > > > > > > > > > apiisp001 - Echo rest service > > APIISP001 - Connectivity test > > >/APIISP001/echo PONG. > > > > > > Daniel Langevin > Direction de l’assistance et des technologies > Direction des ressources informationnelles > > Société d’habitation du Québec > Édifice Marie-Guyart > 1054, rue Louis-Alexandre-Taschereau > Aile Jacques-Parizeau, 1er étage > Québec (Québec) G1R 5E7 > Téléphone : 418 643-4035, poste 1191 > Sans frais : 1 800 463-4315 > > > > > > > >>> > De : Gerald Kallas > À : , Daniel Langevin > > Date :2020-08-18 03:33 > Objet : Re: Rép. : Camel REST DSL with servlet - API URL? > > Thanks for the hint. But it doesn't work either. I modified my Blueprint as > following > > http://www.osgi.org/xmlns/blueprint/v1.0.0; > > xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> > >xmlns="http://camel.apache.org/schema/blueprint; streamCache="true" > useBreadcrumb="true"> > > > > > > > >bindingMode="json" scheme="https" port="8443"> > > > > > > > > > > > > > > > > > > > > > > The (untertow) web server runs with HTTPS on port 8443, other servlets are > working. I tried > > https://localhost:8443/apiisp001/base/1 > > where I'd expect the response but did get a HTTP 404 error. > > Any hints are appreciated. > > See also the log for deployment > > 2020-08-18T07:31:28,421 | INFO | fileinstall-/opt/apache-karaf-4.2.9/deploy > | BlueprintContainerImpl | 105 - org.apache.aries.blueprint.core - > 1.10.2 | Blueprint bundle isp.api.APIISP001.xml/0.0.0 has been started > 2020-08-18T07:31:28,432 | INFO | Blueprint Event Dispatcher: 1 | > BlueprintCamelContext| 169 - > org.apache.camel.karaf.camel-blueprint - 3.4.2 | Attempting to start > CamelContext: isp.api.APIISP001 > 2020-08-18T07:31:28,437 | INFO | Blueprint Event Dispatcher: 1 | > JmxManagementStrategy| 144 - org.apache.camel.camel-management - > 3.4.2 | JMX is enabled > 2020-08-18T07:31:28,484 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 > | Apache Camel 3.4.2 (isp.api.APIISP001) is starting > 2020-08-18T07:31:28,484 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 > | StreamCaching is enabled on CamelContext: isp.api.APIISP001 > 2020-08-18T07:31:28,546 | INFO | Blueprint Event Dispatcher: 1 | > AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 > | Using HealthCheck: camel-health > 2020-08-18T07:31:28,592 | INFO | Blueprint Event Dispatcher: 1 | > DefaultStreamCachingStrategy | 115 - org.apache.camel.camel-base - 3.4.2 > | StreamCaching in use with spool directory: > /opt/apache-karaf/data/tmp/camel/camel-tmp-ID-43c92ad4274c-1597499175862-121-1 > and rules: [Spool > 128K body size] > 2020-08-18T07:31:28,593 | INFO | Blueprint Event Dispatcher: 1 | > JacksonDataFormat| 137 - org.apache.camel.camel-jackson - > 3.4.2 | The option autoDiscoverObjectMapper is set to false, Camel won't > search in the registry > 2020-08-18T07:31:28,594 | INFO |
Re: Rép. : Camel REST DSL with servlet - API URL?
This did the trick. Many thanks, Alex :) Sent by my mobile device - Gerald Kallas > Am 18.08.2020 um 18:48 schrieb Alex Soto : > > I think you are missing: > > >http://www.osgi.org/xmlns/blueprint/v1.0.0; >> >> xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; >> xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 >> https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> >> >>> xmlns="http://camel.apache.org/schema/blueprint; streamCache="true" >> useBreadcrumb="true"> >> >> >> >> >> >> >> >>> bindingMode="json" scheme="https" port="8443"> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> The (untertow) web server runs with HTTPS on port 8443, other servlets are >> working. I tried >> >> https://localhost:8443/apiisp001/base/1 >> >> where I'd expect the response but did get a HTTP 404 error. >> >> Any hints are appreciated. >> >> See also the log for deployment >> >> 2020-08-18T07:31:28,421 | INFO | fileinstall-/opt/apache-karaf-4.2.9/deploy >> | BlueprintContainerImpl | 105 - org.apache.aries.blueprint.core - >> 1.10.2 | Blueprint bundle isp.api.APIISP001.xml/0.0.0 has been started >> 2020-08-18T07:31:28,432 | INFO | Blueprint Event Dispatcher: 1 | >> BlueprintCamelContext| 169 - >> org.apache.camel.karaf.camel-blueprint - 3.4.2 | Attempting to start >> CamelContext: isp.api.APIISP001 >> 2020-08-18T07:31:28,437 | INFO | Blueprint Event Dispatcher: 1 | >> JmxManagementStrategy| 144 - org.apache.camel.camel-management - >> 3.4.2 | JMX is enabled >> 2020-08-18T07:31:28,484 | INFO | Blueprint Event Dispatcher: 1 | >> AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 >> | Apache Camel 3.4.2 (isp.api.APIISP001) is starting >> 2020-08-18T07:31:28,484 | INFO | Blueprint Event Dispatcher: 1 | >> AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 >> | StreamCaching is enabled on CamelContext: isp.api.APIISP001 >> 2020-08-18T07:31:28,546 | INFO | Blueprint Event Dispatcher: 1 | >> AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 >> | Using HealthCheck: camel-health >> 2020-08-18T07:31:28,592 | INFO | Blueprint Event Dispatcher: 1 | >> DefaultStreamCachingStrategy | 115 - org.apache.camel.camel-base - 3.4.2 >> | StreamCaching in use with spool directory: >> /opt/apache-karaf/data/tmp/camel/camel-tmp-ID-43c92ad4274c-1597499175862-121-1 >> and rules: [Spool > 128K body size] >> 2020-08-18T07:31:28,593 | INFO | Blueprint Event Dispatcher: 1 | >> JacksonDataFormat| 137 - org.apache.camel.camel-jackson - >> 3.4.2 | The option autoDiscoverObjectMapper is set to false, Camel won't >> search in the registry >> 2020-08-18T07:31:28,594 | INFO | Blueprint Event Dispatcher: 1 | >> JacksonDataFormat| 137 - org.apache.camel.camel-jackson - >> 3.4.2 | The option autoDiscoverObjectMapper is set to false, Camel won't >> search in the registry >> 2020-08-18T07:31:28,625 | INFO | Blueprint Event Dispatcher: 1 | >> InternalRouteStartupManager | 115 - org.apache.camel.camel-base - 3.4.2 >> | Route: isp.api.APIISP001.get.1 started and consuming from: >> servlet:/apiisp001/1 >> 2020-08-18T07:31:28,626 | INFO | Blueprint Event Dispatcher: 1 | >> AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 >> | Total 1 routes, of which 1 are started >> 2020-08-18T07:31:28,626 | INFO | Blueprint Event Dispatcher: 1 | >> AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 >> | Apache Camel 3.4.2 (isp.api.APIISP001) started in 0.142 seconds >> 2020-08-18T07:31:28,643 | INFO | fileinstall-/opt/apache-karaf-4.2.9/deploy >> | fileinstall | 10 - org.apache.felix.fileinstall - >> 3.6.6 | Started bundle: >> blueprint:file:/opt/apache-karaf-4.2.9/deploy/isp.api.APIISP001.xml >> >> Best >> Gerald >> >>>
Re: Rép. : Camel REST DSL with servlet - API URL?
Thanks for the hint. But it doesn't work either. I modified my Blueprint as following http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> http://camel.apache.org/schema/blueprint; streamCache="true" useBreadcrumb="true"> The (untertow) web server runs with HTTPS on port 8443, other servlets are working. I tried https://localhost:8443/apiisp001/base/1 where I'd expect the response but did get a HTTP 404 error. Any hints are appreciated. See also the log for deployment 2020-08-18T07:31:28,421 | INFO | fileinstall-/opt/apache-karaf-4.2.9/deploy | BlueprintContainerImpl | 105 - org.apache.aries.blueprint.core - 1.10.2 | Blueprint bundle isp.api.APIISP001.xml/0.0.0 has been started 2020-08-18T07:31:28,432 | INFO | Blueprint Event Dispatcher: 1 | BlueprintCamelContext| 169 - org.apache.camel.karaf.camel-blueprint - 3.4.2 | Attempting to start CamelContext: isp.api.APIISP001 2020-08-18T07:31:28,437 | INFO | Blueprint Event Dispatcher: 1 | JmxManagementStrategy| 144 - org.apache.camel.camel-management - 3.4.2 | JMX is enabled 2020-08-18T07:31:28,484 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 | Apache Camel 3.4.2 (isp.api.APIISP001) is starting 2020-08-18T07:31:28,484 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 | StreamCaching is enabled on CamelContext: isp.api.APIISP001 2020-08-18T07:31:28,546 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 | Using HealthCheck: camel-health 2020-08-18T07:31:28,592 | INFO | Blueprint Event Dispatcher: 1 | DefaultStreamCachingStrategy | 115 - org.apache.camel.camel-base - 3.4.2 | StreamCaching in use with spool directory: /opt/apache-karaf/data/tmp/camel/camel-tmp-ID-43c92ad4274c-1597499175862-121-1 and rules: [Spool > 128K body size] 2020-08-18T07:31:28,593 | INFO | Blueprint Event Dispatcher: 1 | JacksonDataFormat| 137 - org.apache.camel.camel-jackson - 3.4.2 | The option autoDiscoverObjectMapper is set to false, Camel won't search in the registry 2020-08-18T07:31:28,594 | INFO | Blueprint Event Dispatcher: 1 | JacksonDataFormat| 137 - org.apache.camel.camel-jackson - 3.4.2 | The option autoDiscoverObjectMapper is set to false, Camel won't search in the registry 2020-08-18T07:31:28,625 | INFO | Blueprint Event Dispatcher: 1 | InternalRouteStartupManager | 115 - org.apache.camel.camel-base - 3.4.2 | Route: isp.api.APIISP001.get.1 started and consuming from: servlet:/apiisp001/1 2020-08-18T07:31:28,626 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 | Total 1 routes, of which 1 are started 2020-08-18T07:31:28,626 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 115 - org.apache.camel.camel-base - 3.4.2 | Apache Camel 3.4.2 (isp.api.APIISP001) started in 0.142 seconds 2020-08-18T07:31:28,643 | INFO | fileinstall-/opt/apache-karaf-4.2.9/deploy | fileinstall | 10 - org.apache.felix.fileinstall - 3.6.6 | Started bundle: blueprint:file:/opt/apache-karaf-4.2.9/deploy/isp.api.APIISP001.xml Best Gerald > Daniel Langevin hat am 17.08.2020 17:44 > geschrieben: > > > Hi, > > you have to specify the default http port number : 8181 for CamelServlet > > like this: > > http://servername.org:8181/apiisp001/1 > > > > > Daniel Langevin > Direction de l’assistance et des technologies > Direction des ressources informationnelles > > Société d’habitation du Québec > Édifice Marie-Guyart > 1054, rue Louis-Alexandre-Taschereau > Aile Jacques-Parizeau, 1er étage > Québec (Québec) G1R 5E7 > Téléphone : 418 643-4035, poste 1191 > Sans frais : 1 800 463-4315 > > > > > > >>> > De : Gerald Kallas > À : "users@camel.apache.org" > Date :2020-08-17 11:22 > Objet : Camel REST DSL wi
Camel REST DSL with servlet - API URL?
Dear all, I'm going to configure a REST API similar to a (working) HTTP consumer. I tried several URLs to call the API operation but get always a HTTP 404. Do I miss someting (e.g. the reference to the servletName)? Can someone point me out which is the API URL for the get operation in my case? Thanks in advance Gerald My Blueprint DSL see below .. http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> http://camel.apache.org/schema/blueprint; streamCache="true" useBreadcrumb="true"> One example for a working HTTP consumer find below http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> http://camel.apache.org/schema/blueprint;> execution of /web2sfo/get Here I could later on add a security definition that works well.
Re: Read the content of an exchange property with dynamically set name
The try was ${exchange.Property.${exchangeProperty.fileCreateFlag}} Doesn't work either. > Gerald Kallas hat am 16.08.2020 11:40 geschrieben: > > > Dear all, > > I've set an exchange property like > > suppressExceptions="true">$.*.etc.fileCreateFlag > > This contains finally the name of an other JSON property in the message body. > > I want to read the content of this exchange property with dynamically set > name like > > name="fileCreateFlagContent">${${exchangeProperty.fileCreateFlag}} > > This doubled reference doesn't work. Is there a way to achieve this? Any > ideas are welcome. > > Best > Gerald
Read the content of an exchange property with dynamically set name
Dear all, I've set an exchange property like $.*.etc.fileCreateFlag This contains finally the name of an other JSON property in the message body. I want to read the content of this exchange property with dynamically set name like ${${exchangeProperty.fileCreateFlag}} This doubled reference doesn't work. Is there a way to achieve this? Any ideas are welcome. Best Gerald
Re: HTTPS with Karaf 4.2.9 and underpinning undertow web server
| 61 - org.ops4j.pax.web.pax-web-runtime - 7.2.16 | Registering security mappings in WebContainer for bundle "hello1.xml": SecurityConstraintsMapping{name='constraint.1', url='/camel/services/*', roles=[admin]} 2020-08-07T11:47:31,550 | INFO | paxweb-context-2-thread-1 | Context | 63 - org.ops4j.pax.web.pax-web-undertow - 7.2.16 | registering context DefaultHttpContext [bundle=hello1.xml [134], contextID=default], with context path: / 2020-08-07T11:47:31,555 | INFO | paxweb-context-2-thread-1 | Context | 63 - org.ops4j.pax.web.pax-web-undertow - 7.2.16 | Starting context / 2020-08-07T11:47:31,610 | WARN | paxweb-context-2-thread-1 | PathMatcher | 63 - org.ops4j.pax.web.pax-web-undertow - 7.2.16 | Overwriting existing default context org.ops4j.pax.web.service.undertow.internal.Context@8c1553c with a new one org.ops4j.pax.web.service.undertow.internal.Context@681b959c 2020-08-07T11:47:31,616 | INFO | paxweb-context-2-thread-1 | Context | 63 - org.ops4j.pax.web.pax-web-undertow - 7.2.16 | Adding implicit "default" servlet 2020-08-07T11:47:31,624 | INFO | paxweb-context-2-thread-1 | ServletContainerInitializerScanner | 60 - org.ops4j.pax.web.pax-web-api - 7.2.16 | will add io.undertow.servlet.sse.ServerSentEventSCI to ServletContainerInitializers 2020-08-07T11:47:31,686 | INFO | paxweb-context-2-thread-1 | ServletContainerInitializerScanner | 60 - org.ops4j.pax.web.pax-web-api - 7.2.16 | added ServletContainerInitializer: io.undertow.servlet.sse.ServerSentEventSCI 2020-08-07T11:47:31,697 | INFO | paxweb-context-2-thread-1 | Context | 63 - org.ops4j.pax.web.pax-web-undertow - 7.2.16 | Creating undertow servlet deployment for context path /... 2020-08-07T11:47:31,716 | INFO | paxweb-context-2-thread-1 | Context | 63 - org.ops4j.pax.web.pax-web-undertow - 7.2.16 | Creating undertow servlet deployment for context path / - done 2020-08-07T11:47:31,717 | INFO | paxweb-context-2-thread-1 | Context | 63 - org.ops4j.pax.web.pax-web-undertow - 7.2.16 | Registering io.undertow.servlet.spec.ServletContextImpl@757d3a20 as OSGi service... 2020-08-07T11:47:31,728 | INFO | paxweb-context-2-thread-1 | Context | 63 - org.ops4j.pax.web.pax-web-undertow - 7.2.16 | Registering io.undertow.servlet.spec.ServletContextImpl@757d3a20 as OSGi service - done 2020-08-07T11:47:31,729 | INFO | paxweb-context-2-thread-1 | Context | 63 - org.ops4j.pax.web.pax-web-undertow - 7.2.16 | Starting Undertow web application for context path / 2020-08-07T11:47:32,115 | INFO | Blueprint Extender: 1 | BlueprintContainerImpl | 69 - org.apache.aries.blueprint.core - 1.10.2 | Blueprint bundle hello1.xml/0.0.0 has been started 2020-08-07T11:47:32,118 | INFO | Blueprint Event Dispatcher: 1 | BlueprintCamelContext| 119 - org.apache.camel.karaf.camel-blueprint - 3.4.2 | Attempting to start CamelContext: camel-1 2020-08-07T11:47:32,165 | INFO | Blueprint Event Dispatcher: 1 | JmxManagementStrategy| 98 - org.apache.camel.camel-management - 3.4.2 | JMX is enabled 2020-08-07T11:47:32,418 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 76 - org.apache.camel.camel-base - 3.4.2 | Apache Camel 3.4.2 (camel-1) is starting 2020-08-07T11:47:33,264 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 76 - org.apache.camel.camel-base - 3.4.2 | StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html 2020-08-07T11:47:33,265 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 76 - org.apache.camel.camel-base - 3.4.2 | Using HealthCheck: camel-health 2020-08-07T11:47:33,361 | INFO | Blueprint Event Dispatcher: 1 | InternalRouteStartupManager | 76 - org.apache.camel.camel-base - 3.4.2 | Route: route1 started and consuming from: servlet:/hello1 2020-08-07T11:47:33,369 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 76 - org.apache.camel.camel-base - 3.4.2 | Total 1 routes, of which 1 are started 2020-08-07T11:47:33,370 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 76 - org.apache.camel.camel-base - 3.4.2 | Apache Camel 3.4.2 (camel-1) started in 0.951 seconds > Grzegorz Grzybek hat am 07.08.2020 11:07 geschrieben: > > > Hello > > In theory (I can't check now), you have to: > > 1. comment out > 2. ensure that org.ops4j.pax.web PID has org.osgi.service.http.enabled = > false (so pax-web-undertow won't try to recreate the non-secure listener if > it's not available in etc/undertow.xml) > > regards > Grzegorz Grzybek > > > pt., 7 sie 2020 o 10:
Re: HTTPS with Karaf 4.2.9 and underpinning undertow web server
Thanks, Grzegorz for the explanation. At the moment I'd be happy to use HTTPS (on 8443) only for all web related services (web console, servlets) w/ undertow and disable HTTP (on 8181). Could this be reached with the setup I have? Thanks - Gerald > Grzegorz Grzybek hat am 07.08.2020 10:47 geschrieben: > > > Hello > > Unfortunately it is not possible to use the internal (managed by Pax Web) > servlet runtime selectively - by specifying which listener (or more generally > - virtual host) should be used for the servlets created and registered by > Camel into HttpService (Pax Web) runtime. > > pax-web-jetty has partial (legacy, non-standard from the point of view of > OSGi CMPN specification) support for virtual hosts where a > Whiteboard-registered servlet (or filter, or other "web element") may specify > a comma-separated list of virtual host/connector names. But that's only for > Jetty. > > I'm still working on refactoring Pax Web 8 and I plan to have unified > "experience" for dealing with separate connectors/virtual hosts across > Jetty/Tomcat/Undertow runtimes, but it'll come only in Pax Web 8. > > regards > Grzegorz Grzybek > > > pt., 7 sie 2020 o 10:34 Gerald Kallas napisał(a): > > Dear all, > > > > following the guidance in the ticket > > > > https://issues.apache.org/jira/browse/KARAF-6772 > > > > I was setting up a vanilla Karaf 4.2.9 with the following features > > > > feature:repo-add camel 3.4.2 > > feature:install pax-http-undertow > > feature:install camel camel-servlet webconsole > > > > I wonder how I can bind the webconsole and the servlet consumer in the > > camel routes to the HTTPS port. My undertow.xml see below. I tried to > > change the org.ops4j.pax.web.cfg but with no success. > > > > Any hints are appreciated. > > > > Thanks > > - Gerald > > > > > > > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > > xmlns:w="urn:jboss:domain:5.0" > > xmlns:io="urn:jboss:domain:io:3.0" > > xsi:schemaLocation=" > > urn:jboss:domain:io:3.0 > > http://www.jboss.org/schema/jbossas/wildfly-io_3_0.xsd > > urn:jboss:domain:undertow:4.0 > > http://www.jboss.org/schema/jbossas/wildfly-undertow_4_0.xsd > > urn:jboss:domain:5.0 > > http://www.jboss.org/schema/jbossas/wildfly-config_5_0.xsd;> > > > > > > > > > > > > > > > > > max-regions="10" /> > > > > > > > > > > > security-realm="https" verify-client="NOT_REQUESTED" /> > > > > > > > > > prefix="access_log." suffix="log" rotate="true" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > header-value="Pax-HTTP-Undertow" /> > > > header-value="Pax-HTTP-Undertow/7.2.16" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.karaf.jaas.boot.principal.UserPrincipal > > > > org.apache.karaf.jaas.boot.principal.RolePrincipal > > > > > > > > > > > > > > > > > > > > > enabled-cipher-suites="TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 > > TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" > > enabled-protocols="TLSv1 TLSv1.1 TLSv1.2" /> > > > keystore-password="password" key-password="password" > > generate-self-signed-certificate-host="localhost" /> > > > > > > > > > > > keystore-password="password" /> > > > > > > org.apache.karaf.jaas.boot.principal.UserPrincipal > > > > org.apache.karaf.jaas.boot.principal.RolePrincipal > > > > > > > > > > > > > > > > > > > > > > > > > > > port="${org.osgi.service.http.port}" /> > > > port="${org.osgi.service.http.port.secure}" /> > > > >
HTTPS with Karaf 4.2.9 and underpinning undertow web server
Dear all, following the guidance in the ticket https://issues.apache.org/jira/browse/KARAF-6772 I was setting up a vanilla Karaf 4.2.9 with the following features feature:repo-add camel 3.4.2 feature:install pax-http-undertow feature:install camel camel-servlet webconsole I wonder how I can bind the webconsole and the servlet consumer in the camel routes to the HTTPS port. My undertow.xml see below. I tried to change the org.ops4j.pax.web.cfg but with no success. Any hints are appreciated. Thanks - Gerald http://www.w3.org/2001/XMLSchema-instance; xmlns:w="urn:jboss:domain:5.0" xmlns:io="urn:jboss:domain:io:3.0" xsi:schemaLocation=" urn:jboss:domain:io:3.0 http://www.jboss.org/schema/jbossas/wildfly-io_3_0.xsd urn:jboss:domain:undertow:4.0 http://www.jboss.org/schema/jbossas/wildfly-undertow_4_0.xsd urn:jboss:domain:5.0 http://www.jboss.org/schema/jbossas/wildfly-config_5_0.xsd;> org.apache.karaf.jaas.boot.principal.UserPrincipal org.apache.karaf.jaas.boot.principal.RolePrincipal org.apache.karaf.jaas.boot.principal.UserPrincipal org.apache.karaf.jaas.boot.principal.RolePrincipal
Re: camel-undertow in Camel > 3.2
Tx, Andrea. A pity :-/ A reason more that the servlet consumer basic auth gets working again, see https://issues.apache.org/jira/browse/KARAF-6772 >From Karaf 4.2.9 this doesn't work any longer due to some reasons. > Andrea Cosentino hat am 04.08.2020 12:06 geschrieben: > > > Hello, > > Yes. The reason is here: https://issues.apache.org/jira/browse/CAMEL-14939 > > From 2.1.0 they won't support OSGi anymore and more and more third party > libraries are doing the same thing. > > Il giorno mar 4 ago 2020 alle ore 12:04 Gerald Kallas > ha scritto: > > > Hi folks, > > > > I was trying to setup a Blueprint route with undertow. In the > > documentation I saw > > > > "The following components is no longer supported in OSGi and has been > > removed from the Camel Karaf features file: camel-undertow, ... ." > > > > Does that finally mean that undertow could no longer be used in Camel > > Blueprint? Several things seem to be much easier with undertow than jetty .. > > > > Best > > - Gerald > >
camel-undertow in Camel > 3.2
Hi folks, I was trying to setup a Blueprint route with undertow. In the documentation I saw "The following components is no longer supported in OSGi and has been removed from the Camel Karaf features file: camel-undertow, ... ." Does that finally mean that undertow could no longer be used in Camel Blueprint? Several things seem to be much easier with undertow than jetty .. Best - Gerald
RE: Set specific offset for a camel-kafka consumer?
Thanks Vikas. Is there a way to specify a dedicated offset timestamp? Best - Gerald > Vikas Jaiswal hat am 01.07.2020 03:06 geschrieben: > > > seekTo allows you to specify 'beginning' or 'end'. > > Regards, > Vikas > > -Original Message- > From: Gerald Kallas [mailto:catsh...@mailbox.org] > Sent: 01 July 2020 03:11 > To: users@camel.apache.org > Subject: Set specific offset for a camel-kafka consumer? > > CAUTION: DO NOT click links, open attachments, or provide sensitive > information if the sender is unknown > > Hi all, > > is there a way to set a specific offset when starting a camel-kafka consumer? > > Thanks in advance > - Gerald > Help reduce your carbon footprint | Think before you print. This e-mail and > any attachments are confidential and intended solely for the addressee and > may also be privileged or exempt from disclosure under applicable law. If you > are not the addressee, or have received this e-mail in error, please notify > the sender immediately, delete it from your system and do not copy, disclose > or otherwise act upon any part of this e-mail or its attachments. Any opinion > or other information in this e-mail or its attachments that does not relate > to the business of the Saksoft Group is personal to the sender and is not > given or endorsed by the Saksoft Group. Any data that you provide within the > context of your email you will have done so with your own consent and GDPR > controls will be applied whilst the data is controlled or processed within > the Saksoft Group.
Set specific offset for a camel-kafka consumer?
Hi all, is there a way to set a specific offset when starting a camel-kafka consumer? Thanks in advance - Gerald
Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0
I'm going to create the tickets for the issues. We may extend these so far with additional information. Best - Gerald > Jean-Baptiste Onofre hat am 29.06.2020 07:40 geschrieben: > > > I thought Gerald already explained it on the mailing list. My intention is > more to create the Jira with the details. > > Regards > JB > > > Le 29 juin 2020 à 07:33, Andrea Cosentino a écrit : > > > > I think it's good to have the details shared in public. > > > > Il lun 29 giu 2020, 07:30 Jean-Baptiste Onofre > <mailto:j...@nanthrax.net>> ha scritto: > > Hi, > > > > Yes Karaf 4.2.9 upgraded to Pax Web 7.2.15 and Jetty 9.4.28.v20200408. > > > > Can you please send a private message about issues you have with Karaf > > 4.2.9 and Camel 3.4.0 (as I’m working on camel karaf for 3.5.0) ? > > > > Thanks, > > Regards > > JB > > > > > Le 28 juin 2020 à 22:02, Gerald Kallas > > <mailto:catsh...@mailbox.org>> a écrit : > > > > > > I tested the combination Karaf 4.2.8 and Camel 3.3.0, with this the > > > workaround works as expected. Seems that Jetty has been updated in Karaf > > > 4.2.9? > > > > > > (The combination Karaf 4.2.8 and Camel 3.4.0 doesn't work due to other > > > issues.) > > > > > >> Gerald Kallas mailto:catsh...@mailbox.org>> hat > > >> am 28.06.2020 18:12 geschrieben: > > >> > > >> > > >> Hi all, > > >> > > >> I was updating the runtime to Karaf 4.2.9 and Camel 3.4.0. > > >> > > >> after removing one of the org.eclipse.jetty.jaas.JAASLoginService > > >> entries in my etc/jetty.xml I'm getting an error as attached below. > > >> > > >> Neither hawtio nor my servlet are working any longer. Seems that now > > >> both entries of org.eclipse.jetty.jaas.JAASLoginService are mandatory. > > >> > > >> With both entries, as you found Grzegorz, the authentication doesn't > > >> work. > > >> > > >> Should I create a JIRA ticket and if yes, within Karaf? Or maybe you > > >> have another workaround for that behaviour? > > >> > > >> Best > > >> - Gerald > > >> > > >> > > >> 2020-06-28T16:06:47,673 | ERROR | FelixStartLevel | HttpServiceStarted > > >> | 266 - org.ops4j.pax.web.pax-web-runtime - 7.2.16 | Could > > >> not start the servlet context for context path [] > > >> java.lang.SecurityException: AuthConfigFactory error: > > >> java.lang.ClassNotFoundException: > > >> org.apache.geronimo.components.jaspi.AuthConfigFactoryImpl not found by > > >> org.apache.geronimo.specs.geronimo-jaspic_1.0_spec [169] > > >>at > > >> javax.security.auth.message.config.AuthConfigFactory.getFactory(AuthConfigFactory.java:77) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.security.jaspi.JaspiAuthenticatorFactory.getAuthenticator(JaspiAuthenticatorFactory.java:90) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:394) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:419) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:120) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.server.session.SessionHandler.doStart(SessionHandler.java:504) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) > > >> ~[?:?] > > >>at > > >> org.eclipse.jetty.util.component.ContainerLif
Re: camel-kafka connection issue
Hi all, I was finally able to get the Kafka connection running with some kafka server related configuration. For information, I'm using the docker image from https://hub.docker.com/r/bitnami/kafka/ This is creating 2 container (Zookeeper and Kafka). I've changed the docker-compose.yml as following with the lines - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,EXTERNAL://:9093 - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://:9092,EXTERNAL://localhost:9093 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT (see full yml below). This allows an internal connection from camel-kafka inside the docker network as well as an external communication. Best - Gerald version: '2' services: zookeeper: container_name: zookeeper image: 'docker.io/bitnami/zookeeper:3-debian-10' ports: - '2181:2181' volumes: - 'zookeeper_data:/bitnami' environment: - ALLOW_ANONYMOUS_LOGIN=yes kafka: container_name: kafka image: 'docker.io/bitnami/kafka:2-debian-10' ports: - '9092:9092' - '9093:9093' volumes: - 'kafka_data:/bitnami' environment: - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,EXTERNAL://:9093 - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://:9092,EXTERNAL://localhost:9093 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT - ALLOW_PLAINTEXT_LISTENER=yes depends_on: - zookeeper volumes: zookeeper_data: driver: local kafka_data: driver: local networks: default: external: name: casisp > Jean-Baptiste Onofre hat am 29.06.2020 08:14 geschrieben: > > > Hi, > > Don’t you have another trace in the log, like missing Avro packages > (ClassNotFoundException) in the Kafka bundle client ? > > I saw an issue with pulsar bundle missing Avro import (it used avro.* import > whereas "new" Avro release uses org.apache.avro.*). Maybe Avro optional > import is required in your case (even if Kafka-clients doesn’t define the > dependency explicitly). > > Regards > JB > > > Le 27 juin 2020 à 09:45, Gerald Kallas a écrit : > > > > Dear all, > > > > I've setup Camel 3.4.0 and want to consume from a Kafka topic. My route > > looks like > > > > http://www.osgi.org/xmlns/blueprint/v1.0.0;> > > http://camel.apache.org/schema/blueprint; > > streamCache="true"> > > > > > uri="kafka:casisp?brokers=ec2-3-124-33-3.eu-central-1.compute.amazonaws.com:9092" > > /> > > > > > > > > > > > > The log shows the connection error as below. > > > > A connection from Kafka CLI or another tool works without problems. > > > > Any hints are appreciated. > > > > - Gerald > > > > > > Log file excerpt > > > > 2020-06-27T07:37:29,692 | INFO | Blueprint Event Dispatcher: 1 | > > KafkaConsumer| 120 - org.apache.camel.camel-kafka - > > 3.4.0 | Starting Kafka consumer on topic: casisp with breakOnFirstError: > > false > > 2020-06-27T07:37:29,710 | INFO | Blueprint Event Dispatcher: 1 | > > ConsumerConfig | 195 - > > org.apache.servicemix.bundles.kafka-clients - 2.4.1.1 | ConsumerConfig > > values: > >allow.auto.create.topics = true > >auto.commit.interval.ms = 5000 > >auto.offset.reset = latest > >bootstrap.servers = > > [ec2-3-124-33-3.eu-central-1.compute.amazonaws.com:9092] > >check.crcs = true > >client.dns.lookup = default > >client.id = > >client.rack = > >connections.max.idle.ms = 54 > >default.api.timeout.ms = 6 > >enable.auto.commit = true > >exclude.internal.topics = true > >fetch.max.bytes = 52428800 > >fetch.max.wait.ms = 500 > >fetch.min.bytes = 1 > >group.id = 689cc1d7-fcf7-4565-9056-ddd7218d261f > >group.instance.id = null > >heartbeat.interval.ms = 3000 > >interceptor.classes = [] > >internal.leave.group.on.close = true > >isolation.level = read_uncommitted > >key.deserializer = class > > org.apache.kafka.common.serialization.StringDeserializer > >max.partition.fetch.bytes = 1048576 > >max.poll.interval.ms = 30 > >max.poll.records = 500 > >metadata.max.age.ms = 30 > >metric.reporters = [] > >metrics.num.samples = 2 > >metric
Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0
I tested the combination Karaf 4.2.8 and Camel 3.3.0, with this the workaround works as expected. Seems that Jetty has been updated in Karaf 4.2.9? (The combination Karaf 4.2.8 and Camel 3.4.0 doesn't work due to other issues.) > Gerald Kallas hat am 28.06.2020 18:12 geschrieben: > > > Hi all, > > I was updating the runtime to Karaf 4.2.9 and Camel 3.4.0. > > after removing one of the org.eclipse.jetty.jaas.JAASLoginService entries in > my etc/jetty.xml I'm getting an error as attached below. > > Neither hawtio nor my servlet are working any longer. Seems that now both > entries of org.eclipse.jetty.jaas.JAASLoginService are mandatory. > > With both entries, as you found Grzegorz, the authentication doesn't work. > > Should I create a JIRA ticket and if yes, within Karaf? Or maybe you have > another workaround for that behaviour? > > Best > - Gerald > > > 2020-06-28T16:06:47,673 | ERROR | FelixStartLevel | HttpServiceStarted > | 266 - org.ops4j.pax.web.pax-web-runtime - 7.2.16 | Could not start > the servlet context for context path [] > java.lang.SecurityException: AuthConfigFactory error: > java.lang.ClassNotFoundException: > org.apache.geronimo.components.jaspi.AuthConfigFactoryImpl not found by > org.apache.geronimo.specs.geronimo-jaspic_1.0_spec [169] > at > javax.security.auth.message.config.AuthConfigFactory.getFactory(AuthConfigFactory.java:77) > ~[?:?] > at > org.eclipse.jetty.security.jaspi.JaspiAuthenticatorFactory.getAuthenticator(JaspiAuthenticatorFactory.java:90) > ~[?:?] > at > org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:394) > ~[?:?] > at > org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:419) > ~[?:?] > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) > ~[?:?] > at > org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) > ~[?:?] > at > org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) > ~[?:?] > at > org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) > ~[?:?] > at > org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:120) > ~[?:?] > at > org.eclipse.jetty.server.session.SessionHandler.doStart(SessionHandler.java:504) > ~[?:?] > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) > ~[?:?] > at > org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) > ~[?:?] > at > org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) > ~[?:?] > at > org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) > ~[?:?] > at > org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:120) > ~[?:?] > at > org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:898) > ~[?:?] > at > org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:356) > ~[?:?] > at > org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.startContext(HttpServiceContext.java:396) > ~[?:?] > at > org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:838) > ~[?:?] > at > org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275) > ~[?:?] > at > org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:272) > ~[?:?] > at > org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) > ~[?:?] > at > org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:329) > ~[?:?] > at > org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:255) > [!/:?] > at > org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:226) > [!/:?] > at > org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:210) > [!/:?] > at > org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:69) > [!/:?] > at Proxy92a1a95e_1f66_41cb_8fcd_ed63d983d611.registerServlet(Unknown > Source) [?:?] > at > org.apache.camel.component.osgi.OsgiServletRegisterer.register(OsgiServletRegist
Re: Basic authentication of WAB using Jaas in Karaf - the trick doesn't work any longer w/ Karaf 4.2.9 and Camel 3.4.0
() method does > this: > > else if (list.size() == 1) > service = list.iterator().next(); > > So I simply made it working by ensuring there's only one > org.eclipse.jetty.jaas.JAASLoginService: > > list = {java.util.ArrayList@9544} size = 1 > 0 = {org.eclipse.jetty.jaas.JAASLoginService@9547} > "JAASLoginService@7ba67d0b{STARTED}" > LOG: org.eclipse.jetty.util.log.Logger = > {org.eclipse.jetty.util.log.Slf4jLog@9549} > "org.ops4j.pax.logging.slf4j.Slf4jLogger@43ea82d7" > DEFAULT_ROLE_CLASS_NAME: java.lang.String = > "org.eclipse.jetty.jaas.JAASRole" > DEFAULT_ROLE_CLASS_NAMES: java.lang.String[] = > {java.lang.String[1]@9551} > _roleClassNames: java.lang.String[] = {java.lang.String[2]@9552} > _callbackHandlerClass: java.lang.String = null > _realmName: java.lang.String = "karaf" > _loginModuleName: java.lang.String = "karaf" > > Now, with your Camel route, I got: > > $ curl -v http://localhost:8181/camel/api/say/hello > * Trying ::1:8181... > * Connected to localhost (::1) port 8181 (#0) > > GET /camel/api/say/hello HTTP/1.1 > > Host: localhost:8181 > > User-Agent: curl/7.69.1 > > Accept: */* > > > * Mark bundle as not supporting multiuse > < HTTP/1.1 404 Not Found > < Cache-Control: must-revalidate,no-cache,no-store > < Content-Type: text/html;charset=iso-8859-1 > < Content-Length: 456 > < Server: Jetty(9.4.22.v20191022) > < > > $ curl -v -u karaf:karaf http://localhost:8181/camel/api/say/hello > * Trying ::1:8181... > * Connected to localhost (::1) port 8181 (#0) > * Server auth using Basic with user 'karaf' > > GET /camel/api/say/hello HTTP/1.1 > > Host: localhost:8181 > > Authorization: Basic a2FyYWY6a2FyYWY= > > User-Agent: curl/7.69.1 > > Accept: */* > > > * Mark bundle as not supporting multiuse > < HTTP/1.1 200 OK > < Content-Type: application/json > < Accept: */* > < Authorization: Basic a2FyYWY6a2FyYWY= > < breadcrumbId: ID-everfree-forest-1589807499756-0-1 > < User-Agent: curl/7.69.1 > < Transfer-Encoding: chunked > < Server: Jetty(9.4.22.v20191022) > < > * Connection #0 to host localhost left intact > "Hello World" > > In theory it should be possible to grab (in etc/jetty.xml, using > element) instance of SecurityHandler and simply set there the > "realmName" property to "Karaf", so even with two different beans with > org.eclipse.jetty.jaas.JAASLoginService class, Jetty would pick up the > right one. But in Pax Web security handler is part of every > org.ops4j.pax.web.service.jetty.internal.HttpServiceContext created and > only in Pax Web 8 I'd be able to fix this in more clean way. > > So, please use only one org.eclipse.jetty.jaas.JAASLoginService in your > etc/jetty.xml > > regards > Grzegorz Grzybek > > pon., 18 maj 2020 o 10:25 Achim Nierbeck > napisał(a): > > > Hi, > > > > I already also answered Gerald in another mail. > > I'm not quite sure but what might be an issue, is that the default > > http-context used in his application isn't bound to the underlying security > > realm. > > Therefore it's quite a possibility that there needs to be a configuration > > done in his own application, using his own http-Context. > > > > Can be found here: > > > > https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/authentication/src/main/java/org/ops4j/pax/web/samples/authentication/internal/Activator.java > > > > https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/authentication/src/main/java/org/ops4j/pax/web/samples/authentication/AuthHttpContext.java > > and here: > > > > https://github.com/jgoodyear/ApacheKarafCookbook/blob/master/chapter4/chapter4-recipe4/chapter4-recipe4-whiteboard/src/main/java/com/packt/internal/Activator.java > > > > regards, Achim > > > > > > Am Fr., 15. Mai 2020 um 21:06 Uhr schrieb Alex Soto > >: > > > > > I’m sorry, I don’t know why it's not working; it looks correct to me. > > > Maybe somebody from the Pax-Web team can help you. > > > The only suspicious thing is the warning: > > > > > > 2020-05-15T18:20:50,256 | WARN | qtp1611313605-201 | SecurityHandler > > > | 229 - org.eclipse.jetty.util - 9.4.22.v20191022 | No > > > authenticator for: {RoleInfo,C[admin],None} > > > > > > > > > Which suggest something is misconfigured. > > > > > > Best regards, > > > Alex soto > > > > > > > > > > > > > > > > On May 15, 2020, at 2:23 PM, Gerald Kallas > > wrote: > > > > > > > > 2020-05-15T18:20:50,256 | WARN | qtp1611313605-201 | SecurityHandler > > > | 229 - org.eclipse.jetty.util - 9.4.22.v20191022 | No > > > authenticator for: {RoleInfo,C[admin],None} > > > > > > > > > > -- > > > > 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/> > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > >
camel-kafka connection issue
Dear all, I've setup Camel 3.4.0 and want to consume from a Kafka topic. My route looks like http://www.osgi.org/xmlns/blueprint/v1.0.0;> http://camel.apache.org/schema/blueprint; streamCache="true"> The log shows the connection error as below. A connection from Kafka CLI or another tool works without problems. Any hints are appreciated. - Gerald Log file excerpt 2020-06-27T07:37:29,692 | INFO | Blueprint Event Dispatcher: 1 | KafkaConsumer | 120 - org.apache.camel.camel-kafka - 3.4.0 | Starting Kafka consumer on topic: casisp with breakOnFirstError: false 2020-06-27T07:37:29,710 | INFO | Blueprint Event Dispatcher: 1 | ConsumerConfig | 195 - org.apache.servicemix.bundles.kafka-clients - 2.4.1.1 | ConsumerConfig values: allow.auto.create.topics = true auto.commit.interval.ms = 5000 auto.offset.reset = latest bootstrap.servers = [ec2-3-124-33-3.eu-central-1.compute.amazonaws.com:9092] check.crcs = true client.dns.lookup = default client.id = client.rack = connections.max.idle.ms = 54 default.api.timeout.ms = 6 enable.auto.commit = true exclude.internal.topics = true fetch.max.bytes = 52428800 fetch.max.wait.ms = 500 fetch.min.bytes = 1 group.id = 689cc1d7-fcf7-4565-9056-ddd7218d261f group.instance.id = null heartbeat.interval.ms = 3000 interceptor.classes = [] internal.leave.group.on.close = true isolation.level = read_uncommitted key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer max.partition.fetch.bytes = 1048576 max.poll.interval.ms = 30 max.poll.records = 500 metadata.max.age.ms = 30 metric.reporters = [] metrics.num.samples = 2 metrics.recording.level = INFO metrics.sample.window.ms = 3 partition.assignment.strategy = [org.apache.kafka.clients.consumer.RangeAssignor] receive.buffer.bytes = 65536 reconnect.backoff.max.ms = 1000 reconnect.backoff.ms = 50 request.timeout.ms = 4 retry.backoff.ms = 100 sasl.client.callback.handler.class = null sasl.jaas.config = null sasl.kerberos.kinit.cmd = /usr/bin/kinit sasl.kerberos.min.time.before.relogin = 6 sasl.kerberos.service.name = null sasl.kerberos.ticket.renew.jitter = 0.05 sasl.kerberos.ticket.renew.window.factor = 0.8 sasl.login.callback.handler.class = null sasl.login.class = null sasl.login.refresh.buffer.seconds = 300 sasl.login.refresh.min.period.seconds = 60 sasl.login.refresh.window.factor = 0.8 sasl.login.refresh.window.jitter = 0.05 sasl.mechanism = GSSAPI security.protocol = PLAINTEXT security.providers = null send.buffer.bytes = 131072 session.timeout.ms = 1 ssl.cipher.suites = null ssl.enabled.protocols = [TLSv1.2] ssl.endpoint.identification.algorithm = https ssl.key.password = null ssl.keymanager.algorithm = SunX509 ssl.keystore.location = null ssl.keystore.password = null ssl.keystore.type = JKS ssl.protocol = TLSv1.2 ssl.provider = null ssl.secure.random.implementation = null ssl.trustmanager.algorithm = PKIX ssl.truststore.location = null ssl.truststore.password = null ssl.truststore.type = JKS value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer 2020-06-27T07:37:29,884 | WARN | Blueprint Event Dispatcher: 1 | ConsumerConfig | 195 - org.apache.servicemix.bundles.kafka-clients - 2.4.1.1 | The configuration 'specific.avro.reader' was supplied but isn't a known config. 2020-06-27T07:37:29,884 | INFO | Blueprint Event Dispatcher: 1 | AppInfoParser | 195 - org.apache.servicemix.bundles.kafka-clients - 2.4.1.1 | Kafka version: 2.4.1 2020-06-27T07:37:29,885 | INFO | Blueprint Event Dispatcher: 1 | AppInfoParser | 195 - org.apache.servicemix.bundles.kafka-clients - 2.4.1.1 | Kafka commitId: c57222ae8cd7866b 2020-06-27T07:37:29,885 | INFO | Blueprint Event Dispatcher: 1 | AppInfoParser | 195 - org.apache.servicemix.bundles.kafka-clients - 2.4.1.1 | Kafka startTimeMs: 1593243449884 2020-06-27T07:37:29,888 | INFO | Blueprint Event Dispatcher: 1 | InternalRouteStartupManager | 95 - org.apache.camel.camel-base - 3.4.0 | Route: route9 started and consuming from: kafka://casisp 2020-06-27T07:37:29,890 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 95 - org.apache.camel.camel-base - 3.4.0 | Total 1 routes, of which 1 are started
camel-velocity warnings in Camel 3.4.0
Dear all, while executing camel-velocity templates I'm getting deprecation | 207 - org.apache.velocity.engine-core - 2.1.0 | configuration key 'class.resource.loader.class' has been deprecated in favor of 'resource.loader.class.class' deprecation | 207 - org.apache.velocity.engine-core - 2.1.0 | configuration key 'resource.loader' has been deprecated in favor of 'resource.loaders' deprecation | 207 - org.apache.velocity.engine-core - 2.1.0 | configuration key 'class.resource.loader.description' has been deprecated in favor of 'resource.loader.class.description' I'm just calling the velocity to process templates. What does that mean and how to avoid this? Best - Gerald
Karaf 4.2.9 w/ Camel 3.4.0 - ActiveMQ isn't starting
Dear all, I've setup an (finally offline) instance w/ Karaf 4.2.9 and Camel 3.4.0. The ActiveMQ instance doesn't start, I'm getting an error as below. The problem still persist (I did experience this one earlier). Should I create a JIRA ticket for? Best - Gerald 2020-06-24T09:21:18,140 | ERROR | CM Configuration Updater (ManagedServiceFactory Update: factoryPid=[org.apache.activemq.server]) | configadmin | 9 - org.apache.felix.configadmin - 1.9.16 | [org.osgi.service.cm.ManagedServiceFactory, id=208, bundle=81/mvn:org.apache.activemq/activemq-osgi/5.15.13]: Updating configuration org.apache.activemq.server.65d727b0-40bd-49dd-aec8-d1ebee90dc9a caused a problem: Cannot start the broker org.osgi.service.cm.ConfigurationException: null : Cannot start the broker at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:147) ~[!/:5.15.13] at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159) ~[!/:?] at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93) [!/:?] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1253) [!/:?] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1197) [!/:?] at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138) [!/:?] at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [!/:?] at java.lang.Thread.run(Unknown Source) [?:?] Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 24 in XML document from URL [file:/opt/apache-karaf-4.2.9/etc/activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 24; columnNumber: 101; cvc-elt.1.a: Cannot find the declaration of element 'beans'. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:400) ~[!/:?] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) ~[!/:?] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:305) ~[!/:?] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188) ~[!/:?] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224) ~[!/:?] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195) ~[!/:?] at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:257) ~[!/:?] at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:128) ~[!/:?] at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:94) ~[!/:?] at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133) ~[!/:?] at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:637) ~[!/:?] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:522) ~[!/:?] at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:126) ~[!/:5.15.13] ... 7 more Caused by: org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the declaration of element 'beans'. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ~[?:?] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[?:?] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) ~[?:?] at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
Camel-exec issue (script works but returns 1 inside a route)
Hi all, I've the following script (inside the container) -rwxr-xr-x 1 casisp casisp 103 May 22 22:58 user-add /opt/apache-karaf/bin/client "jaas:realm-manage --index 1; jaas:user-add user1 password1; jaas:update" When I'm calling it from the command line directly it works. Inside a route (see below) it returns an exit code 1. Any thoughts about this? http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> http://camel.apache.org/schema/blueprint;> /opt/apache-karaf/bin/user-add 2020-05-23T05:28:44,039 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 94 - org.apache.camel.camel-base - 3.3.0 | Route: route37 started and consuming from: timer://exec 2020-05-23T05:28:44,067 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 94 - org.apache.camel.camel-base - 3.3.0 | Total 1 routes, of which 1 are started 2020-05-23T05:28:44,068 | INFO | Blueprint Event Dispatcher: 1 | AbstractCamelContext | 94 - org.apache.camel.camel-base - 3.3.0 | Apache Camel 3.3.0 (CamelContext: camel-35) started in 0.223 seconds 2020-05-23T05:28:44,088 | INFO | fileinstall-/opt/apache-karaf-4.2.8/deploy | fileinstall | 10 - org.apache.felix.fileinstall - 3.6.4 | Started bundle: blueprint:file:/opt/apache-karaf-4.2.8/deploy/exec.xml 2020-05-23T05:28:50,553 | INFO | sshd-SshServer[242a1ef6]-nio2-thread-1 | ServerUserAuthService| 38 - org.apache.sshd.core - 1.7.0 | Session admin@/127.0.0.1:50158 authenticated 2020-05-23T05:28:51,697 | ERROR | Camel (camel-35) thread #67 - timer://exec | ExecProducer | 109 - org.apache.camel.camel-exec - 3.3.0 | The command ExecCommand [args=[], executable=/opt/apache-karaf/bin/user-add, timeout=9223372036854775807, outFile=null, workingDir=null, commandLogLevel=DEBUG, useStderrOnEmptyStdout=false] returned exit value 1 2020-05-23T05:28:51,697 | INFO | Camel (camel-35) thread #67 - timer://exec | route37 | 102 - org.apache.camel.camel-core-engine - 3.3.0 | headers: {CamelExecExitValue=1, CamelExecStderr=java.io.ByteArrayInputStream@6d4d91bc, firedTime=Sat May 23 05:28:45 UTC 2020} Best - Gerald
OSGi CLI commands in a Camel route
Hi all, is there a way to execute OSGi CLI commands directly from a Camel route? Best - Gerald
Re: add/remove JAAS users and roles within a Camel route?
Yes, that’s quite clear. I wonder if there is an access to the OSGi CLI commands jaas:* from a Camel route directly. At the moment I‘m using camel-exec with the karaf client. Sent by my mobile device - Gerald Kallas > Am 21.05.2020 um 19:42 schrieb Alex Soto : > > One way to do this is to store the user and role directly in the underlying > storage for the JAAS security context. > For example, in the case of the default “karaf” security context, users and > roles are stored in the ‘etc/users.properties’ file, but you may choose to > store this in a database table, LDAP server, etc. > > Best regards, > Alex soto > > > > >> On May 20, 2020, at 3:48 PM, Gerald Kallas wrote: >> >> Tx JB. >> >> So in this case, how can i call the jaas:* service from a Camel route? I did >> some research but wasn't able to find this .. >> >> Regards >> - Gerald >> >>> Jean-Baptiste Onofre hat am 20. Mai 2020 20:25 >>> geschrieben: >>> >>> >>> Hi, >>> >>> You mean on a JAAS backend ? >>> >>> JAAS doesn’t provide anything about that. That’s why in Karaf we have the >>> "backend" service attached to some login modules. >>> In your Camel route, you can interact with these services (as the jaas:* >>> commands do in Karaf). >>> >>> Regards >>> JB >>> >>>> Le 20 mai 2020 à 19:50, Gerald Kallas a écrit : >>>> >>>> Hi all, >>>> >>>> is it possible to add/remove users and roles inside a Camel route >>>> (Blueprint DSL) or at least w/ a piece of Java code inside a bean? >>>> >>>> Thanks in advance for any hints >>>> - Gerald >
Re: add/remove JAAS users and roles within a Camel route?
Tx JB. So in this case, how can i call the jaas:* service from a Camel route? I did some research but wasn't able to find this .. Regards - Gerald > Jean-Baptiste Onofre hat am 20. Mai 2020 20:25 > geschrieben: > > > Hi, > > You mean on a JAAS backend ? > > JAAS doesn’t provide anything about that. That’s why in Karaf we have the > "backend" service attached to some login modules. > In your Camel route, you can interact with these services (as the jaas:* > commands do in Karaf). > > Regards > JB > > > Le 20 mai 2020 à 19:50, Gerald Kallas a écrit : > > > > Hi all, > > > > is it possible to add/remove users and roles inside a Camel route > > (Blueprint DSL) or at least w/ a piece of Java code inside a bean? > > > > Thanks in advance for any hints > > - Gerald
add/remove JAAS users and roles within a Camel route?
Hi all, is it possible to add/remove users and roles inside a Camel route (Blueprint DSL) or at least w/ a piece of Java code inside a bean? Thanks in advance for any hints - Gerald
Re: Basic authentication of WAB using Jaas in Karaf
Thanks, that helps also a lot. So, what's with the other question, is it possible to define roles, users and passwords in multiple files and assign to a HTTP context? Best - Gerald > Jean-Baptiste Onofre hat am 19. Mai 2020 07:02 > geschrieben: > > > Hi, > > Sorry I was busy with Karaf 4.2.9 preparation and ActiveMQ releases. > > About several port, yes, it’s possible: > > http://blog.nanthrax.net/?p=352 > > Then you have to assign servlet to port using VirtualHosts (no other way for > now). I already created couple of Jira to deal with that easily: > > https://issues.apache.org/jira/browse/KARAF-6632 > > I will focus on web improvements for 4.2.10 and 4.3.0.RC2. > > Regards > JB > > > > > Le 18 mai 2020 à 23:39, Gerald Kallas a écrit : > > Hi Grzegorz, > > > > perfect, removing one org.eclipse.jetty.jaas.JAASLoginService and it works! > > > > Thanks a lot for digging into the details! I really appreciate this. > > > > Is there a reason that in the default jetty.xml exist 2 > > org.eclipse.jetty.jaas.JAASLoginService definitions? > > > > One further question .. would it be possible to extend Jetty to use an > > other port additionally and bind the servlets to this additional port only > > (it's for security reasons because I don't want to expose the web console > > externally, only the functional servlets). > > > > I tried some other approach too, described here > > https://www.catshout.de/?p=161. This one is tricky as a Jetty security > > handler can be bind only once to a port. > > > > You mentioned Undertow. It's also contained in Camel. So I wonder what > > might be finally the best and straightforward approach for the following > > requirements > > > > 1. Define multiple URIs on on single port > > 2. Secure the communication with TLS > > 3. Define independently an authentication for each URI on this single port > > > > Jetty? > > Servlet inside Jetty? > > Undertow? > > > > I'll test now multiple servlets inside Jetty for independent co-existence. > > > > Best > > - Gerald > > > > > > > Grzegorz Grzybek hat am 18. Mai 2020 15:24 > > > geschrieben: > > > > > > > > > Hello > > > > > > I have some answer. First, the "http context processing" feature was > > > mainly tested to "inject" Keycloak authenticator and I mostly tested it > > > with pax-web-undertow. > > > > > > But I checked how it works with pax-web-jetty in the debugger. > > > > > > The key problem is that when Jetty's SecurityHandler is starting, it > > > tries to find/discover org.eclipse.jetty.security.LoginService instance. > > > > > > With default etc/jetty.xml, there are TWO beans with > > > org.eclipse.jetty.jaas.JAASLoginService class and > > > org.eclipse.jetty.security.SecurityHandler#findLoginService() method does > > > this: > > > > > > else if (list.size() == 1) > > > service = list.iterator().next(); > > > > > > So I simply made it working by ensuring there's only one > > > org.eclipse.jetty.jaas.JAASLoginService: > > > > > > list = {java.util.ArrayList@9544} size = 1 > > > 0 = {org.eclipse.jetty.jaas.JAASLoginService@9547} > > > "JAASLoginService@7ba67d0b{STARTED}" > > > LOG: org.eclipse.jetty.util.log.Logger = > > > {org.eclipse.jetty.util.log.Slf4jLog@9549} > > > "org.ops4j.pax.logging.slf4j.Slf4jLogger@43ea82d7" > > > DEFAULT_ROLE_CLASS_NAME: java.lang.String = > > > "org.eclipse.jetty.jaas.JAASRole" > > > DEFAULT_ROLE_CLASS_NAMES: java.lang.String[] = {java.lang.String[1]@9551} > > > _roleClassNames: java.lang.String[] = {java.lang.String[2]@9552} > > > _callbackHandlerClass: java.lang.String = null > > > _realmName: java.lang.String = "karaf" > > > _loginModuleName: java.lang.String = "karaf" > > > > > > Now, with your Camel route, I got: > > > > > > $ curl -v http://localhost:8181/camel/api/say/hello > > > * Trying ::1:8181... > > > * Connected to localhost (::1) port 8181 (#0) > > > > > > > GET /camel/api/say/hello HTTP/1.1 > > > > Host: localhost:8181 > > > > User-Agent: curl/7.69.1 > > > > Accept: */* > > > > > > > * Mark bundle as not supporting multiuse > > > < HTTP/1.1 404 Not Found > > > < C
Fwd: Re: Basic authentication of WAB using Jaas in Karaf
And .. is there a way in the servlet approach with Jetty to have multiple properties files for users and roles (eg 1 per servlet)? -- Ursprüngliche Nachricht -- Von: Gerald Kallas An: Grzegorz Grzybek , users@camel.apache.org Datum: 18. Mai 2020 23:39 Betreff: Re: Basic authentication of WAB using Jaas in Karaf Hi Grzegorz, perfect, removing one org.eclipse.jetty.jaas.JAASLoginService and it works! Thanks a lot for digging into the details! I really appreciate this. Is there a reason that in the default jetty.xml exist 2 org.eclipse.jetty.jaas.JAASLoginService definitions? One further question .. would it be possible to extend Jetty to use an other port additionally and bind the servlets to this additional port only (it's for security reasons because I don't want to expose the web console externally, only the functional servlets). I tried some other approach too, described here https://www.catshout.de/?p=161. This one is tricky as a Jetty security handler can be bind only once to a port. You mentioned Undertow. It's also contained in Camel. So I wonder what might be finally the best and straightforward approach for the following requirements 1. Define multiple URIs on on single port 2. Secure the communication with TLS 3. Define independently an authentication for each URI on this single port Jetty? Servlet inside Jetty? Undertow? I'll test now multiple servlets inside Jetty for independent co-existence. Best - Gerald > Grzegorz Grzybek hat am 18. Mai 2020 15:24 geschrieben: > > > Hello > > I have some answer. First, the "http context processing" feature was mainly > tested to "inject" Keycloak authenticator and I mostly tested it with > pax-web-undertow. > > But I checked how it works with pax-web-jetty in the debugger. > > The key problem is that when Jetty's SecurityHandler is starting, it tries to > find/discover org.eclipse.jetty.security.LoginService instance. > > With default etc/jetty.xml, there are TWO beans with > org.eclipse.jetty.jaas.JAASLoginService class and > org.eclipse.jetty.security.SecurityHandler#findLoginService() method does > this: > > else if (list.size() == 1) > service = list.iterator().next(); > > So I simply made it working by ensuring there's only one > org.eclipse.jetty.jaas.JAASLoginService: > > list = {java.util.ArrayList@9544} size = 1 > 0 = {org.eclipse.jetty.jaas.JAASLoginService@9547} > "JAASLoginService@7ba67d0b{STARTED}" > LOG: org.eclipse.jetty.util.log.Logger = > {org.eclipse.jetty.util.log.Slf4jLog@9549} > "org.ops4j.pax.logging.slf4j.Slf4jLogger@43ea82d7" > DEFAULT_ROLE_CLASS_NAME: java.lang.String = "org.eclipse.jetty.jaas.JAASRole" > DEFAULT_ROLE_CLASS_NAMES: java.lang.String[] = {java.lang.String[1]@9551} > _roleClassNames: java.lang.String[] = {java.lang.String[2]@9552} > _callbackHandlerClass: java.lang.String = null > _realmName: java.lang.String = "karaf" > _loginModuleName: java.lang.String = "karaf" > > Now, with your Camel route, I got: > > $ curl -v http://localhost:8181/camel/api/say/hello > * Trying ::1:8181... > * Connected to localhost (::1) port 8181 (#0) > > GET /camel/api/say/hello HTTP/1.1 > > Host: localhost:8181 > > User-Agent: curl/7.69.1 > > Accept: */* > > > * Mark bundle as not supporting multiuse > < HTTP/1.1 404 Not Found > < Cache-Control: must-revalidate,no-cache,no-store > < Content-Type: text/html;charset=iso-8859-1 > < Content-Length: 456 > < Server: Jetty(9.4.22.v20191022) > < > > $ curl -v -u karaf:karaf http://localhost:8181/camel/api/say/hello > * Trying ::1:8181... > * Connected to localhost (::1) port 8181 (#0) > * Server auth using Basic with user 'karaf' > > GET /camel/api/say/hello HTTP/1.1 > > Host: localhost:8181 > > Authorization: Basic a2FyYWY6a2FyYWY= > > User-Agent: curl/7.69.1 > > Accept: */* > > > * Mark bundle as not supporting multiuse > < HTTP/1.1 200 OK > < Content-Type: application/json > < Accept: */* > < Authorization: Basic a2FyYWY6a2FyYWY= > < breadcrumbId: ID-everfree-forest-1589807499756-0-1 > < User-Agent: curl/7.69.1 > < Transfer-Encoding: chunked > < Server: Jetty(9.4.22.v20191022) > < > * Connection #0 to host localhost left intact > "Hello World" > > In theory it should be possible to grab (in etc/jetty.xml, using > element) instance of SecurityHandler and simply set there the "realmName" > property to "Karaf", so even with two different beans with > org.eclipse.jetty.jaas.JAASLoginService class, Jetty would pick up the right > one. But in Pax Web security handler is part of every > org.ops4
Re: Basic authentication of WAB using Jaas in Karaf
k > napisał(a): > > Hi, > > > > I already also answered Gerald in another mail. > > I'm not quite sure but what might be an issue, is that the default > > http-context used in his application isn't bound to the underlying security > > realm. > > Therefore it's quite a possibility that there needs to be a configuration > > done in his own application, using his own http-Context. > > > > Can be found here: > > https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/authentication/src/main/java/org/ops4j/pax/web/samples/authentication/internal/Activator.java > > https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/authentication/src/main/java/org/ops4j/pax/web/samples/authentication/AuthHttpContext.java > > and here: > > https://github.com/jgoodyear/ApacheKarafCookbook/blob/master/chapter4/chapter4-recipe4/chapter4-recipe4-whiteboard/src/main/java/com/packt/internal/Activator.java > > > > regards, Achim > > > > > > Am Fr., 15. Mai 2020 um 21:06 Uhr schrieb Alex Soto : > > > > > I’m sorry, I don’t know why it's not working; it looks correct to me. > > > Maybe somebody from the Pax-Web team can help you. > > > The only suspicious thing is the warning: > > > > > > 2020-05-15T18:20:50,256 | WARN | qtp1611313605-201 | SecurityHandler > > > | 229 - org.eclipse.jetty.util - 9.4.22.v20191022 | No > > > authenticator for: {RoleInfo,C[admin],None} > > > > > > > > > Which suggest something is misconfigured. > > > > > > Best regards, > > > Alex soto > > > > > > > > > > > > > > > > On May 15, 2020, at 2:23 PM, Gerald Kallas wrote: > > > > > > > > 2020-05-15T18:20:50,256 | WARN | qtp1611313605-201 | SecurityHandler > > > | 229 - org.eclipse.jetty.util - 9.4.22.v20191022 | No > > > authenticator for: {RoleInfo,C[admin],None} > > > > > > > > > > -- > > > > 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/> > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
Re: Basic authentication of WAB using Jaas in Karaf
.ops4j.pax.web.session.cookie.httpOnly=true org.osgi.service.http.secure.enabled=true org.osgi.service.http.port.secure=8443 org.ops4j.pax.web.ssl.keystore=${karaf.etc}/keystore.p12 org.ops4j.pax.web.ssl.password=x org.ops4j.pax.web.ssl.keypassword=x javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp org.ops4j.pax.web.config.file=${karaf.etc}/jetty.xml org.apache.karaf.features.configKey = org.ops4j.pax.web Best - Gerald > Alex Soto hat am 15. Mai 2020 18:38 geschrieben: > > > I’m not sure what is happening, but I noticed, you have ‘basic’ as lowercase, > maybe it is case sensitive. Try uppercase: > > > login.config.authMethod = BASIC > > > Also, what is in your 'etc/jetty.xml’ and ‘etc/org.ops4j.pax.web.cfg’ files ? > > > Best regards, > Alex soto > > > > > > > On May 15, 2020, at 11:22 AM, Gerald Kallas wrote: > > Hi Alex, > > > > yes, I'm passing the HTTP "Authorization" header for basic authentication. > > > > My users.properties looks like > > > > karaf = xxx,_g_:admingroup > > _g_\:admingroup = group,admin,manager,viewer,systembundles,ssh > > > > username1 = password1,admin > > > > I'm testing with the username1 password1 combination, the request looks like > > > > curl --insecure --location --request GET > > 'https://localhost:8443/camel/api/say/hello' \ > > --header 'Authorization: Basic dXNlcm5hbWUxOnBhc3N3b3JkMQ==' > > > > With or without the Authorization header I'm always getting a HTTP 403 > > response. > > > > While trying to access I'm getting a log entry > > > > 2020-05-15T15:20:34,031 | WARN | qtp1611313605-186 | SecurityHandler | 229 > > - org.eclipse.jetty.util - 9.4.22.v20191022 | No authenticator for: > > {RoleInfo,C[admin],None} > > > > Again my org.ops4j.pax.web.context-admin.cfg, it looks like > > > > bundle.symbolicName=api.xml > > login.config.authMethod=Basic > > login.config.realmName=karaf > > context.id (http://context.id)=default > > > > security.constraint.1.url = /camel/api/* > > security.constraint.1.method = * > > security.constraint.1.roles = admin > > > > And my route (Blueprint DSL "api.xml") again as well > > > > http://www.osgi.org/xmlns/blueprint/v1.0.0; > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 > > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> > > > > > > > > > class="org.apache.camel.component.servlet.CamelHttpTransportServlet"/> > > > > > init-method="register" > > destroy-method="unregister"> > > > > > > > > > > > > > > > class="org.apache.camel.component.servlet.ServletComponent" /> > > > > http://camel.apache.org/schema/blueprint;> > > > component="servlet" > > bindingMode="json" > > enableCORS="false" > > skipBindingOnErrorCode="false" > > clientRequestValidation="true"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hello World > > > > > > > > > > > > > > > > Best > > - Gerald > > > > > > > Alex Soto hat am 15. Mai 2020 14:35 geschrieben: > > > > > > > > > Are passing the BASIC Authentication header with user name and password? > > > > > > The user names and roles are defined in the 'etc/users.properties’ file, > > > check Karaf documentation > > > https://karaf.apache.org/manual/latest/#_security_2 > > > <https://karaf.apache.org/manual/latest/#_security_2> > > > > > > > > > The 'security.constraint.1.* entries' in your file > > > 'org.ops4j.pax.web.context-admin.cfg’ define the permissions for each > > > route, just need to add new ones replacing 1 with 2, and so on, the url > > > matching the Camel route. > > > > > > > > > > > > > > > > On May 14, 2020, at 5:17 PM, Gerald Kallas wrote: > > > > > > > > Thanks Alex, > > > > > > > > the API now is working after removing the "httpRegistry" part. > > > > > > > > Now I've the next issue. My org.ops4j.pax.web.context-admin.cfg looks > > &g
Re: Basic authentication of WAB using Jaas in Karaf
Hi Alex, yes, I'm passing the HTTP "Authorization" header for basic authentication. My users.properties looks like karaf = xxx,_g_:admingroup _g_\:admingroup = group,admin,manager,viewer,systembundles,ssh username1 = password1,admin I'm testing with the username1 password1 combination, the request looks like curl --insecure --location --request GET 'https://localhost:8443/camel/api/say/hello' \ --header 'Authorization: Basic dXNlcm5hbWUxOnBhc3N3b3JkMQ==' With or without the Authorization header I'm always getting a HTTP 403 response. While trying to access I'm getting a log entry 2020-05-15T15:20:34,031 | WARN | qtp1611313605-186 | SecurityHandler | 229 - org.eclipse.jetty.util - 9.4.22.v20191022 | No authenticator for: {RoleInfo,C[admin],None} Again my org.ops4j.pax.web.context-admin.cfg, it looks like bundle.symbolicName=api.xml login.config.authMethod=Basic login.config.realmName=karaf context.id=default security.constraint.1.url = /camel/api/* security.constraint.1.method = * security.constraint.1.roles = admin And my route (Blueprint DSL "api.xml") again as well http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> http://camel.apache.org/schema/blueprint;> Hello World Best - Gerald > Alex Soto hat am 15. Mai 2020 14:35 geschrieben: > > > Are passing the BASIC Authentication header with user name and password? > > The user names and roles are defined in the 'etc/users.properties’ file, > check Karaf documentation https://karaf.apache.org/manual/latest/#_security_2 > <https://karaf.apache.org/manual/latest/#_security_2> > > > The 'security.constraint.1.* entries' in your file > 'org.ops4j.pax.web.context-admin.cfg’ define the permissions for each route, > just need to add new ones replacing 1 with 2, and so on, the url matching > the Camel route. > > > > > On May 14, 2020, at 5:17 PM, Gerald Kallas wrote: > > > > Thanks Alex, > > > > the API now is working after removing the "httpRegistry" part. > > > > Now I've the next issue. My org.ops4j.pax.web.context-admin.cfg looks like > > > > bundle.symbolicName=api.xml > > login.config.authMethod=BASIC > > login.config.realmName=karaf > > context.id=default > > > > security.constraint.1.url = /camel/api/* > > security.constraint.1.method = * > > security.constraint.1.roles = admin > > > > Saving this creates the log file entries as below. > > > > The return code with this file is now always a HTTP 403 (forbidden). What > > might be wrong now? > > > > And .. where can I define the roles, users and passwords for each of the > > routes with a servlet consumer? > > > > Best > > - Gerald > > > > 2020-05-14T21:15:18,817 | INFO | fileinstall-/opt/apache-karaf-4.2.7/etc | > > fileinstall | 10 - org.apache.felix.fileinstall - > > 3.6.4 | Updating configuration from org.ops4j.pax.web.context-admin.cfg > > 2020-05-14T21:15:18,819 | INFO | CM Configuration Updater (Update: > > pid=org.ops4j.pax.web.context.1448dbe9-6e82-4f5f-8176-f306ab16640f) | > > HttpContextProcessing| 258 - org.ops4j.pax.web.pax-web-runtime > > - 7.2.11 | Updated configuration for > > pid=org.ops4j.pax.web.context.1448dbe9-6e82-4f5f-8176-f306ab16640f > > 2020-05-14T21:15:18,821 | INFO | paxweb-context-4-thread-22 | > > HttpContextProcessing| 258 - org.ops4j.pax.web.pax-web-runtime > > - 7.2.11 | Found bundle "api.xml", scheduling customization of its > > WebContainer > > 2020-05-14T21:15:18,822 | INFO | paxweb-context-4-thread-22 | > > HttpContextProcessing| 258 - org.ops4j.pax.web.pax-web-runtime > > - 7.2.11 | HTTP Context Processor {bundle=api.xml [326]}: Restoring > > WebContainer for bundle api.xml/0.0.0 > > 2020-05-14T21:15:18,822 | INFO | paxweb-context-4-thread-22 | > > CamelHttpTransportServlet| 288 - org.apache.
Re: Basic authentication of WAB using Jaas in Karaf
Thanks Alex, the API now is working after removing the "httpRegistry" part. Now I've the next issue. My org.ops4j.pax.web.context-admin.cfg looks like bundle.symbolicName=api.xml login.config.authMethod=BASIC login.config.realmName=karaf context.id=default security.constraint.1.url = /camel/api/* security.constraint.1.method = * security.constraint.1.roles = admin Saving this creates the log file entries as below. The return code with this file is now always a HTTP 403 (forbidden). What might be wrong now? And .. where can I define the roles, users and passwords for each of the routes with a servlet consumer? Best - Gerald 2020-05-14T21:15:18,817 | INFO | fileinstall-/opt/apache-karaf-4.2.7/etc | fileinstall | 10 - org.apache.felix.fileinstall - 3.6.4 | Updating configuration from org.ops4j.pax.web.context-admin.cfg 2020-05-14T21:15:18,819 | INFO | CM Configuration Updater (Update: pid=org.ops4j.pax.web.context.1448dbe9-6e82-4f5f-8176-f306ab16640f) | HttpContextProcessing| 258 - org.ops4j.pax.web.pax-web-runtime - 7.2.11 | Updated configuration for pid=org.ops4j.pax.web.context.1448dbe9-6e82-4f5f-8176-f306ab16640f 2020-05-14T21:15:18,821 | INFO | paxweb-context-4-thread-22 | HttpContextProcessing| 258 - org.ops4j.pax.web.pax-web-runtime - 7.2.11 | Found bundle "api.xml", scheduling customization of its WebContainer 2020-05-14T21:15:18,822 | INFO | paxweb-context-4-thread-22 | HttpContextProcessing| 258 - org.ops4j.pax.web.pax-web-runtime - 7.2.11 | HTTP Context Processor {bundle=api.xml [326]}: Restoring WebContainer for bundle api.xml/0.0.0 2020-05-14T21:15:18,822 | INFO | paxweb-context-4-thread-22 | CamelHttpTransportServlet| 288 - org.apache.camel.camel-servlet - 3.0.0 | Destroyed CamelHttpTransportServlet[MyServlet] 2020-05-14T21:15:18,822 | INFO | paxweb-context-4-thread-22 | ContextHandler | 223 - org.eclipse.jetty.util - 9.4.20.v20190813 | Stopped HttpServiceContext{httpContext=DefaultHttpContext [bundle=api.xml [326], contextID=default]} 2020-05-14T21:15:18,823 | INFO | paxweb-context-4-thread-22 | HttpServiceContext | 256 - org.ops4j.pax.web.pax-web-jetty - 7.2.11 | registering JasperInitializer 2020-05-14T21:15:18,902 | INFO | paxweb-context-4-thread-22 | CamelHttpTransportServlet| 288 - org.apache.camel.camel-servlet - 3.0.0 | Initialized CamelHttpTransportServlet[name=MyServlet, contextPath=] 2020-05-14T21:15:18,905 | INFO | paxweb-context-4-thread-22 | ContextHandler | 223 - org.eclipse.jetty.util - 9.4.20.v20190813 | Started HttpServiceContext{httpContext=DefaultHttpContext [bundle=api.xml [326], contextID=default]} 2020-05-14T21:15:18,905 | INFO | paxweb-context-4-thread-22 | HttpContextProcessing| 258 - org.ops4j.pax.web.pax-web-runtime - 7.2.11 | Customizing WebContainer for bundle api.xml/0.0.0 2020-05-14T21:15:18,906 | INFO | paxweb-context-4-thread-22 | HttpContextProcessing| 258 - org.ops4j.pax.web.pax-web-runtime - 7.2.11 | Registering login configuration in WebContainer for bundle "api.xml": method=BASIC, realm=karaf 2020-05-14T21:15:18,908 | INFO | paxweb-context-4-thread-22 | CamelHttpTransportServlet| 288 - org.apache.camel.camel-servlet - 3.0.0 | Destroyed CamelHttpTransportServlet[MyServlet] 2020-05-14T21:15:18,908 | INFO | paxweb-context-4-thread-22 | ContextHandler | 223 - org.eclipse.jetty.util - 9.4.20.v20190813 | Stopped HttpServiceContext{httpContext=DefaultHttpContext [bundle=api.xml [326], contextID=default]} 2020-05-14T21:15:18,909 | INFO | paxweb-context-4-thread-22 | HttpContextProcessing| 258 - org.ops4j.pax.web.pax-web-runtime - 7.2.11 | Registering security mappings in WebContainer for bundle "api.xml": SecurityConstraintsMapping{name='constraint.1', url='/camel/api/*', roles=[admin]} 2020-05-14T21:15:18,909 | INFO | paxweb-context-4-thread-22 | HttpServiceContext | 256 - org.ops4j.pax.web.pax-web-jetty - 7.2.11 | registering JasperInitializer 2020-05-14T21:15:19,003 | INFO | paxweb-context-4-thread-22 | CamelHttpTransportServlet| 288 - org.apache.camel.camel-servlet - 3.0.0 | Initialized CamelHttpTransportServlet[name=MyServlet, contextPath=] 2020-05-14T21:15:19,003 | INFO | paxweb-context-4-thread-22 | ContextHandler | 223 - org.eclipse.jetty.util - 9.4.20.v20190813 | Started HttpServiceContext{httpContext=DefaultHttpContext [bundle=api.xml [326], contextID=default]} > Alex Soto hat am 14. Mai 2020 18:42 geschrieben: > > > Looks good to me: '/camel/api/say/hello' should be correct. > > The only difference I see is that in my case I am not using the > ‘httpRegistry'; try removing that part. > > > Best regards, > Alex soto > > > > > > > On May 14, 2020, at 12:21 P
Availability of camel-netty-http in Camel 3.x?
Hi all, I was reading in the migration documentation "We have removed all deprecated components from Camel 2.x, including the old camel-http, camel-hdfs, camel-mina, camel-mongodb, camel-netty, camel-netty-http, camel-quartz, camel-restlet and camel-rx components." Does that mean that camel-netty-http will be removed soon from Camel 3 (currently it's still available)? Thanks in advance - Gerald
camel-servlet configuration of port, ssl, basic auth?
Dear community, as camel-jetty underpinning securityHandler seems to lack of re-usability (https://issues.apache.org/jira/browse/KARAF-6700,https://issues.apache.org/jira/browse/CAMEL-15000) I'm going to setup a http consumer based on camel-servlet following https://camel.apache.org/components/latest/servlet-component.html (OSGi Blueprint). I wonder if someone could share the experience how to define - port number - SSL properties - basic auth properties Thanks in advance - Gerald
Re: Simple language evaluation camel 3.0.1
Hi Victor, the parameter has been changed to „name“ in Camel 3.x. Sent by my mobile device - Gerald Kallas > Am 02.05.2020 um 05:28 schrieb Vikas Jaiswal : > > I am trying to use simple and have the following in spring xml: > > "header? contains 'HeaderName' and header.HeaderName = > 'TEST'" > > This always evaluated to true irrespective of the value of HeaderName. > > What am I doing wrong here? > > > > Regards, > Vikas >
Blueprint service reference to org.eclipse.jetty.security.ConstraintSecurityHandler ?
Dear community, I'm using in one Blueprint DSL file and want to refer in another on to the service like Finally I'm getting an error Caused by: java.lang.ClassCastException: Cannot cast Proxy01b089da_287a_40a5_987b_b3aa8d37c5b7 to org.eclipse.jetty.server.Handler I wanted to switch to the other interface https://www.eclipse.org/jetty/javadoc/9.4.6.v20170531/org/eclipse/jetty/security/Authenticator.AuthConfiguration.html but the reference causes an missing requirement [isp.jettyHttpComponent.xml [317](R 317.16)] osgi.wiring.package; (osgi.wiring.package=org.eclipse.jetty.security.Authenticator) Unresolved requirements: [[isp.jettyHttpComponent.xml [317](R 317.16)] osgi.wiring.package; (osgi.wiring.package=org.eclipse.jetty.security.Authenticator)] Does anyone have defined a securityHandler and set a Blueprint service reference with this? Many thanks in advance - Gerald
camel-jetty consumers w/ different security handlers on different paths and same port
Dear community, I'd like to share some experience I made with camel-jetty basic authentication. The use case is to have - multiple camel contexts w/ a camel route each - a camel-jetty consumer in each route listening on same port but on a different path - a straightforward securityHandler configuration in the same or a dedicated Blueprint DSL file - for every route an independent enabling / disabling of the authentication on the camel-jetty consumer with the handlers option It doesn't seem to work as expected and I've created a ticket for https://issues.apache.org/jira/browse/CAMEL-14990 It's a very common use case that an authentication could be set on different paths and same port in a different manner. What are your experiences with this? Do I miss something. Any thoughts are highly appreciated. - Gerald
HTTP producer NTLM auth behavior seems to depend on consumer
Hi all, I've a route that calls an endpoint with NTLM auth. It works pretty when calling the route on a HTTP consumer. http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0;> http://camel.apache.org/schema/blueprint;> http://0.0.0.0:8182/NTLM; /> GET http://host?bridgeEndpoint=trueauthMethod=NTLMauthDomain=authUsername=xxxauthPassword=xxxthrowExceptionOnFailure=false; /> When I'm going to change the consumer from HTTP consumer to Timer consumer like http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0;> http://camel.apache.org/schema/blueprint;> GET http://host?bridgeEndpoint=trueauthMethod=NTLMauthDomain=authUsername=xxxauthPassword=xxxthrowExceptionOnFailure=false; /> than I'm getting an error 2020-04-23T22:36:31,980 | WARN | qtp711860658-153 | HttpAuthenticator | 164 - org.apache.httpcomponents.httpclient - 4.5.10 | NEGOTIATE authentication error: Invalid name provided (Mechanism level: KrbException: Cannot locate default realm) It's a bit weird. Same also when I'm changing to a File consumer. Any ideas about this? Thanks in advance - Gerald
Error response from SalesforceHttpClient cutted - possible to extend?
Hi all, I've enabled the DEBUG mode for an error investigation of the camel-salesforce component. The error finally is shown in the log as 2020-04-23T09:42:11,711 | DEBUG | SalesforceHttpClient@4e186e77-171 | HttpReceiver | 223 - org.eclipse.jetty.util - 9.4.20.v20190813 | Response content HttpResponse[HTTP/1.1 500 Server Error]@1900cfc5 DirectByteBufferR@1da39e09[p=788,l=848,c=16384,r=60]={HTTP/1.1 500 Serv...chunked\r\n\r\n3C\r\n<<<[{"error":"500::I...ssful":false}]\n>>>n; charset=UTF-8\r...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00} Unfortunately the interesting part has been cutted of {"error":"500::I...ssful":false} Is there a way to get the detailed message in Karaf log? Thanks in advance - Gerald
camel-salesforce - Subscription fails with a org.cometd.common.TransportException: {httpCode=500}
Hi all, I've following route http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> https://test.salesforce.com;> http://camel.apache.org/schema/blueprint; streamCache="true" useBreadcrumb="true"> The start always fails with (see below). Other Salesforce API calls with same setup are working well. Any ideas? 2020-04-23T09:42:11,817 | DEBUG | SalesforceHttpClient@4e186e77-171 | 511072ca | 57 - cometd-java-client - 4.0.4 | Messages failed [{clientId=xxx, channel=/meta/subscribe, id=228, subscription=/data/AccountChangeEvent}] org.cometd.common.TransportException: {httpCode=500} at org.cometd.client.transport.LongPollingTransport$2.onComplete(LongPollingTransport.java:254) [!/:4.0.4] at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:198) [!/:9.4.20.v20190813] at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:190) [!/:9.4.20.v20190813] at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:444) [!/:9.4.20.v20190813] at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:390) [!/:9.4.20.v20190813] at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:316) [!/:9.4.20.v20190813] at org.eclipse.jetty.http.HttpParser.parseFields(HttpParser.java:1139) [!/:9.4.20.v20190813] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1498) [!/:9.4.20.v20190813] at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172) [!/:9.4.20.v20190813] at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135) [!/:9.4.20.v20190813] at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73) [!/:9.4.20.v20190813] at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133) [!/:9.4.20.v20190813] at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:154) [!/:9.4.20.v20190813] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [!/:9.4.20.v20190813] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [!/:9.4.20.v20190813] at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) [!/:9.4.20.v20190813] at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) [!/:9.4.20.v20190813] at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) [!/:9.4.20.v20190813] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [!/:9.4.20.v20190813] at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [!/:9.4.20.v20190813] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [!/:9.4.20.v20190813] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [!/:9.4.20.v20190813] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [!/:9.4.20.v20190813] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [!/:9.4.20.v20190813] at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [!/:9.4.20.v20190813] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [!/:9.4.20.v20190813] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [!/:9.4.20.v20190813] at java.lang.Thread.run(Unknown Source) [?:?] 2020-04-23T09:42:11,819 | DEBUG | SalesforceHttpClient@4e186e77-171 | 511072ca | 57 - cometd-java-client - 4.0.4 | Failing {clientId=xxx, channel=/meta/subscribe, id=228, subscription=/data/AccountChangeEvent} 2020-04-23T09:42:11,820 | DEBUG | SalesforceHttpClient@4e186e77-171 | SubscriptionHelper | 130 - org.apache.camel.camel-salesforce - 3.0.0 | [CHANNEL:META_SUBSCRIBE]: {failure={exception=org.cometd.common.TransportException: {httpCode=500}, message={clientId=xxx, channel=/meta/subscribe, id=228, subscription=/data/AccountChangeEvent}, httpCode=500, connectionType=long-polling}, channel=/meta/subscribe, id=228,
Re: DeadLetterChannelBuilder in combination w/ doTry/doCatch
Hi Claus, tx for the reply. I already thought about direct send to the DLQ. When I'm going to use a file consumer with a failure directory configured eg http://www.osgi.org/xmlns/blueprint/v1.0.0; > > > > xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 > > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> > > > > > class="org.apache.camel.processor.errorhandler.RedeliveryPolicy"> > > > > > > > > > > > class="org.apache.camel.builder.DeadLetterChannelBuilder"> > > > > > ref="redeliveryPolicyConfig"/> > > > > > > > > > > > > > errorHandlerRef="deadLetterErrorHandler" /> > > > > > > > > https://someFailureEndpoint; /> > > > > > > > > > > java.lang.Exception > > ... > > > > > exceptionType="java.lang.Exception" message="Exception captured."/> > > > > > > > > > > > > > > > > > > > > > > > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2
DeadLetterChannelBuilder in combination w/ doTry/doCatch
Hi all, I've following route. The doCatch should do some specific stuff in case of an error, followed by a general execption thrown for hitting the error handler. I'd expect that in case of an error the message would be sent to the DLQ but this doesn't happen. What I'm doing wrong here? Tx for any hints. Best - Gerald http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> https://someFailureEndpoint; /> java.lang.Exception ...
org.apache.camel.processor.RedeliveryPolicy not found by org.apache.camel.camel-base
I'm working with Camel 3.0.1. When defining as documented I'm getting an error org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to load class org.apache.camel.processor.RedeliveryPolicy from recipe BeanRecipe[name='redeliveryPolicyConfig'] ... Caused by: java.lang.ClassNotFoundException: org.apache.camel.processor.RedeliveryPolicy not found by org.apache.camel.camel-base [94] Does there have something changed in Camel 3? Best - Gerald
Reference to a (SalesforceComponent) bean in another Blueprint DSL file
Dear community, is it possible to split the following Blueprint DSL in 2 ones http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> https://test.salesforce.com/"/> http://camel.apache.org/schema/blueprint; streamCache="true"> where the 1st contains the bean definition for "salesforce" und the 2nd contains the Camel Context with the Camel Routes? Many thanks in advance - Gerald
Re: camel-salesforce
Works like a charm, thanks! It was needed to add 3 different certs to the truststore and finally I got a valid response. I wonder if there's another way to specify the the truststore reference? Best - Gerald > Reji Mathews hat am 21. April 2020 02:55 geschrieben: > > > Create a java keystore file, import the certificate into it and pass the > file along as jvm option. Refer > https://stackoverflow.com/questions/8980364/how-do-i-find-out-what-keystore-my-jvm-is-using > where > author shows how to pass a keystore as jvm option. > > By default, it tries to pick up the cacerts file in your jre folder. > > Cheers > Reji > > On Mon, Apr 20, 2020 at 7:38 PM Gerald Kallas wrote: > > > Dear community, > > > > while connecting to a salesforce instance I'm getting an error > > > > java.lang.RuntimeException: > > org.apache.camel.component.salesforce.api.SalesforceException: Unexpected > > login error: PKIX path building failed: > > sun.security.provider.certpath.SunCertPathBuilderException: unable to find > > valid certification path to requested target > > > > I'm assuming that I need to add the cert from the salesforce instance > > somewhere in the config ("keystore"?) but I'm missing the configuration and > > blueprint syntax details. > > > > Any help is highly appreciated. > > > > The route looks like > > > > http://www.osgi.org/xmlns/blueprint/v1.0.0; > >xmlns:ext=" > > http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > >xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 > > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> > > > > > class="org.apache.camel.component.salesforce.SalesforceComponent"> > > > > > class="org.apache.camel.component.salesforce.SalesforceLoginConfig"> > > https://test.salesforce.com/"/> > > > > > > > > > > > > > > > > > > > > http://camel.apache.org/schema/blueprint; streamCache="true"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > Tx in advance > > - Gerald > >
camel-salesforce
Dear community, while connecting to a salesforce instance I'm getting an error java.lang.RuntimeException: org.apache.camel.component.salesforce.api.SalesforceException: Unexpected login error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target I'm assuming that I need to add the cert from the salesforce instance somewhere in the config ("keystore"?) but I'm missing the configuration and blueprint syntax details. Any help is highly appreciated. The route looks like http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;> https://test.salesforce.com/"/> http://camel.apache.org/schema/blueprint; streamCache="true"> Tx in advance - Gerald
Re: Camel 3.x Message Filter by JSONPath expression?
Found it .. ... $.surnames > Gerald Kallas hat am 6. April 2020 12:08 geschrieben: > > > Dear community, > > is it possible to filter a message by JSONPath als the following snippet? > > > $.names > > > Many thanks in advance > - Gerald
Camel 3.x Message Filter by JSONPath expression?
Dear community, is it possible to filter a message by JSONPath als the following snippet? $.names Many thanks in advance - Gerald
Re: Camel 3.0.1 Jetty HTTP Basic Authentication - configuration in a route following the doc doesn't work
I was changing my DSL as following http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0;> http://camel.apache.org/schema/blueprint;> http://0.0.0.0:8182/hello?handlers=securityHandler; /> Seems that the class org.eclipse.jetty.util.security.Constraint has been replaced with org.eclipse.jetty.util.security.Constraint in Jetty9. Now I'm getting an error org.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property: PropertyDescriptor Jean-Baptiste Onofre hat am 5. April 2020 06:58 > geschrieben: > > > Hi > > I guess the documentation is not aligned with jetty version actually used. > You are using Karaf 4.2.8 ? > > Camel jetty feature uses the jetty version provided by pax-web/karaf, so the > documentation is not maybe correct for 9.4.22/27. > > Regards > JB > > > Le 4 avr. 2020 à 10:08, Gerald Kallas a écrit : > > > > Dear community, > > > > I've configured a route as following snippet (following the documentation > > https://camel.apache.org/components/latest/jetty-component.html) > > > > http://www.osgi.org/xmlns/blueprint/v1.0.0; > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 > > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; > > > > xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0;> > > > > > class="org.eclipse.jetty.http.security.Constraint"> > > > > > > > > > > > > > class="org.eclipse.jetty.security.ConstraintMapping"> > > > > > > > > > > > class="org.eclipse.jetty.security.ConstraintSecurityHandler"> > > > > > class="org.eclipse.jetty.security.authentication.BasicAuthenticator"/> > > > > > > > > > > > > > > > > > > > xmlns="http://camel.apache.org/schema/blueprint?handlers=securityHandler;> > > > > > > http://0.0.0.0:8182/hello; /> > > > > > > > > > > > > > > First of all I got > > > > Unresolved requirements: [[WEBISP001.xml [264](R 264.12)] > > osgi.wiring.package; (osgi.wiring.package=org.eclipse.jetty.http.security)] > > > > Seems also that the construct > > > > > > > > > > > > > > > > is wrong and has been changed from the syntax part. > > > > Could someone post a valid example for this? And .. how to resolve the > > missing bundle? > > > > Thanks in advance > > Gerald
Re: Camel 3.0.1 Jetty HTTP Basic Authentication - configuration in a route following the doc doesn't work
Hi JB, I'm using Karaf 4.2.7 w/ Camel 3.0.1 Best Gerald > Jean-Baptiste Onofre hat am 5. April 2020 06:58 > geschrieben: > > > Hi > > I guess the documentation is not aligned with jetty version actually used. > You are using Karaf 4.2.8 ? > > Camel jetty feature uses the jetty version provided by pax-web/karaf, so the > documentation is not maybe correct for 9.4.22/27. > > Regards > JB > > > Le 4 avr. 2020 à 10:08, Gerald Kallas a écrit : > > > > Dear community, > > > > I've configured a route as following snippet (following the documentation > > https://camel.apache.org/components/latest/jetty-component.html) > > > > http://www.osgi.org/xmlns/blueprint/v1.0.0; > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; > > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 > > https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; > > > > xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0;> > > > > > class="org.eclipse.jetty.http.security.Constraint"> > > > > > > > > > > > > > class="org.eclipse.jetty.security.ConstraintMapping"> > > > > > > > > > > > class="org.eclipse.jetty.security.ConstraintSecurityHandler"> > > > > > class="org.eclipse.jetty.security.authentication.BasicAuthenticator"/> > > > > > > > > > > > > > > > > > > > xmlns="http://camel.apache.org/schema/blueprint?handlers=securityHandler;> > > > > > > http://0.0.0.0:8182/hello; /> > > > > > > > > > > > > > > First of all I got > > > > Unresolved requirements: [[WEBISP001.xml [264](R 264.12)] > > osgi.wiring.package; (osgi.wiring.package=org.eclipse.jetty.http.security)] > > > > Seems also that the construct > > > > > > > > > > > > > > > > is wrong and has been changed from the syntax part. > > > > Could someone post a valid example for this? And .. how to resolve the > > missing bundle? > > > > Thanks in advance > > Gerald
Camel 3.0.1 Jetty HTTP Basic Authentication - configuration in a route following the doc doesn't work
Dear community, I've configured a route as following snippet (following the documentation https://camel.apache.org/components/latest/jetty-component.html) http://www.osgi.org/xmlns/blueprint/v1.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0;> http://camel.apache.org/schema/blueprint?handlers=securityHandler;> http://0.0.0.0:8182/hello; /> First of all I got Unresolved requirements: [[WEBISP001.xml [264](R 264.12)] osgi.wiring.package; (osgi.wiring.package=org.eclipse.jetty.http.security)] Seems also that the construct is wrong and has been changed from the syntax part. Could someone post a valid example for this? And .. how to resolve the missing bundle? Thanks in advance Gerald
Read message body line by line with Camel Groovy in stream mode
Dear community, we want to read with an embedded Groovy script the first line of a (large) file, but in streaming mode. Means that we don't want to process the whole file but only pick up the first line and stop. Any hints are really appreciated. Thanks - Gerald