Re: Apache Camel and hawt.io debugging: Body/Header not visible at breakpoint

2022-03-16 Thread Bert Speckels
Sure, I can try :-)

First of all I add the following *dependency to my camel projects pom.xml*


org.apache.camel
camel-management


Then I *start my camel application* with the following VM parameter:

-javaagent:./jolokia-jvm-1.7.1.jar=port=,host=localhost
(the jolokai JAR is stored in my project folder right beside the pom.xml)

Then I *start hawt.io * (via jar or embedded):

java -jar hawtio-app-2.14.5.jar

When all was successful you should be able to *connect* to you camel
application via hawt.to and see a *Camel navigation menu*

http://localhost:8080/hawtio/jvm/connect

There are some more settings to *activate debugging* like
camelContest.setDebugging(true) but these are the required steps to access
Camel JMX via hawt.io.

Don't misundertand the phrase "embedded" concerning hawt.io deployment:
As far as I know this does *not* mean that you *embed hawt.io
 into your own Camel application*.
Embedding means that you write your own "starter application" for hawt.io
instead of starting it via JAR file (like above example) or web container
like tomcat or jetty.
To anyone listening here: Please correct me if I am wrong!

Good look and talk back again if not successful.
Bert Speckels, Germany




Am Mi., 16. März 2022 um 15:23 Uhr schrieb Chirag :

> Bert,
>
> I am trying to build something similar.
> can you point me in the right direction to enabling Jolokia with
> hawtio and camel-main?
> I am currently running embedded hawtio.
>
> ચિરાગ/चिराग/Chirag
> --
> Sent from My Gmail Account
>
> On Mon, Mar 14, 2022 at 2:50 AM Bert Speckels 
> wrote:
> >
> > Yes, maybe. But yesterday evening the situation has changed:
> >
> > After some changes concerning other aspects of my application (like
> > assigning an ID to most of the route nodes) debugging works now
> > including the display of body and headers.
> >
> > I have no clue what changed to make it work.
> > And at the same time my application property
> > "camel.main.debugging=true" failed on startup:
> >
> > Error binding property (camel.main.debugging=true) with name:
> > debugging on bean: org.apache.camel.main.MainConfigurationProperties
> >
> > I had to enabled debugging at the context like this:
> > getContext().setDebugging(true);
> >
> > Has anybody any idea?
> >
> > Am Mo., 14. März 2022 um 06:46 Uhr schrieb Tadayoshi Sato
> > :
> > >
> > > Hi Bert,
> > >
> > > It's likely that the problem is in Hawtio. Hawtio is not yet updated
> with the latest Camel versions.
> > > Feel free to file your issue at
> https://github.com/hawtio/hawtio-integration/issues
> > >
> > > Thanks,
> > > Tadayoshi
> > >
> > > On Mon, Mar 14, 2022 at 3:20 AM Bert Speckels 
> wrote:
> > >>
> > >> Hi
> > >>
> > >> I am quite new with Apache Camel and assigned to this mailing list
> > >> just a few minutes ago.
> > >> So please be kind to me :-D
> > >>
> > >> ---
> > >>
> > >> Until now I was very successful with using Camel. It is exactly what
> > >> we need for our project.
> > >> But I wouldn't write here if I didn't have a problem ...
> > >>
> > >> I'm currently working with Apache Camel and hawt.io for monitoring
> and
> > >> debugging my Camel routes.
> > >> This works wonderfully, even if some important information is somewhat
> > >> hidden in the documentation. For example, it took me a bit to turn on
> > >> debugging.
> > >>
> > >> However, if I set a breakpoint in debugging mode then the message
> > >> processing stops at that point in the route.
> > >> My problem is that I can't see any "body" or "headers" of the Camel
> > >> Exchange at that point.
> > >>
> > >> I've tried all sorts of settings:
> > >> - tracing / backlog tracing enabled on CamelContext
> > >> - tracing / backlog tracing enabled on route
> > >> - Adjusted settings on MBean "BacklogDebugger" and "BacklogTracer".
> > >>
> > >> On the other side tracing works: If I activate tracing in the "Trace"
> > >> tab, I can see the flow of my messages through all nodes of the route.
> > >> Only in "Debugging" tab there is no body nor header when  the route
> > >> stopped at the breakpoint.
> > >>
> > >> Here is some information:
> > >>
> > >> - I don't use any special framework: Plain old Java with a Main method
> > >> in which I start Camel-Main.
> > >> - Apache Camel: 3.14.1
> > >> - Jolokai Agent: 1.7.1
> > >> - hawt.io: 2.14.5
> > >> - Exchange body type: DOMSource
> > >>
> > >> Maybe anyone has an idea what I can try to get the exchange content
> > >> while debugging via jmx/hawt.io
> > >>
> > >> This is my route:
> > >>
> > >> getCamelContext().setBacklogTracing(true);
> > >>
> > >> --
> > >> from(rabbitMqFactory.queueConnect("tso11", "tso11-to-nms",
> "username"))
> > >>   .routeGroup("Workflow")
> > >>   .routeId("Workflow-to-NMS|Map-TSO11-to-NMS42")
> > >>   .routeDescription("Mapping of TSO11 Message to NMS42")
> > >>   .convertBodyTo(DOMSource.class)
> > >>   

