You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Bengt Rodehav <be...@rodehav.com> on 2014/03/18 15:49:03 UTC

Using Java VisualVM profiler in Karaf

I'm using Karaf 2.3.4 currently with Java 6 / 64 bit (1.6.0_32). I've been
using Java VisualVM to monitor threads. But I haven't managed to get the
profiler to work with a Karaf process. As soon as I start the profiling I
get a lot of NoClassDefFoundError's in the Karaf console. I think most of
them refer to the same class:

Exception in thread "qtp1732535673-50" java.lang.NoClassDefFoundError:
org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
        at
org.eclipse.jetty.io.nio.SelectorManager$SelectSet$1.run(SelectorManager.java:716)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:662)

Has anyone got the VisualVM to work with Karaf?

/Bengt

Re: Using Java VisualVM profiler in Karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Agree to add this in users guide.

Regards
JB

On 03/19/2014 09:50 AM, Bengt Rodehav wrote:
> I agree. VisualVM is a big helper. It actually helped me to locate the
> problem (I think). I'll post about that in my previous thread.
>
> Guillaume, perhaps you can add this to the Karaf documentation?
>
> /Bengt
>
>
> 2014-03-19 9:10 GMT+01:00 Claus Ibsen <claus.ibsen@gmail.com
> <ma...@gmail.com>>:
>
>     On Wed, Mar 19, 2014 at 8:48 AM, Bengt Rodehav <bengt@rodehav.com
>     <ma...@rodehav.com>> wrote:
>      > I added ",org.netbeans.lib.profiler.server" to the property
>      > "org.osgi.framework.bootdelegation" and the profiling now seems
>     to work!
>      >
>
>     Ah thanks for sharing.
>
>     Wonder if this can be added to the Karaf documentation somehwere  - as
>     visualvm is a lovely tool, and other people will hit this problem with
>     Karaf.
>
>      > Thanks Guillaume,
>      >
>      > /Bengt
>      >
>      >
>      > 2014-03-18 16:12 GMT+01:00 Bengt Rodehav <bengt@rodehav.com
>     <ma...@rodehav.com>>:
>      >
>      >> I'll try that. Thanks for the tip.
>      >>
>      >> /Bengt
>      >>
>      >> Den 18 mar 2014 16:04 skrev "Guillaume Nodet" <gnodet@apache.org
>     <ma...@apache.org>>:
>      >>
>      >>> Have you tried adding the needed package to the
>      >>> org.osgi.framework.bootdelegation property ? It may help in
>     that case.
>      >>>
>      >>>
>      >>> 2014-03-18 15:49 GMT+01:00 Bengt Rodehav <bengt@rodehav.com
>     <ma...@rodehav.com>>:
>      >>>>
>      >>>> I'm using Karaf 2.3.4 currently with Java 6 / 64 bit
>     (1.6.0_32). I've
>      >>>> been using Java VisualVM to monitor threads. But I haven't
>     managed to get
>      >>>> the profiler to work with a Karaf process. As soon as I start
>     the profiling
>      >>>> I get a lot of NoClassDefFoundError's in the Karaf console. I
>     think most of
>      >>>> them refer to the same class:
>      >>>>
>      >>>> Exception in thread "qtp1732535673-50"
>     java.lang.NoClassDefFoundError:
>      >>>> org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
>      >>>>         at
>      >>>>
>     org.eclipse.jetty.io.nio.SelectorManager$SelectSet$1.run(SelectorManager.java:716)
>      >>>>         at
>      >>>>
>     org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>      >>>>         at
>      >>>>
>     org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>      >>>>         at java.lang.Thread.run(Thread.java:662)
>      >>>>
>      >>>> Has anyone got the VisualVM to work with Karaf?
>      >>>>
>      >>>> /Bengt
>      >>>
>      >>>
>      >
>
>
>
>     --
>     Claus Ibsen
>     -----------------
>     Red Hat, Inc.
>     Email: cibsen@redhat.com <ma...@redhat.com>
>     Twitter: davsclaus
>     Blog: http://davsclaus.com
>     Author of Camel in Action: http://www.manning.com/ibsen
>     Make your Camel applications look hawt, try: http://hawt.io
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Using Java VisualVM profiler in Karaf

