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 203142 - createUI() failed for org.netbeans.swing.tabcontrol.TabDisplayer
Summary: createUI() failed for org.netbeans.swing.tabcontrol.TabDisplayer
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: NB JUnit (show other bugs)
Version: 7.0.1
Hardware: PC All
: P4 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-05 13:36 UTC by Mattdje
Modified: 2014-12-22 10:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Netbeans Tabbed pane - Expected look and feel (109.26 KB, application/octet-stream)
2011-10-05 13:36 UTC, Mattdje
Details
Netbeans Tabbed pane - Expected look and feel (30.50 KB, image/png)
2011-10-05 13:37 UTC, Mattdje
Details
Netbeans Tabbed pane - Issue (29.32 KB, image/png)
2011-10-05 13:37 UTC, Mattdje
Details
mavenized project showing issue (13.54 KB, application/x-zip-compressed)
2014-12-03 13:55 UTC, skygo
Details
Execution log of maven project (42.73 KB, text/plain)
2014-12-03 13:56 UTC, skygo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mattdje 2011-10-05 13:36:45 UTC
Created attachment 111533 [details]
Netbeans Tabbed pane - Expected look and feel

When running 2 consecutive jelly tools test cases in a test suite, the second time the application opens, the tabbed panes of the applications windows are not displayed properly (as shown in screenshot attached).

The output window shows that an exception has been thrown:

UIDefaults.getUI() failed: createUI() failed for org.netbeans.core.windows.view.ui.tabcontrol.TabbedAdapter[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=] java.lang.reflect.InvocationTargetException
java.lang.Error
	at javax.swing.UIDefaults.getUIError(UIDefaults.java:712)
	at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:133)
	at javax.swing.UIDefaults.getUI(UIDefaults.java:758)
	at javax.swing.UIManager.getUI(UIManager.java:989)
	at org.netbeans.swing.tabcontrol.TabbedContainer.updateUI(TabbedContainer.java:413)
	at org.netbeans.swing.tabcontrol.TabbedContainer.<init>(TabbedContainer.java:371)
	at org.netbeans.core.windows.view.ui.tabcontrol.TabbedAdapter.<init>(TabbedAdapter.java:96)
	at org.netbeans.core.windows.view.ui.DefaultSplitContainer.createTabbed(DefaultSplitContainer.java:99)
	at org.netbeans.core.windows.view.ui.AbstractModeContainer.<init>(AbstractModeContainer.java:89)
	at org.netbeans.core.windows.view.ui.DefaultSplitContainer.<init>(DefaultSplitContainer.java:76)
	at org.netbeans.core.windows.view.ModeView.<init>(ModeView.java:83)
	at org.netbeans.core.windows.view.ViewHierarchy.updateViewForAccessor(ViewHierarchy.java:310)
	at org.netbeans.core.windows.view.ViewHierarchy.updateViewForAccessor(ViewHierarchy.java:261)
	at org.netbeans.core.windows.view.ViewHierarchy.updateViewForAccessor(ViewHierarchy.java:246)
	at org.netbeans.core.windows.view.ViewHierarchy.updateViewHierarchy(ViewHierarchy.java:163)
	at org.netbeans.core.windows.view.DefaultView.changeGUI(DefaultView.java:152)
	at org.netbeans.core.windows.ViewRequestor.dispatchRequest(ViewRequestor.java:272)
	at org.netbeans.core.windows.ViewRequestor.processRequest(ViewRequestor.java:248)
	at org.netbeans.core.windows.ViewRequestor.postRequest(ViewRequestor.java:186)
	at org.netbeans.core.windows.ViewRequestor.scheduleRequest(ViewRequestor.java:126)
	at org.netbeans.core.windows.Central.addModeOpenedTopComponent(Central.java:767)
	at org.netbeans.core.windows.ModeImpl.addOpenedTopComponent(ModeImpl.java:314)
	at org.netbeans.core.windows.WindowManagerImpl.topComponentOpenAtTabPosition(WindowManagerImpl.java:1094)
	at org.netbeans.core.windows.WindowManagerImpl.topComponentOpen(WindowManagerImpl.java:1061)
	at org.openide.windows.TopComponent.open(TopComponent.java:503)
	at org.openide.windows.TopComponent.open(TopComponent.java:483)
