Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » OutOfMemoryException
OutOfMemoryException [message #656692] Mon, 28 February 2011 07:54 Go to next message
Lekkie  is currently offline Lekkie Friend
Messages: 1
Registered: February 2011
Junior Member
Hi all,

I have am outofmemoryexception while running an ant script on my eclipse, how do I resolve this?


Buildfile: D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\build.xml
all:
clean:
clean:
clean:
clean:
[delete] Deleting directory D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
clean:
clean:
clean:
clean:
build-common-java.clean:
build-common-web.clean:
clean:
clean-themes:
clean:
clean:
build-common-java.clean:
print-current-time:
[echo] February 27, 2011 at 09:27 AM
start:
compile:
compile:
[mkdir] Created dir: D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
[copy] Copying 1 file to D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
[copy] Copied 262 empty directories to 204 empty directories under D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
[javac] Compiling 3434 source files to D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
[javac] ----------
[javac] 1. ERROR in D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\portal-service\sr c\com\liferay\portlet\social\service\persistence\SocialActiv ityFinderUtil.java (at line 0)
[javac] /**
[javac] ^
[javac] Internal compiler error: java.lang.OutOfMemoryError: Java heap space at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAs CharArray(Util.java:401)
[javac] ----------

BUILD FAILED
D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\build.xml:10: The following error occurred while executing this line:
D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\build.xml:885: The following error occurred while executing this line:
D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\build.xml:129: The following error occurred while executing this line:
D:\Systems Development\Programming\Enterprise Collaboration\Liferay\liferay-portal-trunk\portal-service\bu ild.xml:30: java.lang.reflect.InvocationTargetException

regards.
Re: OutOfMemoryException [message #656815 is a reply to message #656692] Mon, 28 February 2011 17:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Modify the launch to specify JVM arguments (-Xmx<meg>m) for increasing
the heap size.

Lekkie wrote:
> Hi all,
>
> I have am outofmemoryexception while running an ant script on my
> eclipse, how do I resolve this?
>
>
> Buildfile: D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\build.xml
> all:
> clean:
> clean:
> clean:
> clean:
> [delete] Deleting directory D:\Systems
> Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
> clean:
> clean:
> clean:
> clean:
> build-common-java.clean:
> build-common-web.clean:
> clean:
> clean-themes:
> clean:
> clean:
> build-common-java.clean:
> print-current-time:
> [echo] February 27, 2011 at 09:27 AM
> start:
> compile:
> compile:
> [mkdir] Created dir: D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
> [copy] Copying 1 file to D:\Systems
> Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
> [copy] Copied 262 empty directories to 204 empty directories under
> D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
> [javac] Compiling 3434 source files to D:\Systems
> Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
> [javac] ----------
> [javac] 1. ERROR in D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\sr
> c\com\liferay\portlet\social\service\persistence\SocialActiv
> ityFinderUtil.java (at line 0)
> [javac] /**
> [javac] ^
> [javac] Internal compiler error: java.lang.OutOfMemoryError: Java heap
> space at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAs
> CharArray(Util.java:401)
> [javac] ----------
>
> BUILD FAILED
> D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\build.xml:10: The following
> error occurred while executing this line:
> D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\build.xml:885: The
> following error occurred while executing this line:
> D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\build.xml:129: The
> following error occurred while executing this line:
> D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\bu
> ild.xml:30: java.lang.reflect.InvocationTargetException
>
> regards.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: OutOfMemoryException [message #657966 is a reply to message #656692] Fri, 04 March 2011 18:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: coolsnoopy.gmx.net

try the following
- launch ant outside eclipse (nearly always the better way..)
- check your script what it does / should do and correct the error
- give more RAM to your process

> Hi all,
>
> I have am outofmemoryexception while running an ant script on my
> eclipse, how do I resolve this?
>
>
> Buildfile: D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\build.xml
> all:
> clean:
> clean:
> clean:
> clean:
> [delete] Deleting directory D:\Systems
> Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
> clean:
> clean:
> clean:
> clean:
> build-common-java.clean:
> build-common-web.clean:
> clean:
> clean-themes:
> clean:
> clean:
> build-common-java.clean:
> print-current-time:
> [echo] February 27, 2011 at 09:27 AM
> start:
> compile:
> compile:
> [mkdir] Created dir: D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
> [copy] Copying 1 file to D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
> [copy] Copied 262 empty directories to 204 empty directories under
> D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
> [javac] Compiling 3434 source files to D:\Systems
> Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\cl asses
> [javac] ----------
> [javac] 1. ERROR in D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\sr
> c\com\liferay\portlet\social\service\persistence\SocialActiv
> ityFinderUtil.java (at line 0)
> [javac] /**
> [javac] ^
> [javac] Internal compiler error: java.lang.OutOfMemoryError: Java heap
> space at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAs
> CharArray(Util.java:401)
> [javac] ----------
>
> BUILD FAILED
> D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\build.xml:10: The following
> error occurred while executing this line:
> D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\build.xml:885: The following
> error occurred while executing this line:
> D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\build.xml:129: The following
> error occurred while executing this line:
> D:\Systems Development\Programming\Enterprise
> Collaboration\Liferay\liferay-portal-trunk\portal-service\bu ild.xml:30:
> java.lang.reflect.InvocationTargetException
>
> regards.
Re: OutOfMemoryException [message #690206 is a reply to message #657966] Wed, 29 June 2011 07:18 Go to previous message
Kevin Thomas is currently offline Kevin ThomasFriend
Messages: 1
Registered: June 2011
Junior Member
Hello All,

Please check 6 Common Errors in Setting Java Heap Size:
Two JVM options are often used to tune JVM heap size: -Xmx for maximum heap size, and -Xms for initial heap size.
* Missing m, M, g or G at the end (they are case insensitive).
* Extra space in JVM options, or incorrectly use =
* Only setting -Xms JVM option and its value is greater than the default maximum heap size, which is 64m. The default minimum heap size seems to be 0.
* Heap size is larger than your computer's physical memory.
* Incorrectly use mb as the unit, where m or M should be used instead
* The heap size is larger than JVM thinks you would ever need
* The value is not expressed in whole number.

As per my Experience, The error java.lang.OutOfMemoryError: Java heap space where there is no more space available for the Java program.

You should debug application and try to find why your application is taking more space.

You can also increase the Java heap space using following parameters while starting your application:

While running Java program from command line java -Xms5m -Xmx15m yourjavafile

While running tomcat set JAVA_OPTS="-Xms256m -Xmx1024m"

Thanks


Regards
Kevin Thomas
Attune Infocom Inc
Website : attuneinfocom(Dot)com
Email : info@attuneinfocom.com
Liferay Portlet
Previous Topic:Version number not shown when committing under Helios
Next Topic:Eclipse for Java EE doesn't load past Splash Screen
Goto Forum:
  


Current Time: Thu Apr 25 18:54:25 GMT 2024

Powered by FUDForum. Page generated in 0.07892 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top