Siddharth Kumar
Siddharth Kumar

Reputation: 1715

Hudson build error: LifecycleExecutionException Unable to locate the Javac Compiler in

I created a dynamic web project in eclipse for a web service with axis2. I then converted it into Maven project, I'm able to compile and generate war file in eclipse, but when i deploy it on server and try to build it with Hudson-3.0.0 it gives me following error:

mojoFailed org.apache.maven.plugins:maven-compiler-plugin:2.3.2(default-compile)

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project WebServices: Compilation failure
Unable to locate the Javac Compiler in:
C:\Program Files (x86)\Java\jre6..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).

Please Let me know what's wrong with it!

Upvotes: 3

Views: 748

Answers (3)

Lior Chaga
Lior Chaga

Reputation: 1480

I have exactly the same problem, ever since I upgraded Hudson from 2.2.1 to 3.0.1. Both JAVA_HOME environment variable and JDK in hudson configuration point to JDK and not to JRE. If I run mvn compile in the workspace directory of the job, everything works well.

Upvotes: 1

djechlin
djechlin

Reputation: 60768

Did you do what the exception said yet?

Please ensure you are using JDK 1.4 or above and not a JRE (the com.sun.tools.javac.Main class is required).

Sounds like you don't have Java installed. So install it.

Upvotes: 0

Sajith Silva
Sajith Silva

Reputation: 823

Looks like the hudson cannot find java_home. In hudson settings java.home property is set correctly ? Does any other java projects builds successfully ?

Upvotes: 1

Related Questions