UIDefaults.getUI() failed: createUI() failed for org.netbeans.swing.tabcontrol.TabDisplayer[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=] java.lang.reflect.InvocationTargetException
java.lang.Error
	at javax.swing.UIDefaults.getUIError(UIDefaults.java:712)
	at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:133)
	at javax.swing.UIDefaults.getUI(UIDefaults.java:758)
	at javax.swing.UIManager.getUI(UIManager.java:989)
	at org.netbeans.swing.tabcontrol.TabDisplayer.updateUI(TabDisplayer.java:317)
	at org.netbeans.swing.tabcontrol.TabDisplayer.<init>(TabDisplayer.java:287)
	at org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI.createTabDisplayer(DefaultTabbedContainerUI.java:443)
	at org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI.installUI(DefaultTabbedContainerUI.java:232)
	at javax.swing.JComponent.setUI(JComponent.java:662)
	at org.netbeans.swing.tabcontrol.TabbedContainer.updateUI(TabbedContainer.java:421)
	at org.netbeans.swing.tabcontrol.TabbedContainer.<init>(TabbedContainer.java:371)
	at org.netbeans.core.windows.view.ui.tabcontrol.TabbedAdapter.<init>(TabbedAdapter.java:96)
	at org.netbeans.core.windows.view.ui.DefaultSplitContainer.createTabbed(DefaultSplitContainer.java:99)
	at org.netbeans.core.windows.view.ui.AbstractModeContainer.<init>(AbstractModeContainer.java:89)
	at org.netbeans.core.windows.view.ui.DefaultSplitContainer.<init>(DefaultSplitContainer.java:76)
	at org.netbeans.core.windows.view.ModeView.<init>(ModeView.java:83)
	at org.netbeans.core.windows.view.ViewHierarchy.updateViewForAccessor(ViewHierarchy.java:310)
	at org.netbeans.core.windows.view.ViewHierarchy.updateViewForAccessor(ViewHierarchy.java:261)
	at org.netbeans.core.windows.view.ViewHierarchy.updateViewForAccessor(ViewHierarchy.java:246)
	at org.netbeans.core.windows.view.ViewHierarchy.updateViewHierarchy(ViewHierarchy.java:163)
	at org.netbeans.core.windows.view.DefaultView.changeGUI(DefaultView.java:152)
	at org.netbeans.core.windows.ViewRequestor.dispatchRequest(ViewRequestor.java:272)
	at org.netbeans.core.windows.ViewRequestor.processRequest(ViewRequestor.java:248)
	at org.netbeans.core.windows.ViewRequestor.postRequest(ViewRequestor.java:186)
	at org.netbeans.core.windows.ViewRequestor.scheduleRequest(ViewRequestor.java:126)
	at org.netbeans.core.windows.Central.addModeOpenedTopComponent(Central.java:767)
	at org.netbeans.core.windows.ModeImpl.addOpenedTopComponent(ModeImpl.java:314)
	at org.netbeans.core.windows.WindowManagerImpl.topComponentOpenAtTabPosition(WindowManagerImpl.java:1094)
	at org.netbeans.core.windows.WindowManagerImpl.topComponentOpen(WindowManagerImpl.java:1061)
	at org.openide.windows.TopComponent.open(TopComponent.java:503)
	at org.openide.windows.TopComponent.open(TopComponent.java:483)
Comment 1 Mattdje 2011-10-05 13:37:35 UTC
Created attachment 111534 [details]
Netbeans Tabbed pane - Expected look and feel
Comment 2 Mattdje 2011-10-05 13:37:59 UTC
Created attachment 111535 [details]
Netbeans Tabbed pane - Issue
Comment 3 Stanislav Aubrecht 2011-10-21 10:51:04 UTC
please provide netbeans and jdk version info and also the complete messages.log file, thanks
Comment 4 skygo 2014-12-03 13:55:35 UTC
Created attachment 150857 [details]
mavenized project showing issue

Simple maven project with application containing 2 test
Comment 5 skygo 2014-12-03 13:56:07 UTC
Created attachment 150858 [details]
Execution log of maven project
Comment 6 skygo 2014-12-03 14:03:06 UTC
Hi, I reopen the issue because I can reproduce it on current netbeans 
 I encounter this issue with 
    netbeans 8.0.1. (maven artifacts)
    jdk 8.25

 I attached log and simple application that reproduce the issue.
  
 Note that the test need to be executed with gui(true) instead of gui(false).
Comment 7 Stanislav Aubrecht 2014-12-19 11:18:36 UTC
Probably some threading issue in Maven test runner. When each test is run individually there's no error in the output. Please evaluate, thanks.
Comment 8 Jaroslav Tulach 2014-12-19 16:05:30 UTC
Any indication this could be a threading issue? What makes you believe it is? I am sorry, I can't accept issues just to evaluate them anymore.
Comment 9 Stanislav Aubrecht 2014-12-19 16:10:25 UTC
Sorry, I can't accept a window system issue just because it manifest when running in NB unit test infrastructure. Please evaluate or provide a sample app to reproduce without unit test and reassign back, thanks.
Comment 10 Jaroslav Tulach 2014-12-22 09:43:01 UTC
Am I correct the errors are just printed into console, but the test itself succeed? In such case we need to downgrade the priority.
Comment 11 Jaroslav Tulach 2014-12-22 10:03:27 UTC
Also there is no need to have two suite method. One suite method can initialize multiple tests like:

    public static Test suite() {
        return NbModuleSuite.emptyConfiguration().
                addTest(ApplicationSecondTest.class).
                addTest(ApplicationTest.class).
                gui(true).
                //failOnMessage(Level.WARNING). // works at least in RELEASE71
                failOnException(Level.INFO).
                enableClasspathModules(false). 
                clusters(".*").
                suite();
    }

The last option is to change fork mode of your test runner in your Maven pom.xml. Just fork always and your issue will be gone as well.

I disagree with Stanislav's assessment about threading: If anything, it is about multiple classloaders initializing L&F multiple times. But such problem would have to be addressed in his area and I am afraid Stanislav clearly indicated his unwillingness to do so. 

There is nothing nbjunit or I could do. I have no ways to force Stanislav to do his job properly.

Marking the bug as fixed, as I believe enough solutions has been offered from the testing infrastructure point of view and one of them will certainly work for you. Fixing the real issue might be desirable, but I am not going to invest any energy in convincing Stanislav to do so.