You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Bahman Kalali (JIRA)" <ji...@codehaus.org> on 2008/11/20 18:04:42 UTC

[jira] Created: (MCOMPILER-85) Embedded error: Error while executing the compiler. com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)

Embedded error: Error while executing the compiler. com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
------------------------------------------------------------------------------------------------------------------------------

                 Key: MCOMPILER-85
                 URL: http://jira.codehaus.org/browse/MCOMPILER-85
             Project: Maven 2.x Compiler Plugin
          Issue Type: Bug
    Affects Versions: 2.0.2
         Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
apache-maven-2.0.9
Windows XP V2002 Service Pack 3

            Reporter: Bahman Kalali


When I run "mvn install -e" on a war application, I am getting the following exception:

[INFO] Fatal error compiling
Embedded error: Error while executing the compiler.
com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.j
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecyc
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.ja
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLif
)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExe
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:1
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
        at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:498)
        at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.j
        ... 16 more
Caused by: org.codehaus.plexus.compiler.CompilerException: Error while executing the compiler.
        at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:426)
        at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
        at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
        ... 19 more
Caused by: java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java
        at java.lang.Class.getMethod(Class.java:1581)
        at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:418)

It looks like the compiler is calling com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter) where the 1.5.0_16-b02 supports only java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String) method.

Best regards,

--Bahman

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MCOMPILER-85) Embedded error: Error while executing the compiler. com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)

Posted by "Bahman Kalali (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MCOMPILER-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bahman Kalali closed MCOMPILER-85.
----------------------------------

    Resolution: Not A Bug

This turned out to be a problem on our side using a corrupted JDK 1.5.0_16. For some reasons the tools.jar that we had in JDK 1.5.0_16 was corrupted. The Main.compile(String, PrintWriter) was missing in tools.jar of in JDK 1.5.0_16. We re-installed the latest JDK 1.5.0_16  and everything worked fine.

> Embedded error: Error while executing the compiler. com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-85
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-85
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>         Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
> apache-maven-2.0.9
> Windows XP V2002 Service Pack 3
>            Reporter: Bahman Kalali
>
> When I run "mvn install -e" on a war application, I am getting the following exception:
> [INFO] Fatal error compiling
> Embedded error: Error while executing the compiler.
> com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.j
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecyc
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.ja
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLif
> )
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExe
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:1
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>         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)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
>         at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:498)
>         at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.j
>         ... 16 more
> Caused by: org.codehaus.plexus.compiler.CompilerException: Error while executing the compiler.
>         at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:426)
>         at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
>         at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
>         ... 19 more
> Caused by: java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java
>         at java.lang.Class.getMethod(Class.java:1581)
>         at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:418)
> It looks like the compiler is calling com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter) where the 1.5.0_16-b02 supports only java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String) method.
> Best regards,
> --Bahman

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira