You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Abhijith Chandrashekar <Ab...@citrix.com> on 2012/10/26 00:49:10 UTC

Build error with Maven for branch - Master

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?

Thanks,
Abhijith



Re: Build error with Maven for branch - Master

Posted by Brett Porter <br...@apache.org>.
On 26/10/2012, at 9:49 AM, Abhijith Chandrashekar <Ab...@citrix.com> 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
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter