Skip to main content



      Home
Home » Newcomers » Newcomers » Error Trying to Run JUnit Tests(An internal error occurred during: "class name" . java.lang.NullPointerException)
Error Trying to Run JUnit Tests [message #1413530] Thu, 28 August 2014 15:38 Go to next message
Eclipse UserFriend
Good Afternoon everyone. I am just starting out with JUnit testing for an application we are developing and have been following some online training.

When I created a basic unit test and click on run, I am getting the following error:

An internal error occurred during: "Launching HelloJUnit".
java.lang.NullPointerException

I am not sure what the issue could be and I was looking to see if there were others that have had this issue, to see what they did to solve it.

Also not sure if I have the right versions installed to use JUnit.

Eclipse.org - Eclipse Platform - Version 4.2.1.v20130118
Eclipse.org - Eclipse RCP - Version 4.2.2.v20130129
Eclipse.org - Help System Base - Version 1.4.1.v20120912

Android Developer Tools - ADT Package - Version 23.0.2.1259578
Re: Error Trying to Run JUnit Tests [message #1413683 is a reply to message #1413530] Fri, 29 August 2014 02:51 Go to previous messageGo to next message
Eclipse UserFriend
Please explain a bit more.
Re: Error Trying to Run JUnit Tests [message #1413811 is a reply to message #1413683] Fri, 29 August 2014 09:29 Go to previous messageGo to next message
Eclipse UserFriend
I have created a project in Eclipse and have added in some tests. When I attempt to run/debug the tests using Run As -> JUnit tests, I receive an error that states :

An internal error occurred during: "Launching HelloJUnit".
java.lang.NullPointerException

The HelloJUnit is just a sample test that I was working on in a training.

I have tried to include the different versions/settings that I could find in Eclipse that might help someone figure out if I don't have something configured properly. It is attempting to use JUnit 4, JRS System Library [JavaSE-1.7]
Re: Error Trying to Run JUnit Tests [message #1413952 is a reply to message #1413530] Fri, 29 August 2014 17:19 Go to previous messageGo to next message
Eclipse UserFriend
On 08/28/2014 01:52 PM, Matthew Clark wrote:
> Good Afternoon everyone. I am just starting out with JUnit testing for
> an application we are developing and have been following some online
> training.
> When I created a basic unit test and click on run, I am getting the
> following error:
>
> An internal error occurred during: "Launching HelloJUnit".
> java.lang.NullPointerException
>
> I am not sure what the issue could be and I was looking to see if there
> were others that have had this issue, to see what they did to solve it.
>
> Also not sure if I have the right versions installed to use JUnit.
> Eclipse.org - Eclipse Platform - Version 4.2.1.v20130118
> Eclipse.org - Eclipse RCP - Version 4.2.2.v20130129
> Eclipse.org - Help System Base - Version 1.4.1.v20120912
>
> Android Developer Tools - ADT Package - Version 23.0.2.1259578

It would be easier to guess what went wrong with a bit more of the NPE
stack trace.
Re: Error Trying to Run JUnit Tests [message #1415403 is a reply to message #1413952] Tue, 02 September 2014 13:56 Go to previous messageGo to next message
Eclipse UserFriend
I believe that I have figured out my issue. I was using a workspace that was incompatible with what I was trying to do. Made a few changes and now I am able to run the unit tests again.
Re: Error Trying to Run JUnit Tests [message #1415734 is a reply to message #1415403] Wed, 03 September 2014 09:41 Go to previous messageGo to next message
Eclipse UserFriend
I have the same issue, please I have spent the whole day trying to fix this issue.
I have a clean adt-bundle-windows-x86_64-20140702 with ECLIPSE JUNO installed on my laptop and I got this error by trying to run a JUnit Test.

What do you mean by a not compatible workspace ? please let me know what you did in order to fix the issue.

thanks.
Re: Error Trying to Run JUnit Tests [message #1417339 is a reply to message #1415403] Fri, 05 September 2014 04:01 Go to previous message
Eclipse UserFriend
Hi Matthew I am facing the same problem, Please explain what you mean by incompatible workspace. Thanks !
Previous Topic:MySQL JDBC Driver Not Found From build.xml
Next Topic:Deploy test resource to Tomcat Server
Goto Forum:
  


Current Time: Fri Jul 25 09:12:02 EDT 2025

Powered by FUDForum. Page generated in 0.11800 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top