Re: Apache Camel and hawt.io debugging: Body/Header not visible at breakpoint

2022-03-16 Thread Chirag
Bert,

I am trying to build something similar.
can you point me in the right direction to enabling Jolokia with
hawtio and camel-main?
I am currently running embedded hawtio.

ચિરાગ/चिराग/Chirag
--
Sent from My Gmail Account

On Mon, Mar 14, 2022 at 2:50 AM Bert Speckels  wrote:
>
> Yes, maybe. But yesterday evening the situation has changed:
>
> After some changes concerning other aspects of my application (like
> assigning an ID to most of the route nodes) debugging works now
> including the display of body and headers.
>
> I have no clue what changed to make it work.
> And at the same time my application property
> "camel.main.debugging=true" failed on startup:
>
> Error binding property (camel.main.debugging=true) with name:
> debugging on bean: org.apache.camel.main.MainConfigurationProperties
>
> I had to enabled debugging at the context like this:
> getContext().setDebugging(true);
>
> Has anybody any idea?
>
> Am Mo., 14. März 2022 um 06:46 Uhr schrieb Tadayoshi Sato
> :
> >
> > Hi Bert,
> >
> > It's likely that the problem is in Hawtio. Hawtio is not yet updated with 
> > the latest Camel versions.
> > Feel free to file your issue at 
> > https://github.com/hawtio/hawtio-integration/issues
> >
> > Thanks,
> > Tadayoshi
> >
> > On Mon, Mar 14, 2022 at 3:20 AM Bert Speckels  
> > wrote:
> >>
> >> Hi
> >>
> >> I am quite new with Apache Camel and assigned to this mailing list
> >> just a few minutes ago.
> >> So please be kind to me :-D
> >>
> >> ---
> >>
> >> Until now I was very successful with using Camel. It is exactly what
> >> we need for our project.
> >> But I wouldn't write here if I didn't have a problem ...
> >>
> >> I'm currently working with Apache Camel and hawt.io for monitoring and
> >> debugging my Camel routes.
> >> This works wonderfully, even if some important information is somewhat
> >> hidden in the documentation. For example, it took me a bit to turn on
> >> debugging.
> >>
> >> However, if I set a breakpoint in debugging mode then the message
> >> processing stops at that point in the route.
> >> My problem is that I can't see any "body" or "headers" of the Camel
> >> Exchange at that point.
> >>
> >> I've tried all sorts of settings:
> >> - tracing / backlog tracing enabled on CamelContext
> >> - tracing / backlog tracing enabled on route
> >> - Adjusted settings on MBean "BacklogDebugger" and "BacklogTracer".
> >>
> >> On the other side tracing works: If I activate tracing in the "Trace"
> >> tab, I can see the flow of my messages through all nodes of the route.
> >> Only in "Debugging" tab there is no body nor header when  the route
> >> stopped at the breakpoint.
> >>
> >> Here is some information:
> >>
> >> - I don't use any special framework: Plain old Java with a Main method
> >> in which I start Camel-Main.
> >> - Apache Camel: 3.14.1
> >> - Jolokai Agent: 1.7.1
> >> - hawt.io: 2.14.5
> >> - Exchange body type: DOMSource
> >>
> >> Maybe anyone has an idea what I can try to get the exchange content
> >> while debugging via jmx/hawt.io
> >>
> >> This is my route:
> >>
> >> getCamelContext().setBacklogTracing(true);
> >>
> >> --
> >> from(rabbitMqFactory.queueConnect("tso11", "tso11-to-nms", "username"))
> >>   .routeGroup("Workflow")
> >>   .routeId("Workflow-to-NMS|Map-TSO11-to-NMS42")
> >>   .routeDescription("Mapping of TSO11 Message to NMS42")
> >>   .convertBodyTo(DOMSource.class)
> >>   .log("Message for '$simple{header:tenant}' received")
> >>   .process(tso11ToNmsMappingProcessor)
> >>   .to("xslt:xslt/tso11-to-nms42.xslt")
> >>   .to("direct:send");
> >> --
> >>
> >> ANd these are current properties:
> >>
> >> --
> >> camel.main.name=TSO11
> >> camel.main.jmxEnabled=true
> >> camel.main.debugging=true
> >> camel.main.backlogTracing=true
> >> camel.main.lightweight=false
> >> camel.main.tracing=false
> >> camel.main.useBreadcrumb=true
> >> --
> >>
> >> Thanks for reading
> >> With kind regards
> >
> >
> >
> > --
> > Tadayoshi Sato


