Cannot get JUnit to work on supplied project, I get NullPointerException

When I try to run the MRUnitTest I get an internal error of type java.lang.NullPtrException.
Here is the stack from error log file:
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.localURL(
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.entryString(
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.addEntry(
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.localizeClasspath(
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.getClasspath(
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.launch(
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(
at org.eclipse.debug.internal.ui.DebugUIPlugin$

I have used the IDE to add all 7 supplied Jars to the the Java Build Path:
and finally my JRE system library

Research on suggested I might not have JDT installed. I have Juno Eclipse, here is an excerpt from my installation file lines 336-345
org.eclipse.jdt (3.8.1.v201302041200) "Eclipse Java Development Tools" [Resolved]
org.eclipse.jdt.core (3.8.3.v20130121-145325) "Java Development Tools Core" [Active]
org.eclipse.jdt.core.manipulation (1.5.0.v20120523-1543) "Java Code Manipulation Functionality" [Active]
org.eclipse.jdt.debug (3.7.101.v20120913-153601) "JDI Debug Model" [Active]
org.eclipse.jdt.debug.ui (3.6.100.v20120530-1425) "JDI Debug UI" [Active]
org.eclipse.jdt.junit (3.7.100.v20120523-1543) "Java Development Tools JUnit support" [Active]
org.eclipse.jdt.junit.core (3.7.100.v20120523-1257) "Java Development Tools JUnit core support" [Active]
org.eclipse.jdt.junit.runtime (3.4.301.v20120914-131016) "Java Development Tools JUnit Runtime Support" [Resolved]
org.eclipse.jdt.launching (3.6.101.v20130111-183046) "Java Development Tools Launching Support" [Active]
org.eclipse.jdt.ui (3.8.2.v20130107-165834) "Java Development Tools UI" [Active]

So it appears I have JDT.

I suspect it may be something in the Run Configuration. As the Test Runner I have JUnit 4, I'm not really sure if there is anything I need to customize for MRunit.

1 Answer(s)


hi Chip,
Please download the from the LMS, extract and import module5-dz project into eclipse, this project has all the required libraries set in pom.xml. Junit is the libraries for testing java programs and MRUnit is required to test java programs written in MapReduce.

In the extracted location of "\module5-dz\target" you will see sample-dz-1.0.jar, you can use this to execute the MRUnit program from command line and verify if you still see the errors.


Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)