users@glassfish.java.net

Re: java.lang.NoClassDefFoundError: com/sun/demo/jvmti/hprof/Tracker

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Thu, 27 Sep 2012 12:17:29 +0530

The solution looks alright to me. I am surprised that we didn't mention
something like that in our doc. Thanks for reporting.

Sahoo
On Thursday 27 September 2012 11:59 AM, Yuji Kubota wrote:
> Hello, there.
> I want to report the problem and solution when I try to use hprof with
> GlassFish Server Open Source Edition v 3.1.2.2.
>
> * Problem
>
> Set the configuration such as below link (Development Guide) to use hprof.
> http://docs.oracle.com/cd/E18930_01/html/821-2418/beafn.html
> And restart GlassFish Server to enable hprof, however, GlassFish
> Server get java.lang.NoClassDefFoundError and stop with attached
> stacktrace.
>
> After GlassFish Server v 3.1.x (Open Source Edition and Oracle
> GlassFish Server) have same problem.
> I can use hprof with above configuration at GlassFish Server v 3.1.
>
> * Solution
>
> This NoClassDefFoundError are caused by classpath problem of Apache Felix.
> The OSGi bundles which are started by Felix platform can't solve the classpath.
>
> Edit configration file of Apache Felix to add the classpath at
> "org.osgi.framework.bootdelegation".
> $ vi {installdir}/glassfish/config/osgi.properties
> org.osgi.framework.bootdelegation=com.sun.demo.jvmti.hprof,
> com.sun.demo.jvmti.hprof.*, .....
> And restart GlassFish Server to enable hprof.
>
> Thanks,