On 26/10/2012, at 9:49 AM, Abhijith Chandrashekar 
<[email protected]> wrote:

> Hi,
> 
> When building using Maven, I am facing the following error upon running 'mvn 
> -P developer install':
> 
> ....
> ....
> ....
> 
> [ERROR] BUILD ERROR
> [INFO]-------------------------------------------------------------------------------
> [INFO] Failed to create assembly: Error adding file 'log4j:log4j:jar:1.2.16' 
> to archive: Failed to read filesystem attributes for 
> /root/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar
> 
> Java.io.IOException: error=12, Cannot allocate memory
> 
> ...
> ...
> ...
> [INFO]  Final Memory: 65M/155M
> 
> I'm building in accordance with the steps listed in 
> https://cwiki.apache.org/CLOUDSTACK/cloudstack-devcloud-environment-setup.html
> 
> I thought the VM was low on memory so I increased it from 1024 to 2048 and 
> then to 2442 mb. No change. I have also added the line 'export 
> MAVEN_OPTS=-Xmx2048m' in ~/.profile just in case.
> 
> Any thoughts on what could be wrong?
> 

That's operating system memory, not heap - so you're better off ensuring that 
MAVEN_OPTS has a low/normal -Xms/-Xmx. As you can see, the Maven process is not 
using a lot of Java heap. It could be a number of causes, but this might help: 
http://stackoverflow.com/questions/1124771/how-to-solve-java-io-ioexception-error-12-cannot-allocate-memory-calling-run

- Brett

--
Brett Porter
[email protected]
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter





Reply via email to