[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #YSM-240143]: Problem using as grib parser in tomcat webapp

Hello Giovanni,

I didn't see anything in your code snippet that looked suspicious, but I did a 
little research to try and find out how to diagnose your problem.  One place 
you could start, using an analytical tool, is the Windows program Process 
Explorer, which is available here:


I used this program to look for a file that I knew was open, and it was able to 
confirm that it was open and gave me a PID for the process holding the file 
open.  However, this may not be exceedingly useful, since the process will 
probably be called something anonymous, like "java" ;)

Next, I found several pertinent discussions on how Java handles file.delete() 
in Windows and in general.  Apparently, there is a known problem, but it is 
fairly old and may not apply to this situation:


These three discussions give very good suggestions about closing files in Java 
that appear to be locked.  Among the suggestions is making sure that your 
file.delete() call is executed in a finally block, rather than a try block.  
There are also discussions about garbage collection and how system.gc() may be 


Hopefully, some of the advice on these threads will answer your problem.

  Lansing Madry
  Boulder, Colorado

> Hello,
> it happen in a class that is a Quarz job managed by Spring in a Tomcat web
> app container environment.
> Thanks
> Giovanni
> 2013/3/14 Unidata netCDF Java Support <address@hidden>
> > Hi Giovanni,
> >
> > does it happen in a servlet or web app container environment (Tomcat,
> > jetty...) or you are seeing that also in an isolated context?
> >
> > Cheers!
> >
> > Ticket Details
> > ===================
> > Ticket ID: YSM-240143
> > Department: Support netCDF Java
> > Priority: Normal
> > Status: Open
> >
> >
> --
> Giovanni Congedi
> Via Indipendenza, 164
> Ugento (LE)
> Italy
> Cell: 328 5416044

Ticket Details
Ticket ID: YSM-240143
Department: Support netCDF Java
Priority: Normal
Status: Open