This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 240848 - NullPointerException at org.netbeans.modules.gsf.testrunner.CommonTestsCfgOfCreate.fireFrameworkChanged
Summary: NullPointerException at org.netbeans.modules.gsf.testrunner.CommonTestsCfgOfC...
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: TestNG (show other bugs)
Version: 8.0
Hardware: All All
: P1 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-22 22:01 UTC by Jiri Kovalsky
Modified: 2014-01-27 12:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 206869


Attachments
stacktrace (3.64 KB, text/plain)
2014-01-22 22:01 UTC, Jiri Kovalsky
Details
Project exhibiting the NPE bug. (17.22 KB, application/x-zip-compressed)
2014-01-23 17:25 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2014-01-22 22:01:09 UTC
Build: NetBeans IDE Dev (Build 201401220001)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b63, Java(TM) SE Runtime Environment, 1.8.0-ea-b121
OS: Linux

User Comments:
jkovalsky: Invoke "Create/Update Tests" on newly created mobileapplication1.NewClass.java node in older MobileApplication1 project.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.gsf.testrunner.CommonTestsCfgOfCreate.fireFrameworkChanged(CommonTestsCfgOfCreate.java:633)
   at org.netbeans.modules.gsf.testrunner.CommonTestsCfgOfCreate.addTestingFrameworks(CommonTestsCfgOfCreate.java:677)
   at org.netbeans.modules.gsf.testrunner.api.TestCreatorPanelDisplayer.displayPanel(TestCreatorPanelDisplayer.java:88)
   at org.netbeans.modules.gsf.testrunner.TestCreatorAction.performAction(TestCreatorAction.java:109)
   at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:586)
   at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
Comment 1 Jiri Kovalsky 2014-01-22 22:01:11 UTC
Created attachment 144272 [details]
stacktrace
Comment 2 Jiri Kovalsky 2014-01-23 11:24:51 UTC
This is very serious. Right now it's not possible to do anything with regards to Unit Testing support in Mobile Applications. Please fix this as soon as possible. Thanks Fanis!
Comment 3 Theofanis Oikonomou 2014-01-23 14:24:44 UTC
I created a dummy MobileApplication project in 7.4 and added a new dummy java class
I could not open this project in 8.0, so what am I doing wrong?
I also tried to invoke the action in a newly created java me embedded application project in 8.0 but the action is not available in 8.0 at all

Some help is needed to reproduce here. Thank you
Comment 4 Jiri Kovalsky 2014-01-23 17:25:24 UTC
Created attachment 144314 [details]
Project exhibiting the NPE bug.

Please follow this test case:

http://services.netbeans.org/synergy/client/app/#/case/1353/suite/260/v/1

Have you created NewClass in some package and Ctrl+Shift+U on it? I see the action in the popup menu too.
Comment 5 Theofanis Oikonomou 2014-01-23 17:55:53 UTC
(In reply to Jiri Kovalsky from comment #4)
> Created attachment 144314 [details]
> Project exhibiting the NPE bug.
> 
> Please follow this test case:
> 
> http://services.netbeans.org/synergy/client/app/#/case/1353/suite/260/v/1
> 
> Have you created NewClass in some package and Ctrl+Shift+U on it? I see the
> action in the popup menu too.

I did exactly what you are describing, but using 3.3 me jdk. I think this does no difference.
In latest build and in 8.0 there will be no support for mobile applications so there is no way to even open the project you have attached let alone invoke actions on it. Did you succeed in opening the attached project in dev build? I am not able to in build 20140123...

I 7.4 I can open the attached project but when I invoke The Create test action nothing happens. IIRC something relevant was bug 238746. Anyway I cannot understand how you end up in this situation but I will add a check to fix the NPE.
Comment 6 Jiri Kovalsky 2014-01-23 18:09:35 UTC
Yes, I am working on this build:

Product Version: NetBeans IDE Dev (Build 201401220001)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b63
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b121
System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb)
User directory: /home/cesilko/.netbeans/dev
Cache directory: /home/cesilko/.cache/netbeans/dev

and I am able to open the attached MobileApplication2 project in that build without any problems. I can show this to you next time in person (February 6th).
Comment 7 Jiri Kovalsky 2014-01-23 18:15:48 UTC
BTW, isn't also #234786 involve too?
Comment 8 Theofanis Oikonomou 2014-01-23 18:17:36 UTC
Changeset: f25dad8af782
Author:    Theofanis Oikonomou <theofanis@netbeans.org>
Date:      2014-01-23 19:14
Message:
Comment 9 Theofanis Oikonomou 2014-01-23 18:20:00 UTC
(In reply to Jiri Kovalsky from comment #7)
> BTW, isn't also #234786 involve too?

I am not really sure. I will have to consult with Roman regarding how this should work in 8.0
Comment 10 Quality Engineering 2014-01-26 02:17:37 UTC
Integrated into 'main-silver', will be available in build *201401260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f25dad8af782
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: Task #240848 - NullPointerException at org.netbeans.modules.gsf.testrunner.CommonTestsCfgOfCreate.fireFrameworkChanged
Comment 11 Jiri Kovalsky 2014-01-27 12:26:36 UTC
Product Version: NetBeans IDE Dev (Build 201401270001)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b63
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b121
System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb)
User directory: /home/cesilko/.netbeans/dev
Cache directory: /home/cesilko/.cache/netbeans/dev

Verified. NPE now does not prevent to open the Create/Update Tests dialog. It's not usable though, because of disabled "OK" button with suggestion to create JMUnit test instead, which works but I cannot run it ("Run File" is disabled) and there is no "Test" action on the project node.