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 257543 - ClassNotFoundException: javax.xml.stream.XMLStreamWriter cannot be found by org.eclipse.mylyn.wikitext.core_2.6.0.v20150901-2143
Summary: ClassNotFoundException: javax.xml.stream.XMLStreamWriter cannot be found by o...
Status: RESOLVED FIXED
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Issuetracking Framework (show other bugs)
Version: 8.2
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-13 09:09 UTC by Tomas Pavek
Modified: 2016-01-23 02:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 222092


Attachments
stacktrace (2.53 KB, text/plain)
2016-01-13 09:09 UTC, Tomas Pavek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Pavek 2016-01-13 09:09:55 UTC
Build: NetBeans IDE Dev (Build ODCS-876-on-20160113)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.65-b01, Java(TM) SE Runtime Environment, 1.8.0_65-b17
OS: Windows 7

User Comments:
tpavek: Opened an issue from ODCS. The issue editor is not filled with data due to this exception.




Stacktrace: 
java.lang.ClassNotFoundException: javax.xml.stream.XMLStreamWriter cannot be found by org.eclipse.mylyn.wikitext.core_2.6.0.v20150901-2143
   at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
   at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
   at org.netbeans.modules.netbinox.NetbinoxLoader.loadClass(NetbinoxLoader.java:81)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Comment 1 Tomas Pavek 2016-01-13 09:09:57 UTC
Created attachment 158110 [details]
stacktrace
Comment 2 Tomas Pavek 2016-01-13 10:27:54 UTC
Strange, javax.xml.stream.XMLStreamWriter is a JDK class.

In debugger, I stopped in WikiUtils.getHtmlFormatText on the line that is going to call MarkupParser.parseToHtml and tried to evaluate
parser.getClass().getClassLoader().loadClass("javax.xml.stream.XMLStreamWriter")
- that worked fine here.

Then stepped into MarkupParser.parseToHtml and evaluated the same (for that switched the debugger context back to WikiUtils.getHtmlFormatText by doubleclicking in the debugger window on the stack line) . Now it failed with the exception. If instead of just changing the debugger context I let the debugger pop one level up, then the class loading evaluation worked again.

So the success of loading the class depends on the actual call stack. Something is done differently if the current stack frame is in an OSGi class vs in a NetBeans module class (that is the difference between MarkupParser and WikiUtils). Or perhaps what matters is that when in WikiUtils, there is no OSGi class on the stack.
Comment 3 Tomas Stupka 2016-01-21 15:25:31 UTC
fixed in jet-main #e4c9bf0024b6
Comment 4 Quality Engineering 2016-01-23 02:21:48 UTC
Integrated into 'main-silver', will be available in build *201601230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e4c9bf0024b6
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #257543 - ClassNotFoundException: javax.xml.stream.XMLStreamWriter cannot be found by org.eclipse.mylyn.wikitext.core_2.6.0.v20150901-2143