Re: Apache Camel and hawt.io debugging: Body/Header not visible at breakpoint

2022-03-14 Thread Bert Speckels
Yes, maybe. But yesterday evening the situation has changed:

After some changes concerning other aspects of my application (like
assigning an ID to most of the route nodes) debugging works now
including the display of body and headers.

I have no clue what changed to make it work.
And at the same time my application property
"camel.main.debugging=true" failed on startup:

Error binding property (camel.main.debugging=true) with name:
debugging on bean: org.apache.camel.main.MainConfigurationProperties

I had to enabled debugging at the context like this:
getContext().setDebugging(true);

Has anybody any idea?

Am Mo., 14. März 2022 um 06:46 Uhr schrieb Tadayoshi Sato
:
>
> Hi Bert,
>
> It's likely that the problem is in Hawtio. Hawtio is not yet updated with the 
> latest Camel versions.
> Feel free to file your issue at 
> https://github.com/hawtio/hawtio-integration/issues
>
> Thanks,
> Tadayoshi
>
> On Mon, Mar 14, 2022 at 3:20 AM Bert Speckels  wrote:
>>
>> Hi
>>
>> I am quite new with Apache Camel and assigned to this mailing list
>> just a few minutes ago.
>> So please be kind to me :-D
>>
>> ---
>>
>> Until now I was very successful with using Camel. It is exactly what
>> we need for our project.
>> But I wouldn't write here if I didn't have a problem ...
>>
>> I'm currently working with Apache Camel and hawt.io for monitoring and
>> debugging my Camel routes.
>> This works wonderfully, even if some important information is somewhat
>> hidden in the documentation. For example, it took me a bit to turn on
>> debugging.
>>
>> However, if I set a breakpoint in debugging mode then the message
>> processing stops at that point in the route.
>> My problem is that I can't see any "body" or "headers" of the Camel
>> Exchange at that point.
>>
>> I've tried all sorts of settings:
>> - tracing / backlog tracing enabled on CamelContext
>> - tracing / backlog tracing enabled on route
>> - Adjusted settings on MBean "BacklogDebugger" and "BacklogTracer".
>>
>> On the other side tracing works: If I activate tracing in the "Trace"
>> tab, I can see the flow of my messages through all nodes of the route.
>> Only in "Debugging" tab there is no body nor header when  the route
>> stopped at the breakpoint.
>>
>> Here is some information:
>>
>> - I don't use any special framework: Plain old Java with a Main method
>> in which I start Camel-Main.
>> - Apache Camel: 3.14.1
>> - Jolokai Agent: 1.7.1
>> - hawt.io: 2.14.5
>> - Exchange body type: DOMSource
>>
>> Maybe anyone has an idea what I can try to get the exchange content
>> while debugging via jmx/hawt.io
>>
>> This is my route:
>>
>> getCamelContext().setBacklogTracing(true);
>>
>> --
>> from(rabbitMqFactory.queueConnect("tso11", "tso11-to-nms", "username"))
>>   .routeGroup("Workflow")
>>   .routeId("Workflow-to-NMS|Map-TSO11-to-NMS42")
>>   .routeDescription("Mapping of TSO11 Message to NMS42")
>>   .convertBodyTo(DOMSource.class)
>>   .log("Message for '$simple{header:tenant}' received")
>>   .process(tso11ToNmsMappingProcessor)
>>   .to("xslt:xslt/tso11-to-nms42.xslt")
>>   .to("direct:send");
>> --
>>
>> ANd these are current properties:
>>
>> --
>> camel.main.name=TSO11
>> camel.main.jmxEnabled=true
>> camel.main.debugging=true
>> camel.main.backlogTracing=true
>> camel.main.lightweight=false
>> camel.main.tracing=false
>> camel.main.useBreadcrumb=true
>> --
>>
>> Thanks for reading
>> With kind regards
>
>
>
> --
> Tadayoshi Sato