Posted by Bengt Rodehav <be...@rodehav.com>.
I agree. VisualVM is a big helper. It actually helped me to locate the
problem (I think). I'll post about that in my previous thread.

Guillaume, perhaps you can add this to the Karaf documentation?

/Bengt


2014-03-19 9:10 GMT+01:00 Claus Ibsen <cl...@gmail.com>:

> On Wed, Mar 19, 2014 at 8:48 AM, Bengt Rodehav <be...@rodehav.com> wrote:
> > I added ",org.netbeans.lib.profiler.server" to the property
> > "org.osgi.framework.bootdelegation" and the profiling now seems to work!
> >
>
> Ah thanks for sharing.
>
> Wonder if this can be added to the Karaf documentation somehwere  - as
> visualvm is a lovely tool, and other people will hit this problem with
> Karaf.
>
> > Thanks Guillaume,
> >
> > /Bengt
> >
> >
> > 2014-03-18 16:12 GMT+01:00 Bengt Rodehav <be...@rodehav.com>:
> >
> >> I'll try that. Thanks for the tip.
> >>
> >> /Bengt
> >>
> >> Den 18 mar 2014 16:04 skrev "Guillaume Nodet" <gn...@apache.org>:
> >>
> >>> Have you tried adding the needed package to the
> >>> org.osgi.framework.bootdelegation property ? It may help in that case.
> >>>
> >>>
> >>> 2014-03-18 15:49 GMT+01:00 Bengt Rodehav <be...@rodehav.com>:
> >>>>
> >>>> I'm using Karaf 2.3.4 currently with Java 6 / 64 bit (1.6.0_32). I've
> >>>> been using Java VisualVM to monitor threads. But I haven't managed to
> get
> >>>> the profiler to work with a Karaf process. As soon as I start the
> profiling
> >>>> I get a lot of NoClassDefFoundError's in the Karaf console. I think
> most of
> >>>> them refer to the same class:
> >>>>
> >>>> Exception in thread "qtp1732535673-50" java.lang.NoClassDefFoundError:
> >>>> org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
> >>>>         at
> >>>>
> org.eclipse.jetty.io.nio.SelectorManager$SelectSet$1.run(SelectorManager.java:716)
> >>>>         at
> >>>>
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> >>>>         at
> >>>>
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> >>>>         at java.lang.Thread.run(Thread.java:662)
> >>>>
> >>>> Has anyone got the VisualVM to work with Karaf?
> >>>>
> >>>> /Bengt
> >>>
> >>>
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> Make your Camel applications look hawt, try: http://hawt.io
>

Re: Using Java VisualVM profiler in Karaf

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Mar 19, 2014 at 8:48 AM, Bengt Rodehav <be...@rodehav.com> wrote:
> I added ",org.netbeans.lib.profiler.server" to the property
> "org.osgi.framework.bootdelegation" and the profiling now seems to work!
>

Ah thanks for sharing.

Wonder if this can be added to the Karaf documentation somehwere  - as
visualvm is a lovely tool, and other people will hit this problem with
Karaf.

> Thanks Guillaume,
>
> /Bengt
>
>
> 2014-03-18 16:12 GMT+01:00 Bengt Rodehav <be...@rodehav.com>:
>
>> I'll try that. Thanks for the tip.
>>
>> /Bengt
>>
>> Den 18 mar 2014 16:04 skrev "Guillaume Nodet" <gn...@apache.org>:
>>
>>> Have you tried adding the needed package to the
>>> org.osgi.framework.bootdelegation property ? It may help in that case.
>>>
>>>
>>> 2014-03-18 15:49 GMT+01:00 Bengt Rodehav <be...@rodehav.com>:
>>>>
>>>> I'm using Karaf 2.3.4 currently with Java 6 / 64 bit (1.6.0_32). I've
>>>> been using Java VisualVM to monitor threads. But I haven't managed to get
>>>> the profiler to work with a Karaf process. As soon as I start the profiling
>>>> I get a lot of NoClassDefFoundError's in the Karaf console. I think most of
>>>> them refer to the same class:
>>>>
>>>> Exception in thread "qtp1732535673-50" java.lang.NoClassDefFoundError:
>>>> org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
>>>>         at
>>>> org.eclipse.jetty.io.nio.SelectorManager$SelectSet$1.run(SelectorManager.java:716)
>>>>         at
>>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>>>>         at
>>>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>>>>         at java.lang.Thread.run(Thread.java:662)
>>>>
>>>> Has anyone got the VisualVM to work with Karaf?
>>>>
>>>> /Bengt
>>>
>>>
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Re: Using Java VisualVM profiler in Karaf

