1

I created a sample JSF/JDBC project in Eclipse Indigo which is deployed to Tomcat 7. When I put mysql-connector-java-5.1.21.jar in /WEB-INF/lib, then I get the following errors:

One from Eclipse:

Server Tomcat v7.0 Server at localhost (8) was unable to start within 120 seconds. If the server requires more time, try increasing the timeout in the server editor.

And another one from Tomcat:

SEVERE: Error waiting for multi-thread deployment of context descriptors to complete
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:574)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1413)

How are they caused and how can I solve it?

1

3 Answers 3

3

As the error says, you are out of heap space. Try to provide more heap by giving following JVM argument when starting tomcat:

java -Xmx1024m

Actual "right" amount depends about your hardware setup and requirements of application.

Sign up to request clarification or add additional context in comments.

Comments

1

Tomcat is the process running out of memory, not Eclipse. Open the Tomcat instance from your Servers view and edit its Launch Configuration. From the Arguments tab, give it a larger maximum heap size.

2 Comments

img23.imageshack.us/img23/1525/errordh.jpg Where should i increase the heap size? Plz help meeeeeee...
Right there in the VM arguments field.
0

stop Tomcat v7.0 server and again run it. You can try to change java heap size

Edit eclipse-home/eclipse.ini to be something like the following and restart Eclipse. -vmargs -Xms256m -Xmx1024m

3 Comments

I found the eclipse configuration file.How to edit values? How much will i put?Plz explain me???
you can put minimum 256m and maximum 1024m
-startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502 -product org.eclipse.epp.package.jee.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms1024m -Xmx1024m Is it correct ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.