dev@glassfish.java.net

Re: how to debug ACC code

From: Dies Koper <diesk_at_fast.au.fujitsu.com>
Date: Fri, 12 Feb 2010 14:40:38 +1100

Hi Tim,

> 2. About VMARGS... Strange. GlassFish v3 should continue to work with
> VMARGS. I'll look into that separately.

When I specify the -agentlib option you mentioned into VMARGS it does work.
That gives me the impression the -Xdebug options I used does not work
for Java Agents (maybe it kicks in once main() is called), so it worked
on GFv2.x but not GFv3.

I'll make a note of the -agentlib option you use, it seems more powerful :)

Cheers,
Dies


> 3. In the meantime, you should be able to supply the debugging settings
> on the appclient command itself; in v3 we have tried to make the
> appclient command as much "like" the java command as possible.
>
> What I typically use is
>
> appclient
> -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=12345 ...
>
> although I would think
>
>
> -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=12345
>
>
> would work as well.
>
> - Tim
>
> Dies Koper wrote:
>> Hi Tim,
>>
>> I'm trying to run an EJB client in last week's V3.1 nightly.
>> This application worked in GFv2.1 but now I get the following error:
>>
>> C:\sun\glassfishv3\bin>C:/sun/glassfishv3/glassfish/bin/appclient.bat
>> -client D:/1944/ConnectionPoolValClient.jar returnSetSizeOne
>> java.lang.IllegalArgumentException: URI scheme is not "file"
>> at java.io.File.<init>(File.java:366)
>> at
>> org.glassfish.appclient.client.acc.FacadeLaunchable.selectFacadeFromGroup(FacadeLaunchable.java:345)
>> at
>> org.glassfish.appclient.client.acc.FacadeLaunchable.newFacade(FacadeLaunchable.java:233)
>> at
>> org.glassfish.appclient.client.acc.Launchable$LaunchableUtil.newLaunchable(Launchable.java:101)
>>
>> As the error message doesn't help me to determine what's wrong I'm
>> trying to debug it. I've tried setting VMARGS, but the VM won't halt.
>>
>> set VMARGS=-Xdebug
>> -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=12345
>>
>> What's the trick with GFv3's ACC script to debug it remotely?
>>
>> Thanks,
>> Dies