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 239363

Summary: Failing TopLoggingOwnConfigTest and TopLoggingOwnConfigClassTest on JDK8
Product: platform Reporter: Jiri Skrivanek <jskrivanek>
Component: JDK ProblemsAssignee: Jaroslav Tulach <jtulach>
Status: VERIFIED FIXED    
Severity: normal CC: anebuzelsky, dginzburg, jtulach
Priority: P1 Keywords: JDK_8, JDK_SPECIFIC, TEST
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Test case.

Description Jiri Skrivanek 2013-12-11 13:14:58 UTC
Please, fix tests failing on JDK8

org.netbeans.core.startup.TopLoggingOwnConfigClassTest.testLogOneLine
org.netbeans.core.startup.TopLoggingOwnConfigTest.testLogOneLine

To reproduce:

ant -f core.startup test-unit -Dtest.includes=**/TopLoggingOwnConfig*Test.class

http://test4u.cz.oracle.com/view/StableBTD/job/StableBTD-trunk/lastCompletedBuild/testReport/
Comment 1 Jaroslav Tulach 2013-12-11 16:12:44 UTC
Passes OK locally on my linux:

-do-junit:
    [junit] Java HotSpot(TM) Server VM warning: ignoring option PermSize=32m; support was removed in 8.0
    [junit] Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=200m; support was removed in 8.0
    [junit] Testsuite: org.netbeans.core.startup.TopLoggingOwnConfigClassTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,1 sec
    [junit] 
    [junit] Java HotSpot(TM) Server VM warning: ignoring option PermSize=32m; support was removed in 8.0
    [junit] Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=200m; support was removed in 8.0
    [junit] Testsuite: org.netbeans.core.startup.TopLoggingOwnConfigTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,09 sec
    [junit] 

BUILD SUCCESSFUL
Total time: 4 seconds
jtulach@logouticek:~/src/netbeans/ergonomics$ /usr/local/lib/jdk1.8.0/bin/java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b113)
Java HotSpot(TM) Server VM (build 25.0-b55, mixed mode)
Comment 2 Jiri Skrivanek 2013-12-12 09:13:25 UTC
It doesn't work for me on Windows7 with the following JDK

java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b118)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b60, mixed mode)

The problem on JDK8 is that parent logger java.util.logging.LogManager$RootLogger has level 800 (INFO) but on JDK7 it has level 100. Parent level value is propagated to created logger in test. But on JDK8 it is INFO and test message (FINER level) is not logged at all.
Comment 3 Jaroslav Tulach 2013-12-12 15:11:05 UTC
I can confirm the test fails on JDK1.8-b120 on my Linux.

So this means there is a regression between jdk1.8-b113 and jdk1.8-b118 that breaks the test. Should not we report the bug to JDK and insist on them to fix it?
Comment 4 Jiri Skrivanek 2013-12-12 15:38:59 UTC
Yes, Tondo please report JDK bug.
Comment 5 Jiri Skrivanek 2013-12-13 07:08:38 UTC
Created attachment 143127 [details]
Test case.

To reproduce:

- download and unzip netbeans-trunk-nightly-*.zip from http://smetiste.cz.oracle.com/builds/netbeans/trunk/daily/latest/zip/
- download and unzip attached testdist.zip
- cd testdist
- ant -Dnetbeans.dest.dir=D:/netbeans -Dtest.config.default.includes=**/TopLoggingOwnConfig*Test.class -Dcustom.jvm.executable=D:/jdk1.8.0/bin/java.exe
Comment 6 Antonin Nebuzelsky 2013-12-16 10:19:53 UTC
Are we using LogManager correctly?

The following change in 8-b115 is claiming to actually fix of problem of unexpected reset of root logger's level:

http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c81125493ca6

What change should we ask Java team to do in their code, based on what they did in the change above?
Comment 7 Jaroslav Tulach 2013-12-18 15:27:50 UTC
My attempt to do something with the JDK8 behavioral change: ergonomics:8a1c9f60eee1
Comment 8 Quality Engineering 2013-12-21 04:12:40 UTC
Integrated into 'main-silver', will be available in build *201312210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8a1c9f60eee1
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #239363: Calling LogManager.readConfiguration when standard configuration properties are present seems to reload the logger config also on new versions of JDK8
Comment 9 Jiri Skrivanek 2014-01-06 09:33:23 UTC
*** Bug 239796 has been marked as a duplicate of this bug. ***
Comment 10 Jiri Skrivanek 2014-01-06 09:34:03 UTC
*** Bug 239797 has been marked as a duplicate of this bug. ***