Hi Dale, sorry to take so long -- I should have recognized this immediately. What is not always obvious when using the GEP is that there really are two JVM's running: one for Eclipse and another one for the Geronimo server. And unfortunately, the JVM arguments you establish for Eclipse do not apply to the Geronimo server. To adjust the JVM arguments for the Geronimo server do this:

1.  In Eclipse make sure the server is stopped

2. Go to the Servers view in Eclipse (i.e., the same view that you use to start/stop the server), and double-click on the server. This will bring up the Overview panel for the server, which is essentially the properties editor for the Geronimo server adapter.

3. Page down and on the right side you'll see the section title "Server VM Arguments"

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

5. Close the editor and save your changes. Now the server will pick up these new VM arguments when you restart it and you can deploy/redeploy as many times as you wish. I did it at least five times in the same Eclipse invocation using the instructions you provided (i.e., editing the applicationContext.xml) and it worked fine for me, whereas before I couldn't even deploy it the first time successfully.

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.


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 <http://localhost:8080/HelloWorld> 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--


Reply via email to