Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 53256 invoked from network); 4 Jan 2009 17:00:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jan 2009 17:00:01 -0000 Received: (qmail 7993 invoked by uid 500); 4 Jan 2009 16:59:58 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 7974 invoked by uid 500); 4 Jan 2009 16:59:58 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 7965 invoked by uid 99); 4 Jan 2009 16:59:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jan 2009 08:59:58 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jan 2009 16:59:50 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LJWK1-0006GF-PN for user@geronimo.apache.org; Sun, 04 Jan 2009 08:59:29 -0800 Message-ID: <21278441.post@talk.nabble.com> Date: Sun, 4 Jan 2009 08:59:29 -0800 (PST) From: "Steve H." To: user@geronimo.apache.org Subject: Re: [geronimo] Re: Out of memory during second publish - reproduced & Fixed In-Reply-To: <21196516.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: steve@sjlt.co.uk References: <4935F737.8020402@sengsational.com> <49382E13.207@gmail.com> <4938A182.9010000@gmail.com> <493ADDA6.5020305@sengsational.com> <493CA95C.2080800@gmail.com> <21180759.post@talk.nabble.com> <4955A202.5050502@gmail.com> <21196516.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Tim, I tried deploying directly to Geronimo as you advised. I found I could republish multiple times if Geronimo had been started directly and not by Eclipse. This led me to carefully examining the ps traces running outside eclipse and under eclipse. By moving the JVM parameters to the start of the Eclipse input box I solved the problem. I think the problem was that I had inserted these parameters immediately before the closing ". I think these parameters were not getting through to the JVM invocation. Thanks for your help, Steve Steve H. wrote: > > Hi Tim, > > Thanks for responding so promptly. > > I have followed your advice although I set MaxPermSize to 512m for eclipse > and Geronimo. These settings can be seen in the ps output I posted. > > The artifact I am developing is an experimental EAR. It includes 3 jsp's > but it includes Hibernate POJO's, EJB3 session beans and a Struts > presentation layer. > > The EAR deploys and runs fine under Eclipse. However it generally fails > with a PermGen Space error on the 2nd deployment. Not so good for > development. I am running on a laptop however it has 2 GB RAM. > > Please email me your address and I will send you the EAR. However this > might not be for a couple of weeks. as I'm just going on holiday. I will > send you my email address separately. > > Many thanks for your help, > > Steve > > > Tim McConnell wrote: >> >> Hi Steve, I assume you've gone through the 5 steps I outlined previously >> for >> Dale. You might try increasing you MaxPermsize to 768mb but I doubt >> that'll make >> much difference. Are you able to deploy the artifact to Geronimo outside >> of >> Eclipse (e.g., using the Admin console) ?? Finally, would you be able to >> send me >> the artifact that you're deploying ?? If it's proprietary and you cannot >> I fully >> understand. If not, could you briefly describe the artifact that you are >> deploying (i.e., EAR, WAR, EJB, etc.) ?? >> >> Steve H. wrote: >>> I'm getting this error consistently after increasing the memory >>> allocation >>> for Eclipse and Geronimo. >>> >>> I'm running on OpenSUSE 10.3 x64 with Geronimo 2.1.3 on a machine with >>> 2GB >>> RAM. >>> >>> Output from 'ps aux | grep java' and Eclipse error trace shown below: - >>> >>> Output of 'ps aux | grep java' following PermGen crash in Geronimo. >>> >>> steve 4325 17.9 18.6 1474804 383908 ? Sl 23:43 1:38 >>> /usr/lib64/jvm/java-1.6.0.u7-sun-1.6.0.u7/jre/bin/java -Xmx512m >>> -XX:MaxPermSize=512m -jar >>> /usr/share/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar >>> -os linux -ws gtk -arch x86_64 -showsplash -launcher >>> /usr/share/eclipse/eclipse -name Eclipse --launcher.library >>> /usr/share/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.101.R34x_v20080731/eclipse_1115.so >>> -startup >>> /usr/share/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar >>> -exitdata 160002 -vm /usr/bin/java -vmargs -Xmx512m -XX:MaxPermSize=512m >>> -jar >>> /usr/share/eclipse/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar >>> steve 4835 27.1 14.8 518960 305744 ? Sl 23:44 2:13 >>> /usr/lib64/jvm/java-1.6.0.u7-sun-1.6.0.u7/bin/java >>> -javaagent:/usr/local/geronimo-tomcat6-javaee5-2.1.3/bin/jpa.jar >>> -Djava.ext.dirs=/usr/local/geronimo-tomcat6-javaee5-2.1.3/lib/ext:/usr/lib64/jvm/java-1.6.0.u7-sun-1.6.0.u7/jre/lib/ext >>> -Djava.endorsed.dirs=/usr/local/geronimo-tomcat6-javaee5-2.1.3/lib/endorsed:/usr/lib64/jvm/java-1.6.0.u7-sun-1.6.0.u7/jre/lib/endorsed >>> -Xmx512m -XX:MaxPermSize=512m -Dfile.encoding=UTF-8 -classpath >>> /usr/local/geronimo-tomcat6-javaee5-2.1.3/bin/server.jar >>> org.apache.geronimo.cli.daemon.DaemonCLI --long >>> steve 10155 0.0 0.0 5120 788 pts/1 R+ 23:52 0:00 grep >>> java >>> >>> Trace from Eclipse >>> >>> 23:51:10,653 WARN [Settings] Settings: Could not parse struts.locale >>> setting, substituting default VM locale >>> 23:51:31,757 ERROR [[jsp]] Servlet.service() for servlet jsp threw >>> exception >>> java.lang.OutOfMemoryError: PermGen space >>> at java.lang.ClassLoader.defineClass1(Native Method) >>> at java.lang.ClassLoader.defineClass(ClassLoader.java:620) >>> at >>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) >>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) >>> etc... >>> >>> Output show below: - >>> >>> Tim McConnell wrote: >>>> >>>> That's wonderful Dale !! Please let me know if you have any other >>>> problems. BTW, >>>> I've open the following JIRA to fix similar problems..... >>>> >>>> -----> https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-543 >>>> >>>> DRS2 Usenet wrote: >>>>> Tim McConnell wrote: >>>>> >>>>> (snip) >>>>>> 4. Page down in that section and append your VM arguments at the end >>>>>> -- don't delete those that are already there. I used the same ones >>>>>> that Kevan used, but I'm using Java 1.5 and I see that you're using >>>>>> Java 1.6: >>>>>> >>>>>> -Xmx512m -XX:MaxPermSize=256m >>>>> (snip) >>>>>> Please try this and let me know what happens. I think you'll have >>>>>> better results now. Meanwhile, I'm going to open a GEP JIRA to >>>>>> investigate if we can programmatically determine and set the Geronimo >>>>>> server VM arguments using those already established for Eclipse since >>>>>> obviously the default values for the server are not always >>>>>> sufficient. >>>>>> Thanks much. >>>>> Thanks Tim, That worked great. I'd been using "run configurations" to >>>>> make the Geronimo JVM settings... never tried double clicking on the >>>>> server. I've been able to republish many times without error AND >>>>> without restarting the server (this is really a NICE feature!). >>>>>> >>>>>> Tim McConnell wrote: >>>>>>> Hi Dale, just a quick note to tell you that I can now reproduce your >>>>>>> failure. Looking for a resolution, and will let you know what I find >>>>>>> out..... >>>>>>> >>>>>>> DRS2 Usenet wrote: >>>>>>>> I had already installed jdk1.6.0_06 >>>>>>>> I had already installed Geronimo: >>>>>>>> geronimo-tomcat6-javaee5-2.1.3-bin.zip >>>>>>>> I installed a fresh Ganymede: eclipse-jee-ganymede-SR1-win32.zip >>>>>>>> Added Geronimo 2.1 plugins from within Eclipse. >>>>>>>> Then I deployed a web application. The first time, it deploys >>>>>>>> fine. The second time, I get an out of memory, due to heap space. >>>>>>>> >>>>>>>> The web application may be found here: >>>>>>>> http://www.manning.com/dbrown/SampleApplication.zip >>>>>>>> >>>>>>>> 1) Download the source code from above, and unzip. >>>>>>>> 2) copy Struts2InAction.war to Struts2InAction.zip >>>>>>>> 3) Unzip the Struts2InAction.zip file to a folder called WebContent >>>>>>>> and delete Struts2InAction.zip >>>>>>>> 4) Validate that your WebContent has WEB-INF, index.html, etc. >>>>>>>> 5) In your Eclipse workspace folder, create a folder called >>>>>>>> Struts2InAction, and move your WebContent folder into it. >>>>>>>> 6) Start Eclipse >>>>>>>> 7) Right-click in Project Explorer, New > Project > Web > Dynamic >>>>>>>> Web Project (next) >>>>>>>> 8) Project name: Struts2InAction > select Geronimo 2.1 > (next) >>>>>>>> 9) Leave Context Root and Content Directory, but change Java Source >>>>>>>> Directory to WebContent/WEB-INF/src > (finish) >>>>>>>> 10) Right-click your project > Run As > Run On Server >>>>>>>> 11) Point browser at http://localhost:8080/Struts2InAction >>>>>>>> >>>>>>>> 12) index.html will say "one moment please" while the jsp compiles, >>>>>>>> then the menu will come-up. >>>>>>>> 13) Back in Eclipse, edit (for example) >>>>>>>> WEB-INF/applicationContext.xml with your MySql login and save the >>>>>>>> file. >>>>>>>> 14) Wait for the application to republish itself. >>>>>>>> >>>>>>>> This is where the error occurs: >>>>>>>> >>>>>>>> Deployment failed due to java.lang.OutOfMemoryError: Java heap >>>>>>>> space >>>>>>>> >>>>>>>> I've started Eclipse with -vmargs -Xmx768M and get the same result. >>>>>>>> Not able to put 1024M in there, for some reason (Eclipse won't even >>>>>>>> start). >>>>>>>> >>>>>>>> --Dale-- >>>>>>>> >>>>> >>>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Out-of-memory-during-second-publish---reproduced-tp20805951s134p21278441.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.