Re: Hi Guys ... can some one tell what is hashcode in java

2010-09-15 Thread Laird Nelson
On Wed, Sep 15, 2010 at 12:42 PM, Pankaj D pankaj66...@gmail.com wrote:

 What is DYH


Do Your Homework.

Best,
Laird


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-04 Thread Laird Nelson
And the whole thing was a red herring.  Well, most of it anyway.  The
buggy download page wasn't, and, indeed, the GUI monitor cannot change
Tomcat's run as user despite pretending that it can, but those are
comparatively minor issues.

I'm sure that had Tomcat actually run out of memory, it would have dumped
heap.  The webapp in question, however, Hudson, did not have any memory
options set for the massive Maven build it was running, and, since it forks
a Maven process, it was the Maven process which was running out of heap.
Days like this, I tell you.

Thanks for all your help.

Best,
Laird

On Wed, Feb 3, 2010 at 4:53 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Laird Nelson [mailto:ljnel...@gmail.com]
  Subject: Re: Still unable to get a heap dump from Tomcat running on
  Windows as a service
 
  turns out no matter what you do through the GUI console,
  the service still runs as the system account

 Yes, I mentioned that a few days ago:

 BTW, on Vista, you can't seem to change the account the Tomcat service
 runs under with the GUI tool - it has to be done with the Administrative
 Tools - Services snapin; don't know if that's true for Server 2K3.

 http://marc.info/?l=tomcat-userm=126514829321342w=2

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-03 Thread Laird Nelson
Another data point: people have told me to download the Windows .zip
distribution of Tomcat 6.0.24.  I want to point out that this is not linked
anywhere on the Tomcat download page.  The *base* distribution is of course
linked, and the .exe self-extracting-installer package, but I had to
manually add -windows-x86 to cause the Windows distribution (containing
among other things tomcat.exe, service.bat, etc.) to get downloaded.

This was true no matter what mirror I selected.

Best,
Laird


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-03 Thread Laird Nelson
On Wed, Feb 3, 2010 at 9:28 PM, Laird Nelson ljnel...@gmail.com wrote:

 Another data point: people have told me to download the Windows .zip
 distribution of Tomcat 6.0.24.  I want to point out that this is not linked
 anywhere on the Tomcat download page.  The *base* distribution is of
 course linked, and the .exe self-extracting-installer package, but I had to
 manually add -windows-x86 to cause the Windows distribution (containing
 among other things tomcat.exe, service.bat, etc.) to get downloaded.

 This was true no matter what mirror I selected.


Should have been more clear: http://tomcat.apache.org/download-60.cgi has,
at the bottom, a Binary Distributions section, which lists the Core and
Deployer options.  If you hover over the Core .zip option, and then doctor
its URL such that -windows-x86 appears right before the .zip, then you
get the file that people have been recommending I download.

Thanks,
Laird


Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Laird Nelson
I am still unable to get Tomcat to dump heap when it encounters an
OutOfMemoryError.  My StackOverflow topic sums up what I've tried so far:
http://stackoverflow.com/questions/2172220/can-i-get-tomcat-running-as-a-service-to-dump-heap

I'm using the graphical program that comes up when you select Monitor
Tomcat from the Windows Start Menu.  I assume this is TomcatW.exe?

I have Tomcat 6.0.20 running as a service under the default local user
account, set to be allowed to interact with the desktop (I don't know if
this is necessary; I've tried it both ways with no effect on the outcome).

I've attempted to switch the startup mode to java from jvm to see if
that would make a difference, but in that case the service simply won't
start.

I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap to no
avail.  C:\crap is world readable and writable.

I've set the working path for the Startup and Shutdown tabs to C:\crap and
C:/crap with no effect.

I've set memory to a minimum of 512 and a maximum of 1024 MB.

Finally, following the example of what was already there in the text box, I
entered the JVM options one per line.  The tomcat documentation says to
enter them separated by either a # or a ;, but I suspect that the GUI
tool may be taking them and turning line breaks into # characters for me.

Does anyone have any other suggestions to try before giving up on Tomcat in
favor of either Jetty or (God help me) JBoss?

Thanks much,
Laird


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Laird Nelson
On Tue, Feb 2, 2010 at 4:19 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Laird Nelson [mailto:ljnel...@gmail.com]
  Subject: Still unable to get a heap dump from Tomcat running on Windows
  as a service
 
  I am still unable to get Tomcat to dump heap when it encounters an
  OutOfMemoryError.

 You appear to be unique in that regard, since no one else seems to be
 having that problem.


Well aware of that; thanks!  The reason I'm bringing it up on this list is
just because I'm using the graphical tool without doing any egregious
hacking, and it is not working the way I would expect it to.  In such cases
I blame the software until it is proven that I am putting in bad inputs, at
which point I cheerfully blame myself and move on.  No one has accused me so
far of putting in bad inputs, and I can't see any myself.


  I have Tomcat 6.0.20 running as a service under the default
  local user account

 What's a default local user account?


The one selected by default when one chooses the Log On tab of the
graphical Tomcat monitor.  The value of the label is: Local System
account.  That radio button is checked.


  Try using a real account, possibly one in the administrators group to see
 if that makes a difference.


I will try this; thanks.


   set to be allowed to interact with the desktop

 Not needed.


I'll make sure this is off.


   I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap
  to no avail.

 Try just leaving that parameter out.


Yep; tried that too.

The Shutdown working path doesn't matter, since that's not normally used.
  Try setting the Startup path to the Tomcat installation directory after
 reinstalling Tomcat.  The direction of the slash doesn't seem to matter; I
 get the .hprof file generated in the designated directory regardless of
 which I use.


OK.


   I've set memory to a minimum of 512 and a maximum of 1024 MB.

 You normally want those to be the same for a server environment to avoid
 heap thrashing.


OK; will change.


   I entered the JVM options one per line.

 That is a requirement.


Good to know; thanks.


  Does anyone have any other suggestions to try before giving up on
  Tomcat in favor of either Jetty or (God help me) JBoss?

 I would try removing the existing Tomcat service, reinstalling the current
 (6.0.24) Tomcat from the .zip download, using the service.bat script to
 create the service, and only then try recreating the OOM problem.  Unpack
 the .zip download into someplace other than C:\Program Files.  Also try
 setting the Level on the Logging tab to Debug rather than Error to see if
 that shows anything interesting.


OK; for various reasons I can't do the reinstall (without bureaucratic
wrangling).  I did the initial install from the Windows executable installer
available from the main download site.  It was beautifully simple and I let
it set things up for me.  Is there any reason to suppose that such an
installation is somehow borked?  Is there a problem with the out-of-the-box
Windows experience that is heavily promoted on the Apache site?

