[geotk] Out of memory error when decoding CRS

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Wed May 25 09:28:14 EDT 2011


Le 25/05/11 15:13, Riou Olivier a écrit :
> I do not know a lot about the design of geotoolkit, embedded databases and wep 
> apps. Do you mean that geotoolkit is base or some of its modules (like the 
> derby database which  stores the EPSG referencing data) are using web app 
> technologies ?
Actually not, Geotk doesn't use any web-specific technology. Jon's email was 
just saying that if you happen to use Geotk in a web application, you may need 
to restart the web container. But if you uses Geotk as a desktop application, 
then there is nothing special to do.

> In this case, it could explain the problem because I'm also currently 
> investigating on JVM crash on my application which may causes geotoolkit to 
> not initialize properly when restarting the application after the crash ?
If the EPSG database is not corrupted, then there is no particular 
initialization to do after a JVM crash. If the EPSG database is corrupted, just 
deleting the directory that contains this database is suffisient. However given 
that you use a properties file instead than a database, then I think that no 
action is required.

> However, since its a JVM crash, there is no way to call Setup.shutdown() 
> method before the JVM exits and, if it is effectively the cause of the 
> problem, I have to find another workaround. Is this can be fixed if I do not 
> use geotoolkit with an embedded database anymore (only with the epsg.properties) ?
If you don't use Geotk in a context where the library can be loaded/unloaded (or 
deployed/undeployed), then there is no need to invoke Setup.shutdown(). The 
Setup.shutdown() call is needed only if the Geotk library may be reloaded again 
in the /same JVM execution/.

However in case of JVM crash, the EPSG embedded database may still be corrupted, 
in which case just deleting its directory as explained above should work. If the 
JVM terminated normally, or if a Java exception was threw (as opposed to a JVM 
crash in C/C++ native code), then there is no action needed - the embedded 
database should have been automatically closed by the JVM shutdown hooks.

     Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geotoolkit/attachments/20110525/5f652496/attachment-0001.html


More information about the Geotoolkit mailing list