You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Mehrle <mm...@gmail.com> on 2008/02/26 02:27:10 UTC
Strange maven compile error
I am suddenly experiencing a strange error when compiling my project (see
stack trace below) - the maven compile plugin crashes and then refers to
some compiler error which cannot be parced. It even asks me to submit a bug
report with the JDC - never encountered anything like this in 12 years of
Java coding.
Strangely - my Eclipse IDE using the *same* JRE (1.5.0.13) is able to
compile the very same code without any problems. But as soon as I try to do
it with maven (in and outside of Eclipse) I get this error). This is
happening on Linux and OS X.
ANY input would be appreciated - this has put our entire project on hold for
an entire day - we have no idea how to fix this.
Stack trace:
[INFO] [compiler:compile]
[INFO] Compiling 455 source files to
/Users/michael/test/trunk/target/classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.5.0_13). Please file a bug at
the Java Developer Connection (http://java.sun.com/webapps/bugreport) after
checking the Bug Parade for duplicates. Include your program and the
following diagnostic in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.tree.TreeMaker.Ident(TreeMaker.java:413)
at com.sun.tools.javac.comp.Lower.access(Lower.java:956)
at com.sun.tools.javac.comp.Lower.access(Lower.java:1048)
at com.sun.tools.javac.comp.Lower.makeOwnerThis(Lower.java:1379)
at com.sun.tools.javac.comp.Lower.accessBase(Lower.java:874)
at com.sun.tools.javac.comp.Lower.access(Lower.java:1034)
at com.sun.tools.javac.comp.Lower.visitIdent(Lower.java:2749)
at com.sun.tools.javac.tree.Tree$Ident.accept(Tree.java:1003)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.visitApply(Lower.java:2474)
at com.sun.tools.javac.tree.Tree$Apply.accept(Tree.java:813)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1893)
at com.sun.tools.javac.comp.Lower.visitReturn(Lower.java:2954)
at com.sun.tools.javac.tree.Tree$Return.accept(Tree.java:768)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.tree.TreeTranslator.translate(
TreeTranslator.java:54)
at com.sun.tools.javac.tree.TreeTranslator.visitBlock(
TreeTranslator.java:145)
at com.sun.tools.javac.comp.Lower.visitBlock(Lower.java:2927)
at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:535)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.tree.TreeTranslator.visitMethodDef(
TreeTranslator.java:129)
at com.sun.tools.javac.comp.Lower.visitMethodDefInternal(Lower.java
:2267)
at com.sun.tools.javac.comp.Lower.visitMethodDef(Lower.java:2186)
at com.sun.tools.javac.tree.Tree$MethodDef.accept(Tree.java:478)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.visitClassDef(Lower.java:1989)
at com.sun.tools.javac.tree.Tree$ClassDef.accept(Tree.java:434)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.visitNewClass(Lower.java:2326)
at com.sun.tools.javac.tree.Tree$NewClass.accept(Tree.java:839)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1893)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1921)
at com.sun.tools.javac.comp.Lower.visitNewArray(Lower.java:3003)
at com.sun.tools.javac.tree.Tree$NewArray.accept(Tree.java:855)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1893)
at com.sun.tools.javac.comp.Lower.boxArgs(Lower.java:2517)
at com.sun.tools.javac.comp.Lower.visitNewClass(Lower.java:2288)
at com.sun.tools.javac.tree.Tree$NewClass.accept(Tree.java:839)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1893)
at com.sun.tools.javac.comp.Lower.boxArgs(Lower.java:2517)
at com.sun.tools.javac.comp.Lower.visitApply(Lower.java:2420)
at com.sun.tools.javac.tree.Tree$Apply.accept(Tree.java:813)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.tree.TreeTranslator.visitExec(
TreeTranslator.java:227)
at com.sun.tools.javac.tree.Tree$Exec.accept(Tree.java:728)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.visitMethodDefInternal(Lower.java
:2230)
at com.sun.tools.javac.comp.Lower.visitMethodDef(Lower.java:2186)
at com.sun.tools.javac.tree.Tree$MethodDef.accept(Tree.java:478)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.visitClassDef(Lower.java:1989)
at com.sun.tools.javac.tree.Tree$ClassDef.accept(Tree.java:434)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.visitClassDef(Lower.java:1989)
at com.sun.tools.javac.tree.Tree$ClassDef.accept(Tree.java:434)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1881)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:1901)
at com.sun.tools.javac.comp.Lower.translateTopLevelClass(Lower.java
:3064)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java
:487)
at com.sun.tools.javac.main.Main.compile(Main.java:592)
at com.sun.tools.javac.main.Main.compile(Main.java:544)
at com.sun.tools.javac.Main.compile(Main.java:85)
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:585)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess
(JavacCompiler.java:420)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(
JavacCompiler.java:141)
at org.apache.maven.plugin.AbstractCompilerMojo.execute(
AbstractCompilerMojo.java:493)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java
:114)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:447)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:539)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:459)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
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:585)
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)
Re: Strange maven compile error
Posted by Wayne Fay <wa...@gmail.com>.
Compile directly with javac, set your classpath manually with -cp, and
use -verbose so you know what class (and line?) it quits on. Its also
possible (likely?) that a similar verbose setting may exist in plexus
compiler, but I'm just not sure and I haven't looked, so you might be
able to get the same info directly out of Maven, but I find it pretty
simple to debug this kind of problem with javac directly.
Wayne
On 2/26/08, Michael Mehrle <mm...@gmail.com> wrote:
> That makes sense actually - thanks. However, it doesn't give me much hope...
> Question: how were you able to find the piece of code that was triggering
> this error? We have a mixed dev environment and it's pretty unrealistic that
> everyone is going to update their JDK (and to do it on our servers) just to
> fix that one piece of code that breaks an entire build?
>
> I know this is not maven specific and this is my last post on this - if
> anyone has any ideas on how to narrow down what breaks the compiler I'd
> REALLY appreciate ;-)
>
> Michael
>
> On Mon, Feb 25, 2008 at 11:54 PM, simon.kitching@chello.at <
> simon.kitching@chello.at> wrote:
>
> >
> >
> > Eclipse does not compile code using Sun's compiler ("javac"); it has its
> > own entirely separate compiler implementation. It does not provide its
> > own JVM ("java") or java-standard-library implementation (rt.jar etc).
> >
> > So it is no surprise to find that eclipse's compiler works where the sun
> > java compiler crashes (and vice versa).
> >
> > This is just a sun javac bug that your code has triggered, and nothing
> > to do with Maven. This has happened to me half-a-dozen times in
> > half-a-dozen years.
> >
> > See: http://en.wikipedia.org/wiki/Java_compiler
> >
> > Regards, Simon
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Strange maven compile error
Posted by Michael Mehrle <mm...@gmail.com>.
That makes sense actually - thanks. However, it doesn't give me much hope...
Question: how were you able to find the piece of code that was triggering
this error? We have a mixed dev environment and it's pretty unrealistic that
everyone is going to update their JDK (and to do it on our servers) just to
fix that one piece of code that breaks an entire build?
I know this is not maven specific and this is my last post on this - if
anyone has any ideas on how to narrow down what breaks the compiler I'd
REALLY appreciate ;-)
Michael
On Mon, Feb 25, 2008 at 11:54 PM, simon.kitching@chello.at <
simon.kitching@chello.at> wrote:
>
>
> Eclipse does not compile code using Sun's compiler ("javac"); it has its
> own entirely separate compiler implementation. It does not provide its
> own JVM ("java") or java-standard-library implementation (rt.jar etc).
>
> So it is no surprise to find that eclipse's compiler works where the sun
> java compiler crashes (and vice versa).
>
> This is just a sun javac bug that your code has triggered, and nothing
> to do with Maven. This has happened to me half-a-dozen times in
> half-a-dozen years.
>
> See: http://en.wikipedia.org/wiki/Java_compiler
>
> Regards, Simon
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Strange maven compile error
Posted by "simon.kitching@chello.at" <si...@chello.at>.
Michael Mehrle schrieb:
> I am suddenly experiencing a strange error when compiling my project (see
> stack trace below) - the maven compile plugin crashes and then refers to
> some compiler error which cannot be parced. It even asks me to submit a bug
> report with the JDC - never encountered anything like this in 12 years of
> Java coding.
>
> Strangely - my Eclipse IDE using the *same* JRE (1.5.0.13) is able to
> compile the very same code without any problems. But as soon as I try to do
> it with maven (in and outside of Eclipse) I get this error). This is
> happening on Linux and OS X.
>
> ANY input would be appreciated - this has put our entire project on hold for
> an entire day - we have no idea how to fix this.
>
> Stack trace:
>
> [INFO] [compiler:compile]
> [INFO] Compiling 455 source files to
> /Users/michael/test/trunk/target/classes
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Compilation failure
> Failure executing javac, but could not parse the error:
> An exception has occurred in the compiler (1.5.0_13). Please file a bug at
> the Java Developer Connection (http://java.sun.com/webapps/bugreport) after
> checking the Bug Parade for duplicates. Include your program and the
> following diagnostic in your report. Thank you.
> java.lang.NullPointerException
> at com.sun.tools.javac.tree.TreeMaker.Ident(TreeMaker.java:413)
> at com.sun.tools.javac.comp.Lower.access(Lower.java:956)
> at com.sun.tools.javac.comp.Lower.access(Lower.java:1048)
>
Eclipse does not compile code using Sun's compiler ("javac"); it has its
own entirely separate compiler implementation. It does not provide its
own JVM ("java") or java-standard-library implementation (rt.jar etc).
So it is no surprise to find that eclipse's compiler works where the sun
java compiler crashes (and vice versa).
This is just a sun javac bug that your code has triggered, and nothing
to do with Maven. This has happened to me half-a-dozen times in
half-a-dozen years.
See: http://en.wikipedia.org/wiki/Java_compiler
Regards, Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Strange maven compile error
Posted by Wendy Smoak <ws...@gmail.com>.
On Mon, Feb 25, 2008 at 6:27 PM, Michael Mehrle <mm...@gmail.com> wrote:
> I am suddenly experiencing a strange error when compiling my project (see
> stack trace below) - the maven compile plugin crashes and then refers to
> some compiler error which cannot be parced. It even asks me to submit a bug
> report with the JDC - never encountered anything like this in 12 years of
> Java coding.
>
> Strangely - my Eclipse IDE using the *same* JRE (1.5.0.13) is able to
> compile the very same code without any problems. But as soon as I try to do
> it with maven (in and outside of Eclipse) I get this error). This is
> happening on Linux and OS X.
>
> ANY input would be appreciated - this has put our entire project on hold for
> an entire day - we have no idea how to fix this.
The first thing I'd do is update to the latest JDK 1.5.0_14 and see if
it still happens.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org