Posted by Bengt Rodehav <be...@rodehav.com>.
I added ",org.netbeans.lib.profiler.server" to the property
"org.osgi.framework.bootdelegation" and the profiling now seems to work!

Thanks Guillaume,

/Bengt


2014-03-18 16:12 GMT+01:00 Bengt Rodehav <be...@rodehav.com>:

> I'll try that. Thanks for the tip.
>
> /Bengt
> Den 18 mar 2014 16:04 skrev "Guillaume Nodet" <gn...@apache.org>:
>
> Have you tried adding the needed package to
>> the org.osgi.framework.bootdelegation property ? It may help in that case.
>>
>>
>> 2014-03-18 15:49 GMT+01:00 Bengt Rodehav <be...@rodehav.com>:
>>
>>> I'm using Karaf 2.3.4 currently with Java 6 / 64 bit (1.6.0_32). I've
>>> been using Java VisualVM to monitor threads. But I haven't managed to get
>>> the profiler to work with a Karaf process. As soon as I start the profiling
>>> I get a lot of NoClassDefFoundError's in the Karaf console. I think most of
>>> them refer to the same class:
>>>
>>> Exception in thread "qtp1732535673-50" java.lang.NoClassDefFoundError:
>>> org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
>>>         at
>>> org.eclipse.jetty.io.nio.SelectorManager$SelectSet$1.run(SelectorManager.java:716)
>>>         at
>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>>>         at
>>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>>>         at java.lang.Thread.run(Thread.java:662)
>>>
>>> Has anyone got the VisualVM to work with Karaf?
>>>
>>> /Bengt
>>>
>>
>>

Re: Using Java VisualVM profiler in Karaf

Posted by Bengt Rodehav <be...@rodehav.com>.
I'll try that. Thanks for the tip.

/Bengt
Den 18 mar 2014 16:04 skrev "Guillaume Nodet" <gn...@apache.org>:

> Have you tried adding the needed package to
> the org.osgi.framework.bootdelegation property ? It may help in that case.
>
>
> 2014-03-18 15:49 GMT+01:00 Bengt Rodehav <be...@rodehav.com>:
>
>> I'm using Karaf 2.3.4 currently with Java 6 / 64 bit (1.6.0_32). I've
>> been using Java VisualVM to monitor threads. But I haven't managed to get
>> the profiler to work with a Karaf process. As soon as I start the profiling
>> I get a lot of NoClassDefFoundError's in the Karaf console. I think most of
>> them refer to the same class:
>>
>> Exception in thread "qtp1732535673-50" java.lang.NoClassDefFoundError:
>> org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
>>         at
>> org.eclipse.jetty.io.nio.SelectorManager$SelectSet$1.run(SelectorManager.java:716)
>>         at
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>>         at
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>>         at java.lang.Thread.run(Thread.java:662)
>>
>> Has anyone got the VisualVM to work with Karaf?
>>
>> /Bengt
>>
>
>

Re: Using Java VisualVM profiler in Karaf

Posted by Guillaume Nodet <gn...@apache.org>.
Have you tried adding the needed package to
the org.osgi.framework.bootdelegation property ? It may help in that case.


2014-03-18 15:49 GMT+01:00 Bengt Rodehav <be...@rodehav.com>:

> I'm using Karaf 2.3.4 currently with Java 6 / 64 bit (1.6.0_32). I've been
> using Java VisualVM to monitor threads. But I haven't managed to get the
> profiler to work with a Karaf process. As soon as I start the profiling I
> get a lot of NoClassDefFoundError's in the Karaf console. I think most of
> them refer to the same class:
>
> Exception in thread "qtp1732535673-50" java.lang.NoClassDefFoundError:
> org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr
>         at
> org.eclipse.jetty.io.nio.SelectorManager$SelectSet$1.run(SelectorManager.java:716)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>         at java.lang.Thread.run(Thread.java:662)
>
> Has anyone got the VisualVM to work with Karaf?
>
> /Bengt
>