qhanam / Java-RSRepair

A Java version of the automatic program repair described by RSRepair and GenProg.
Apache License 2.0
10 stars 4 forks source link

Error running project with Java-RSRepair #1

Closed Dieulin closed 8 years ago

Dieulin commented 8 years ago

Hello, First I want to thank you for provide this useful tool. I'm working with Java-RSRepair in an Universitary project to repair some bugs in Java projects. When I was trying the example provided, I get this error :

Java-RSRepair-master$mvn exec:java -Dexec.mainClass="ca.uwaterloo.ece.qhanam.jrsrepair.Java-RSRepairMain" -Dexec.args="./sample/config/jrsrepair.properties"
[INFO] Scanning for projects...

[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building ca.uwaterloo.ece.qhanam.jrsrepair 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) @ ca.uwaterloo.ece.qhanam.jrsrepair ---
[WARNING] 
java.lang.ClassNotFoundException: ca.uwaterloo.ece.qhanam.jrsrepair.Java-RSRepairMain
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:281)
    at java.lang.Thread.run(Thread.java:745)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.050s
[INFO] Finished at: Wed Jan 06 15:31:08 CET 2016
[INFO] Final Memory: 9M/110M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default-cli) on project ca.uwaterloo.ece.qhanam.jrsrepair: An exception occured while executing the Java class. ca.uwaterloo.ece.qhanam.jrsrepair.Java-RSRepairMain -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

If you have an idea please share it tome. It might be useful for me.

Thank you in advance.

qhanam commented 8 years ago

Hi Dieulin,

Thanks for creating this issue.

The README was a bit out of date, so I've updated it. The correct executable is ca.uwaterloo.ece.qhanam.jrsrepair.JRSRepairMain.

Also, because Java-RSRepair relies on Apache Ant to run the JUnit tests, I've added a few more notes to the README about configuring Ant:

  1. Setting the path to the ant executable in sample/config/jrsrepair.properties
  2. Adding junit and hamcrest jar files to the classpath in sample/config/build.xml

Hope that helps!

Dieulin commented 8 years ago

It works. Thanks for your answer !