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 249455 - java.lang.NullPointerException at ObjectOutputStream$BlockDataOutputStream.getUTFLength
Summary: java.lang.NullPointerException at ObjectOutputStream$BlockDataOutputStream.ge...
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Engine (show other bugs)
Version: 8.0
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords: JDK_SPECIFIC, VISUALVM
Depends on:
Blocks:
 
Reported: 2014-12-19 09:32 UTC by Tomas Hurka
Modified: 2016-06-30 10:17 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Hurka 2014-12-19 09:32:44 UTC
Profiling on JDK 9 b41+ fails with the following exception:
Exception in thread "*** Profiler Agent Communication Thread" java.lang.NullPointerException
	at java.io.ObjectOutputStream$BlockDataOutputStream.getUTFLength(ObjectOutputStream.java:2141)
	at java.io.ObjectOutputStream$BlockDataOutputStream.writeUTF(ObjectOutputStream.java:2012)
	at java.io.ObjectOutputStream.writeUTF(ObjectOutputStream.java:869)
	at org.netbeans.lib.profiler.wireprotocol.VMPropertiesResponse.writeObject(VMPropertiesResponse.java:195)
	at org.netbeans.lib.profiler.wireprotocol.WireIO.sendComplexResponse(WireIO.java:328)
	at org.netbeans.lib.profiler.server.ProfilerServer.sendComplexResponseToClient(ProfilerServer.java:716)
	at org.netbeans.lib.profiler.server.ProfilerServer.handleClientCommand(ProfilerServer.java:1598)
	at org.netbeans.lib.profiler.server.ProfilerServer.listenToClient(ProfilerServer.java:1752)
	at org.netbeans.lib.profiler.server.ProfilerServer.run(ProfilerServer.java:692)
Comment 1 Tomas Hurka 2014-12-19 09:36:01 UTC
This is JDK 9 only issue caused by fix of JDK-8049367 (http://hg.openjdk.java.net/jdk9/dev/hotspot/rev/1d29b13e8a51). This fix removed system properties java.ext.dirs and java.endorsed.dirs. They are no longer set by JVM. :-(
Comment 2 Tomas Hurka 2014-12-19 10:25:12 UTC
Fixed in profiler-main

changeset:   281741:3e056ca29112
user:        Tomas Hurka <thurka@netbeans.org>
date:        Fri Dec 19 11:14:37 2014 +0100
summary:     bugfix #249455, set javaExtDirs to empty string if system property java.ext.dirs does not exist
Comment 3 Quality Engineering 2014-12-20 05:27:52 UTC
Integrated into 'main-silver', will be available in build *201412200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3e056ca29112
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #249455, set javaExtDirs to empty string if system property java.ext.dirs does not exist
Comment 4 Jiri Skrivanek 2015-02-20 07:10:41 UTC
Verified. The following scenario works in dev build:

- create and build sample Anagram project
- run project from command line with JDK 1.9.0-ea-b50

D:\jdk1.9.0\bin>java -jar "D:\AnagramGame\dist\anagrams.jar"

- attach profiler to external process (Methods selected)
On the other hand when Objects are selected there is nothing in live results. I don't know if this is supported.
Comment 5 Marian Mirilovic 2015-02-24 13:47:57 UTC
This is a candidate for NB 8.0.2 Patch 1 , so please integrate the bugfix into releases/release801 branch today by 10pm CET, for more information see 
http://wiki.netbeans.org/NetBeansPatchesProcess
Comment 6 Tomas Hurka 2015-02-24 15:05:16 UTC
Transplanted to release801 branch:

changeset:   294586:c7184a267000
branch:      release801
user:        Tomas Hurka <thurka@netbeans.org>
date:        Fri Dec 19 11:14:37 2014 +0100
summary:     bugfix #249455, set javaExtDirs to empty string if system property java.ext.dirs does not exist