Gerrit Compilation Error

125 views
Skip to first unread message

Luciano Carvalho

unread,
Sep 30, 2009, 2:35:36 PM9/30/09
to repo-d...@googlegroups.com
I have just downloaded and installed Apache Maven.

I'm trying to compile my changes in Gerrit for the first time, and I'm getting the following error:


[INFO] Compiling 496 source files to /usr/lscarval/gerrit2/gerrit/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:


I could not find anything in the documentation that says what's the minimum required version of JDK I should have installed. 
Our servers here have 1.5.

Here is the output for:  mvn --version

Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
Java version: 1.5.0_17
Java home: /apps/android/jdk1.5.0_17/jre
Default locale: en_US, platform encoding: ISO-8859-15
OS name: "linux" version: "2.6.18-128.1.1.el5pae" arch: "i386" Family: "unix"


How can I fix that?

Thanks,

Luciano.

Shawn Pearce

unread,
Sep 30, 2009, 2:41:28 PM9/30/09
to repo-d...@googlegroups.com
On Wed, Sep 30, 2009 at 11:35, Luciano Carvalho <lsca...@gmail.com> wrote:
> I could not find anything in the documentation that says what's the minimum
> required version of JDK I should have installed.
> Our servers here have 1.5.
> Here is the output for:  mvn --version
> Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
> Java version: 1.5.0_17
> Java home: /apps/android/jdk1.5.0_17/jre

Gerrit requires Java 6... both for compilation, and for runtime.

I've never seen this error before, but given that the JDK is too old,
I would suggest installing a recent Java 6 JDK and trying again.

Luciano Carvalho

unread,
Sep 30, 2009, 3:08:29 PM9/30/09
to repo-d...@googlegroups.com
Fixed :

$ mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
Java version: 1.6.0_10
Java home: /apps/android/jdk1.6.0_10/jre
Default locale: en_US, platform encoding: ISO-8859-15
OS name: "linux" version: "2.6.18-128.1.1.el5pae" arch: "i386" Family: "unix"


Now I have another error, happening when I try to build 2.0.22 from source as well:


[ERROR] Failed to unpack native libraries required to run hosted browser
org.codehaus.plexus.archiver.ArchiverException: Error while expanding /home/wlc039/.m2/repository/com/google/gwt/gwt-dev/1.7.0/gwt-dev-1.7.0-linux-libs.zip
        at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.execute(AbstractZipUnArchiver.java:132)
        at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:108)
        at org.codehaus.mojo.gwt.AbstractGwtMojo.unpackNativeLibraries(AbstractGwtMojo.java:391)
        at org.codehaus.mojo.gwt.AbstractGwtMojo.getGwtRuntimeForVersion(AbstractGwtMojo.java:364)
        at org.codehaus.mojo.gwt.AbstractGwtMojo.getGwtRuntime(AbstractGwtMojo.java:284)
        at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:128)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.io.IOException: Negative seek offset
        at java.io.RandomAccessFile.seek(Native Method)
        at org.codehaus.plexus.archiver.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:383)
        at org.codehaus.plexus.archiver.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:254)
        at org.codehaus.plexus.archiver.zip.ZipFile.<init>(ZipFile.java:148)
        at org.codehaus.plexus.archiver.zip.AbstractZipUnArchiver.execute(AbstractZipUnArchiver.java:113)
        ... 24 more

[ERROR] BUILD ERROR


Any help would be really appreciated.

Thanks,

Luciano

Shawn Pearce

unread,
Sep 30, 2009, 3:17:24 PM9/30/09
to repo-d...@googlegroups.com
On Wed, Sep 30, 2009 at 12:08, Luciano Carvalho <lsca...@gmail.com> wrote:
> Now I have another error, happening when I try to build 2.0.22 from source
> as well:
>
> [ERROR] Failed to unpack native libraries required to run hosted browser
> org.codehaus.plexus.archiver.ArchiverException: Error while expanding
> /home/wlc039/.m2/repository/com/google/gwt/gwt-dev/1.7.0/gwt-dev-1.7.0-linux-libs.zip
...

> Caused by: java.io.IOException: Negative seek offset

Huh, never seen that one before either.

FWIW, I've been building with Maven 2.0.9. Not sure if this is a
Maven bug, a bug in the JDK you are running, or maybe some corruption
that gwt-dev-1.7.0-linux-libs.zip file. I would try deleting the
latter (or its parent directory) and seeing if Maven can redownload
and unpack it. I doubt there is a bug in the JDK's zip handling code,
and it looks like Maven is using it so I'm not sure how a bug in Maven
could cause this error. Thus I'm suspecting something is wrong with
the archive file.

Luciano Carvalho

unread,
Sep 30, 2009, 4:12:04 PM9/30/09
to repo-d...@googlegroups.com
[INFO] BUILD SUCCESSFUL

the problem was disk quota space... I fixed it now.

Thanks!
Reply all
Reply to author
Forward
0 new messages