dev@glassfish.java.net

Re: GlassFish with an external debugger?

From: Jacob Kessler <Jacob.Kessler_at_Sun.COM>
Date: Thu, 07 May 2009 10:52:05 -0700

That seemed to work, thank you very much.

Sahoo wrote:
> OK, now the problem is clear. Try adding com.yourkit.* to list of
> packages mentioned in org.osgi.framework.bootdelegation property in
> glassfish/felix/conf/config.properties.
>
> Sahoo
>
> Jacob Kessler wrote:
>> Yes, Vivek is correct: I meant to say "profiler" rather than
>> "debugger". Since the profiler needs to do code injection, it seems
>> like those methods won't work for profilers.
>>
>> Vivek Pandey wrote:
>>> Right. But how would you run glassfish v3 with YourKit profiler?
>>> AFAIK, the way your run is using
>>> -agentpath:path-to-yourkit-agent.jar. I dont think you can run such
>>> profilers using -Xrunjdwp mechanism.
>>>
>>> -vivek.
>>>
>>> Sahoo wrote:
>>>> I use one of the two ways mentioned by Mitesh and it works for me.
>>>>
>>>> Mitesh Meswani wrote:
>>>>> >java -jar -Xdebug -agentpath:{path to debug script} glassfish.jar.
>>>>> I have never used above method. I use one of following two methods
>>>>> and both still works
>>>>> 1. java -jar -Xdebug
>>>>> -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009
>>>>> Or
>>>>> 2. asadmin start-domain --debug
>>>>> Attach debugger to port 9009
>>>>>
>>>>>
>>>>> Jacob Kessler wrote:
>>>>>> Prior to the Felix classloader changes, I was able to run
>>>>>> GlassFish with (for example) java -jar -Xdebug -agentpath:{path
>>>>>> to debug script} glassfish.jar. With the most recent version, I'm
>>>>>> receiving an error [1] when using those arguments. Is there a new
>>>>>> correct way to attach an external debugger to GlassFish, or is
>>>>>> this a bug?
>>>>>>
>>>>>> [1]
>>>>>> ERROR: Error starting
>>>>>> file:/home/jacob/Glassfish/nightly/glassfish/modules/osgi-main.jar
>>>>>> (org.osgi.framework.BundleException: Activator start error in
>>>>>> bundle com.sun.enterprise.osgi-main [1].)
>>>>>> java.lang.NoClassDefFoundError: com/yourkit/runtime/Callback
>>>>>> at org.jvnet.hk2.osgimain.Main.<clinit>(Main.java)
>>>>>> at
>>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>>>>> Method)
>>>>>> at
>>>>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>>>>>
>>>>>> at
>>>>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>>>>>
>>>>>> at
>>>>>> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>>>>> at java.lang.Class.newInstance0(Class.java:355)
>>>>>> at java.lang.Class.newInstance(Class.java:308)
>>>>>> at
>>>>>> org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3341)
>>>>>>
>>>>>> at org.apache.felix.framework.Felix.startBundle(Felix.java:1453)
>>>>>> at
>>>>>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:984)
>>>>>> at
>>>>>> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:263)
>>>>>>
>>>>>> at java.lang.Thread.run(Thread.java:619)
>>>>>> Caused by: java.lang.ClassNotFoundException:
>>>>>> com.yourkit.runtime.Callback
>>>>>> at
>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:564)
>>>>>>
>>>>>> at
>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:58)
>>>>>>
>>>>>> at
>>>>>> org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1405)
>>>>>>
>>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>>>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>>>>> ... 12 more
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>>
>>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>