dev@glassfish.java.net

Re: Debugging Glassfish itself

From: Stijn de Witt <StijnDeWitt_at_chello.nl>
Date: Tue, 4 May 2010 18:52:43 +0200

Thanks Lee and Sudarsan!

The issue I have is that my JDBCRealm setup seems Ok (I see realm being
loaded) but I am unable to login. I have manually inserted a username and
password in the DB (and set digest to none) but still it will not let me in
with those credentials. The error messages are really vague (basically it
just throws generic LoginException) so that is why I wanted to debug.

Lee, I am using Eclipse and an excellent Eclipse plugin for Glassfish so I
can launch Glassfish from Eclipse... But maybe I should try to start it from
the commandline instead to be able to debug?

I am going to try out your suggestions right away and will let you know how
it worked out! Thanks for your quick replies!

-Stijn

----- Original Message -----
From: "Justin Lee" <justin.d.lee_at_oracle.com>
To: <dev_at_glassfish.dev.java.net>
Cc: "Stijn de Witt" <StijnDeWitt_at_chello.nl>
Sent: Tuesday, May 04, 2010 6:29 PM
Subject: Re: Debugging Glassfish itself


> Edit domain.xml and look for "suspend=n". Change that to 'y'. Start
> glassfish in a debug VM (pass --debug to start-domain). Using your IDE
> debugger, attach to a remote process with 9009. The VM will pause until
> you attach with a debugger but then all your breakpoints should work just
> fine.
>
> Now your IDE may support glassfish natively (netbeans does, iirc) but this
> is portable across IDEs at least and will get you started.
>
> On 5/4/10 12:26 PM, Stijn de Witt wrote:
>> Hi,
>>
>> Does anyone here know how to debug Glassfish itself?
>>
>> I am having trouble setting up a JDBCRealm so I would like to attach a
>> debugger to a running Glassfish server, tell the debugger where the
>> source is and then set a breakpoint in the JDBCRealm and JDBCLoginModule
>> classes so I can figure out what is happening.
>>
>> I am using Glassfish v3 and have already downloaded the source code from
>> the SVN repository at
>> https://svn.dev.java.net/svn/glassfish-svn/trunk/v3
>>
>> ..as described here:
>> http://wiki.glassfish.java.net/Wiki.jsp?page=V3FullBuildInstructions
>>
>> I would prefer to debug using Eclipse, but I'm willing to switch to
>> Netbeans or any other IDE, so if you have instructions for some other IDE
>> no problem.
>>
>> I have already asked this question on the Users list, but nobody there
>> seemed to know how to do it. I also couldn't find anything on the net,
>> most people are describing how to debug apps running inside Glassfish,
>> but not how to debug Glassfish itself.
>>
>> Thanks in advance for any help! With kind regards,
>>
>> -Stijn
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>