<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2900.3792" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><SPAN class=798082112-25052011><FONT face=Arial color=#0000ff size=2>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&nbsp; stores the EPSG referencing data) are using web app 
technologies ?</FONT></SPAN></DIV>
<DIV><SPAN class=798082112-25052011><FONT face=Arial color=#0000ff size=2>In 
this case, it&nbsp;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 
?</FONT></SPAN></DIV>
<DIV><SPAN class=798082112-25052011><FONT face=Arial color=#0000ff size=2>My 
application is not a web app but it&nbsp;uses&nbsp;an embedded OpenEJB server 
and Hibernate to access to a mysql database so, even if geotoolkit does not use 
web technologies, I think that&nbsp;geotoolkit classes are deployed through the 
EJB server. As I said,&nbsp;I do not know very well&nbsp;EJB, perhaps some one 
can confirm this.</FONT></SPAN></DIV>
<DIV><SPAN class=798082112-25052011><FONT face=Arial color=#0000ff 
size=2>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) 
?</FONT></SPAN></DIV>
<DIV><SPAN class=798082112-25052011><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=798082112-25052011><FONT face=Arial color=#0000ff 
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=798082112-25052011><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=798082112-25052011><FONT face=Arial color=#0000ff 
size=2>Olivier</FONT></SPAN></DIV>
<DIV><SPAN class=798082112-25052011><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=798082112-25052011></SPAN><FONT face=Tahoma size=2>-----Message 
d'origine-----<BR><B>De&nbsp;:</B> Martin Desruisseaux 
[mailto:martin.desruisseaux@geomatys.fr]<BR><B>Envoyé&nbsp;:</B> mercredi 25 mai 
2011 13:20<BR><B>À&nbsp;:</B> geotoolkit@lists.osgeo.org<BR><B>Cc&nbsp;:</B> Jon 
Blower; Riou Olivier<BR><B>Objet&nbsp;:</B> Re: [geotk] Out of memory error when 
decoding CRS<BR><BR></DIV></FONT>
<BLOCKQUOTE>Le 25/05/11 12:52, Jon Blower a écrit&nbsp;: 
  <BLOCKQUOTE 
  cite=mid:D38DCA8842FECD4585C8DE16D602ABF41708C5@vime-mbx1.rdg.ac.uk 
  type="cite">
    <META content="Microsoft Word 14 (filtered&#13;&#10;        medium)" 
    name=Generator>
    <STYLE>@font-face {
        font-family: Wingdings;
}
@font-face {
        font-family: Wingdings;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: Consolas;
}
@page WordSection1 {size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; COLOR: black; FONT-FAMILY: "Times New Roman","serif"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; COLOR: black; FONT-FAMILY: "Times New Roman","serif"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; COLOR: black; FONT-FAMILY: "Times New Roman","serif"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
PRE {
        FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; COLOR: black; FONT-FAMILY: "Courier New"; mso-style-priority: 99; mso-style-link: "HTML Preformatted Char"
}
TT {
        FONT-FAMILY: "Courier New"; mso-style-priority: 99
}
P.MsoAcetate {
        FONT-SIZE: 8pt; MARGIN: 0cm 0cm 0pt; COLOR: black; FONT-FAMILY: "Tahoma","sans-serif"; mso-style-priority: 99; mso-style-link: "Balloon Text Char"
}
LI.MsoAcetate {
        FONT-SIZE: 8pt; MARGIN: 0cm 0cm 0pt; COLOR: black; FONT-FAMILY: "Tahoma","sans-serif"; mso-style-priority: 99; mso-style-link: "Balloon Text Char"
}
DIV.MsoAcetate {
        FONT-SIZE: 8pt; MARGIN: 0cm 0cm 0pt; COLOR: black; FONT-FAMILY: "Tahoma","sans-serif"; mso-style-priority: 99; mso-style-link: "Balloon Text Char"
}
SPAN.HTMLPreformattedChar {
        COLOR: black; FONT-FAMILY: Consolas; mso-style-priority: 99; mso-style-link: "HTML Preformatted"; mso-style-name: "HTML Preformatted Char"
}
SPAN.EmailStyle20 {
        COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-reply
}
SPAN.BalloonTextChar {
        COLOR: black; FONT-FAMILY: "Tahoma","sans-serif"; mso-style-priority: 99; mso-style-link: "Balloon Text"; mso-style-name: "Balloon Text Char"
}
.MsoChpDefault {
        FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.WordSection1 {
        page: WordSection1
}
OL {
        MARGIN-BOTTOM: 0cm
}
UL {
        MARGIN-BOTTOM: 0cm
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
    <DIV class=WordSection1>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 11pt; COLOR: rgb(31,73,125); FONT-FAMILY: 'Calibri','sans-serif'"><O:P></O:P>Sorry 
    to join this late - I notice that this is a PermGen memory error, which is 
    connected with classloading, not heap memory usage.&nbsp; This commonly 
    happens when redeploying a web application without a clean restart of the 
    app server.&nbsp; I don't fully understand this type of error, but you might 
    like to try cleanly restarting your app server (if you're using one) or 
    increasing the permgen space using a command-line switch to the JVM (sorry, 
    can't remember what the syntax is!)</SPAN></P></DIV></BLOCKQUOTE><BR>Thanks 
  for the feedback. Actually there is known issues in Geotk regarding 
  undeployment: some threads are not killed and some 
  <TT>java.lang.ThreadLocal</TT> variables are not cleared, which prevent the 
  JVM to unload every Geotk classes before to reload them when 
  redeploying.<BR><BR>An attempt to mitigate the problem has been provided with 
  the <A 
  href="http://www.geotoolkit.org/apidocs/org/geotoolkit/lang/Setup.html#shutdown%28%29"><TT>Setup.shutdown()</TT></A> 
  static method, which can be invoked when you know that your application is 
  about to be undeployed (if possible). However this does not solve all issues. 
  We are investigating usage of JSR-330 and OSGi (now that Oracle confirmed that 
  JDK-8 will be compatible with OSGi) as a better fix (but we will not force 
  user to use OSGi).<BR><BR>In the maintime the workaround proposed by Jon still 
  the most reliable approach.<BR><BR>&nbsp;&nbsp;&nbsp; 
Martin<BR><BR></BLOCKQUOTE></BODY></HTML>