Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 547895

Summary: NPE WorkbenchApplicationConfiguration#getOSGiProperty
Product: [RT] RAP Reporter: Sven Uhlig <s-b-u>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mknauer
Version: 3.9   
Target Milestone: 3.9   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/143669
https://git.eclipse.org/c/rap/org.eclipse.rap.git/commit/?id=d4e3fa33363c54553c2d4a9c578335c0f90aa559
Whiteboard:

Description Sven Uhlig CLA 2019-06-04 04:47:32 EDT
Platform.getBundle( Constants.SYSTEM_BUNDLE_SYMBOLICNAME ) returns null and the NPE is following afterwards. 
Shouldn't it be something like bundleContext.getBundle(0)
Comment 1 Ivan Furnadjiev CLA 2019-06-10 11:38:05 EDT
Could you provide a simple project to reproduce the issue?
Comment 2 Sven Uhlig CLA 2019-06-10 15:51:40 EDT
Hi Ivan,

you can use each workbench based app, e.g. o.e.r.demo or o.e.r.demo.databinding or just call Platform.getBundle( Constants.SYSTEM_BUNDLE_SYMBOLICNAME ) somewhere else. 
Platform.getBundle looks for a module with osgi.identity capability and not osgi.wiring.bundle and the osgi.identity of the systembundle is "org.eclipse.osgi" and not "system.bundle". 
I don't know if something changed, but at the moment (3.9M3) it can't work.
"bundleContext.getBundle( Constants.SYSTEM_BUNDLE_ID )" or "bundleContext.getBundle( Constants.SYSTEM_BUNDLE_LOCATION )" will do the rigth thing.
Comment 3 Eclipse Genie CLA 2019-06-11 03:54:10 EDT
New Gerrit change created: https://git.eclipse.org/r/143669
Comment 5 Sven Uhlig CLA 2019-06-12 04:09:59 EDT
the nightly build works again as expected 
thanks a lot
Comment 6 Markus Knauer CLA 2019-06-12 16:40:35 EDT
Thank you for testing and documenting this error!

It should be fixed in the upcoming RC2, too. The build candidate can be found here: http://download.eclipse.org/rt/rap/3.9/rap-3.9.0-RC2-20190612-1720.zip