org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling

Jenkins JIRA | Philip Kerrigan | 4 years ago
  1. 0

    I recently installed JDK 6.0.43, and after removing the old versions of Java my projects with a default JDK no longer build, with an error from maven that it can't find tools.jar. Jenkins is running in Tomcat with the war renamed to Hudson for historical reasons, and Tomcat is running with JDK 6.0.43. JDK7 is installed on the server and configured in Jenkins, but JAVA_HOME is also set to JDK 6.0.43, so I don't know where the jre7 is getting set. This is a problem because I have about 170 projects. Setting the specific JDK for each would be BAD, changing it for jdk7 later would be worse. [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Fatal error compiling Embedded error: tools.jar not found: D:\Applicazioni\Java\jre7\..\lib\tools.jar [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) 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.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)

    Jenkins JIRA | 4 years ago | Philip Kerrigan
    org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling
  2. 0

    I recently installed JDK 6.0.43, and after removing the old versions of Java my projects with a default JDK no longer build, with an error from maven that it can't find tools.jar. Jenkins is running in Tomcat with the war renamed to Hudson for historical reasons, and Tomcat is running with JDK 6.0.43. JDK7 is installed on the server and configured in Jenkins, but JAVA_HOME is also set to JDK 6.0.43, so I don't know where the jre7 is getting set. This is a problem because I have about 170 projects. Setting the specific JDK for each would be BAD, changing it for jdk7 later would be worse. [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Fatal error compiling Embedded error: tools.jar not found: D:\Applicazioni\Java\jre7\..\lib\tools.jar [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) 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.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)

    Jenkins JIRA | 4 years ago | Philip Kerrigan
    org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling
  3. 0
    Change the <configuration> in pom.xml to use xml parameters intead of the <arguments> list.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    NotDirectoryException when jdk-9-ea+131 is used

    GitHub | 5 months ago | dudaerich
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project artemis-commons: Fatal error compiling
  6. 0

    How can I find more information about mvn "Unknown error trying to execute the external compiler

    Stack Overflow | 4 years ago | Peter Kahn
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project memory: Fatal error compiling

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.maven.lifecycle.LifecycleExecutionException

      Fatal error compiling

      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals()
    2. Maven Core
      LifecycleExecutorInterceptor.execute
      1. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
      2. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
      3. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
      4. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      5. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      6. org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      7. org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
      7 frames