Thanks for the help!

Best,
Laird


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Laird Nelson
On Tue, Feb 2, 2010 at 4:40 PM, Sateesh Narahari sateesh.narah...@gmail.com
 wrote:

 The default user account 'System' has some weird permission state on
 Windows, so try the admin user.


OK; leery of running my Tomcat as the administrator, but am not up to speed
on which Windows users would be better choices.  I naturally assumed that
the local user selected by default was appropriate.


  Also, review the event log  ( Windows Log,
 Security ) if it yields any information.


Yep; did that; no issues.


 I believe you can also download resource kit from Microsoft that has tools
 that lets you watch all objects opened by a process ( so, look if Tomcat is
 even trying to open the file ). Its been a while, so don't recall tool
 sytax.


Thanks!

Best,
Laird


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Laird Nelson
On Tue, Feb 2, 2010 at 4:41 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

 That's not a user account, that's the system account, with pretty much no
 privileges to do anything.


...which is pretty much how I like it.  :-)  I'm not a Windows guy, so bear
with me for a moment: since I have moved the permissions on the working
directory up such that Everyone has Full Control, surely then the system
account could drop a file in that directory?  Or is there some other
privilege setting that says even if there's permission granted to the
filesystem, the system account shalt not write even unto it?

Thanks again for the help.

Best,
Laird


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

2010-02-02 Thread Laird Nelson
Thanks for sticking with me, guys.  No luck so far.  I will begin the
laborious process of requesting a reinstall.  :-(

(Incidentally, no service logs either, anywhere; this is all very bizarre.)

L

On Tue, Feb 2, 2010 at 7:01 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Filip Hanik - Dev Lists [mailto:devli...@hanik.com]
  Subject: Re: Still unable to get a heap dump from Tomcat running on
  Windows as a service
 
  set the HeapDumpPath option, so you can actually write to a
  location on disk

 You're late to the party; that's already been tried, to no effect.  It's
 not needed if the Startup tab has the Working Path set - which Laird has
 also tried.  Seems to work for everyone but him.

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Getting a heap dump on OOME from Tomcat-as-a-service on Windows?

2010-02-01 Thread Laird Nelson
On Mon, Feb 1, 2010 at 1:32 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 Have you tried the -XX:HeapDumpPath option as well?


Yes, with no results.


 I suspect that your service doesn't have privileges to write to the cwd
 of the java process, so it doesn't write to the file. I don't know much
 about windows privs, but I suspect that writing to %TEMP% will work,
 though I have no idea where %TEMP% points for service runners.


Duh; why didn't I think of that?  Thanks for pointing that out.  I'll try
it.

Best,
Laird


Re: Getting a heap dump on OOME from Tomcat-as-a-service on Windows?

2010-02-01 Thread Laird Nelson
On Mon, Feb 1, 2010 at 1:35 PM, Laird Nelson ljnel...@gmail.com wrote:

 On Mon, Feb 1, 2010 at 1:32 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 Have you tried the -XX:HeapDumpPath option as well?


 Yes, with no results.


 I suspect that your service doesn't have privileges to write to the cwd
 of the java process, so it doesn't write to the file. I don't know much
 about windows privs, but I suspect that writing to %TEMP% will work,
 though I have no idea where %TEMP% points for service runners.


 Duh; why didn't I think of that?  Thanks for pointing that out.  I'll try
 it.


Gave Everyone full control of the C:\crap directory.  Configured Tomcat
through the service monitor to also append -XX:HeapDumpPath=C:\crap to the
list of Java options.  Started and stopped the service.  Ran the build.
Heap dumped, but no file was produced.  Searched the entire computer for
.hprof files; no results.

Anything else before giving up?

Best,
Laird


Re: Getting a heap dump on OOME from Tomcat-as-a-service on Windows?

2010-02-01 Thread Laird Nelson
On Mon, Feb 1, 2010 at 5:41 PM, Sateesh Narahari sateesh.narah...@gmail.com
 wrote:

 When you view service properties, does it run under system account or did
 you give it a specific account to run under.


LocalService I believe.  I didn't give it a specific account to run under.

Best,
Laird


Getting a heap dump on OOME from Tomcat-as-a-service on Windows?

2010-01-31 Thread Laird Nelson
I have Tomcat 6 running as a service on Windows 2003.

I go to the Tomcat service monitor, choose configure, choose the Java tab,
and add:

-XX:+HeapDumpOnOutOfMemoryError

...as one of the Java options.

When the OutOfMemoryError that I'm concerned about hits, I look around on
the disk to find an .hprof file.  I searched the entire computer; no such
file is found.

Any pointers?

Thanks,
Laird