Re: Apache Camel and hawt.io debugging: Body/Header not visible at breakpoint

2022-03-13 Thread Tadayoshi Sato
Hi Bert,

It's likely that the problem is in Hawtio. Hawtio is not yet updated with
the latest Camel versions.
Feel free to file your issue at
https://github.com/hawtio/hawtio-integration/issues

Thanks,
Tadayoshi

On Mon, Mar 14, 2022 at 3:20 AM Bert Speckels 
wrote:

> Hi
>
> I am quite new with Apache Camel and assigned to this mailing list
> just a few minutes ago.
> So please be kind to me :-D
>
> ---
>
> Until now I was very successful with using Camel. It is exactly what
> we need for our project.
> But I wouldn't write here if I didn't have a problem ...
>
> I'm currently working with Apache Camel and hawt.io for monitoring and
> debugging my Camel routes.
> This works wonderfully, even if some important information is somewhat
> hidden in the documentation. For example, it took me a bit to turn on
> debugging.
>
> However, if I set a breakpoint in debugging mode then the message
> processing stops at that point in the route.
> My problem is that I can't see any "body" or "headers" of the Camel
> Exchange at that point.
>
> I've tried all sorts of settings:
> - tracing / backlog tracing enabled on CamelContext
> - tracing / backlog tracing enabled on route
> - Adjusted settings on MBean "BacklogDebugger" and "BacklogTracer".
>
> On the other side tracing works: If I activate tracing in the "Trace"
> tab, I can see the flow of my messages through all nodes of the route.
> Only in "Debugging" tab there is no body nor header when  the route
> stopped at the breakpoint.
>
> Here is some information:
>
> - I don't use any special framework: Plain old Java with a Main method
> in which I start Camel-Main.
> - Apache Camel: 3.14.1
> - Jolokai Agent: 1.7.1
> - hawt.io: 2.14.5
> - Exchange body type: DOMSource
>
> Maybe anyone has an idea what I can try to get the exchange content
> while debugging via jmx/hawt.io
>
> This is my route:
>
> getCamelContext().setBacklogTracing(true);
>
> --
> from(rabbitMqFactory.queueConnect("tso11", "tso11-to-nms", "username"))
>   .routeGroup("Workflow")
>   .routeId("Workflow-to-NMS|Map-TSO11-to-NMS42")
>   .routeDescription("Mapping of TSO11 Message to NMS42")
>   .convertBodyTo(DOMSource.class)
>   .log("Message for '$simple{header:tenant}' received")
>   .process(tso11ToNmsMappingProcessor)
>   .to("xslt:xslt/tso11-to-nms42.xslt")
>   .to("direct:send");
> --
>
> ANd these are current properties:
>
> --
> camel.main.name=TSO11
> camel.main.jmxEnabled=true
> camel.main.debugging=true
> camel.main.backlogTracing=true
> camel.main.lightweight=false
> camel.main.tracing=false
> camel.main.useBreadcrumb=true
> --
>
> Thanks for reading
> With kind regards
>


-- 
Tadayoshi Sato