Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 19:38 Go to next message
Matthew Clark is currently offline Matthew ClarkFriend
Messages: 3
Registered: August 2014
Location: Pittsburgh
Junior Member
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


Matthew Clark
Software Engineer
Automation Engineer
Re: Error Trying to Run JUnit Tests [message #1413683 is a reply to message #1413530] Fri, 29 August 2014 06:51 Go to previous messageGo to next message
priya sahoo is currently offline priya sahooFriend
Messages: 2
Registered: August 2014
Junior Member
Please explain a bit more.


Thanks,
Gyan
Re: Error Trying to Run JUnit Tests [message #1413811 is a reply to message #1413683] Fri, 29 August 2014 13:29 Go to previous messageGo to next message
Matthew Clark is currently offline Matthew ClarkFriend
Messages: 3
Registered: August 2014
Location: Pittsburgh
Junior Member
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]


Matthew Clark
Software Engineer
Automation Engineer
Re: Error Trying to Run JUnit Tests [message #1413952 is a reply to message #1413530] Fri, 29 August 2014 21:19 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

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 17:56 Go to previous messageGo to next message
Matthew Clark is currently offline Matthew ClarkFriend
Messages: 3
Registered: August 2014
Location: Pittsburgh
Junior Member
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.

Matthew Clark
Software Engineer
Automation Engineer
Re: Error Trying to Run JUnit Tests [message #1415734 is a reply to message #1415403] Wed, 03 September 2014 13:41 Go to previous messageGo to next message
Shmuel Weiss is currently offline Shmuel WeissFriend
Messages: 1
Registered: September 2014
Junior Member
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 08:01 Go to previous message
Gaurav Jindal is currently offline Gaurav JindalFriend
Messages: 1
Registered: September 2014
Junior Member
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 Apr 19 13:01:35 GMT 2024

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

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

Back to the top