<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:6950579;
        mso-list-template-ids:488387176;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Wingdings;}
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]-->
</head>
<body bgcolor="white" lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Sorry to join this late &#8211; 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&#8217;t fully understand this type of error, but you might like to try cleanly restarting your app server (if you&#8217;re using one) or increasing the permgen space using a command-line
 switch to the JVM (sorry, can&#8217;t remember what the syntax is!)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">HTH,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Jon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"> geotoolkit-bounces@lists.osgeo.org
 [mailto:geotoolkit-bounces@lists.osgeo.org] <b>On Behalf Of </b>Riou Olivier<br>
<b>Sent:</b> 25 May 2011 05:47<br>
<b>To:</b> 'Martin Desruisseaux'; geotoolkit@lists.osgeo.org; Riou Olivier<br>
<b>Subject:</b> RE: [geotk] Out of memory error when decoding CRS<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue">Hi Martin,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue">I have no log file but I see in the service.properties that it use the derby database.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue">The CRS I try to instantiate are WGS84 (epsg code 4326), WGS72 (epsg code 4322), ED1950 (epsg code 4230), OSGB36 (epsg code 4277), OSSN80 (epsg code 4279) and all
 UTM (epsg codes starting at 32600 and 32700) (epsg.properties in attachment).</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue">The CRS transform I'm currently developping is integrated in real-time SIG application based on Worldwind and which uses many services such communication, database
 ... So it may use a lot of memory, I think I'm going to profile the application because I saw that geotoolkit does not use so much memory.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue">I also have a mistake in my code because I was expecting that geotoolkit was loading only my epsg.properties file but since I use the CRS.decode(...) function, it
 also initialize the embedded database. When I remove the call to this method and load a CRS through the PropertyEpsgFactory it does not initialize the embedded database and use less memory.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue">Olivier</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">-----Message d'origine-----<br>
<b>De&nbsp;:</b> Martin Desruisseaux [mailto:martin.desruisseaux@geomatys.fr]<br>
<b>Envoyé&nbsp;:</b> mardi 24 mai 2011 15:26<br>
<b>À&nbsp;:</b> geotoolkit@lists.osgeo.org; Olivier.Riou@fr.thalesgroup.com<br>
<b>Objet&nbsp;:</b> Re: [geotk] Out of memory error when decoding CRS</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello Olivier<br>
<br>
I just made a try, and I have been able to instantiate EPSG:27572 (&quot;<i>NTF (Paris) / Lambert zone II</i>&quot;) with only 32 Mb (<tt><span style="font-size:10.0pt">java -Xmx32M</span></tt>) using the Derby (a.k.a. JavaDB) database. In order to investigate more,
 the following information would be useful:<o:p></o:p></p>
<ul type="disc">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
Which EPSG code are you instantiating? <o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
Which database are you using? You can find this information from the logs, which should contain a message like: &quot;<i>INFO [ThreadedEpsgFactory] Connecté à la base de données EPSG &quot;jdbc:hsqldb:/Users/desruisseaux/Library/Geotoolkit.org/EPSG/HSQL/7.06&quot; sur &quot;HSQL
 Database Engine&quot;.</i>&quot;. <o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
Is there any other memory-consuming application running in same time.<o:p></o:p></li></ul>
<p class="MsoNormal"><br>
<br>
Le 24/05/11 14:55, Riou Olivier a écrit&nbsp;: <o:p></o:p></p>
<pre>I've got the following error when decoding a CRS from my java application :<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>java.lang.OutOfMemoryError: PermGen space<o:p></o:p></pre>
<pre> at java.lang.ClassLoader.defineClass1(Native Method)<o:p></o:p></pre>
<pre> (...snip...)<o:p></o:p></pre>
<pre> at java.lang.ClassLoader.loadClass(Unknown Source)<o:p></o:p></pre>
<pre> (...snip...)<o:p></o:p></pre>
<pre> at org.geotoolkit.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:636)<o:p></o:p></pre>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
According this stack trace, the <tt><span style="font-size:10.0pt">OutOfMemoryError</span></tt> happen at class loading time. So its look like that the
<tt><span style="font-size:10.0pt">DirectEpsgFactory</span></tt> Geotk code has not been executed at all, since the class did not even had a chance to be loaded in the JVM. I think that something else consumed a huge amount of memory before to reach the point
 where Geotk create a CRS object from an EPSG code.<br>
<br>
Regards,<br>
<br>
&nbsp;&nbsp;&nbsp; Martin<o:p></o:p></p>
</blockquote>
</div>
</body>
</html>