Question

I am trying to build oozie 4.0 sourcecode downloaded from http://apache.spinellicreations.com/oozie/4.0.1/ . I am able to build the code but in the unable to get the distro created. Below are the logs :

I have tried resetting the heap size values but to no use. Doing it on MAC machine

[ERROR] Java heap space -> [Help 1]
java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOfRange(Arrays.java:3209)
    at java.lang.String.<init>(String.java:215)
    at java.io.DataInputStream.readUTF(DataInputStream.java:644)
    at java.io.DataInputStream.readUTF(DataInputStream.java:547)
    at org.apache.bcel.classfile.ConstantUtf8.<init>(ConstantUtf8.java:54)
    at org.apache.bcel.classfile.Constant.readConstant(Constant.java:144)
    at org.apache.bcel.classfile.ConstantPool.<init>(ConstantPool.java:67)
    at org.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:222)
    at org.apache.bcel.classfile.ClassParser.parse(ClassParser.java:136)
    at org.apache.maven.shared.jar.classes.JarClassesAnalysis.analyze(JarClassesAnalysis.java:92)
    at org.apache.maven.report.projectinfo.dependencies.Dependencies.getJarDependencyDetails(Dependencies.java:276)
    at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderSectionDependencyFileDetails(DependenciesRenderer.java:576)
    at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderBody(DependenciesRenderer.java:271)
    at org.apache.maven.reporting.AbstractMavenReportRenderer.render(AbstractMavenReportRenderer.java:79)
    at org.apache.maven.report.projectinfo.DependenciesReport.executeReport(DependenciesReport.java:206)
    at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
    at org.apache.maven.report.projectinfo.AbstractProjectInfoReport.execute(AbstractProjectInfoReport.java:202)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

Errors are:

[ERROR]
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError 
Was it helpful?

Solution

This error signals that the JVM running Maven has run out of memory. It is caused by maven-compiler-plugin. The best solution to overcome this issue is, edit maven compiler plugin in pom.xml as below.

<plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
            <configuration>
                 <verbose>true</verbose>
                 <fork>true</fork>
                </configuration>
                </plugin>

fork allows running the compiler in a separate process. If false it uses the built in compiler, while if true it will use an executable. Refer below link for more details

https://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top