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.
See test suite http://services.netbeans.org/synergy/client/app/#/suite/1496/v/1 and the testcase http://services.netbeans.org/synergy/client/app/#/case/3913/suite/1496/v/1 A class from an OSGi bundle cannot be referenced. Only if I export the package in the OSGi bundle. I guess the test spec needs an update? Product Version: NetBeans IDE Dev (Build 201402090001) Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b69 Runtime: Java(TM) SE Runtime Environment 1.8.0-b127 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
I'm not sure I follow what the test is supposed to do. "A class from an OSGi bundle cannot be referenced" means that there's an error in editor? is it missing from code completion? it appears that by default we now put <exportPackage/> element in the archetype pom to prevent the default behaviour and make all packages explicitly private until the user selects otherwise. I've seen some error marks in my dev IDE, but when I tried to debug it in the testing instance I could not reproduce. AFAIK we don't have white-listing for osgi bundles (as we do for netbeans modules) so you should not even be notified that the class referenced comes from a private package
I've tried again in latest dev build (custom built) and I still cannot reproduce. I'm able to add an osgi project with private packages as dependency of a j2se (jar) project and use it's classes. please provide a sample project demonstrating the problem or more detailed steps to reproduce and reopen, closing as incomplete for now.
Created attachment 145327 [details] Sample projects * Open the two attached projects * Clean and build TestOSGIBundle module * Clean and build mavenproject3 -> ACTUAL: * compile error "osgistuff.OSGISharedClass cannot be found" in foo.main * second strange thing: try to "import osgistuff.OSGiSharedClass" -> still compile error, BUT there is no error about the invalid import - see screenshot Product Version: NetBeans IDE Dev (Build 201402170649) Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b69 Runtime: Java(TM) SE Runtime Environment 1.8.0-b127 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) User directory: C:\Users\markiewb\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\markiewb\AppData\Local\NetBeans\Cache\dev
Created attachment 145328 [details] Shows the issue
(In reply to Milos Kleint from comment #2) > please provide a sample project demonstrating the problem or more detailed > steps to reproduce and reopen, closing as incomplete for now. Sample projects, steps (https://netbeans.org/bugzilla/show_bug.cgi?id=241662#c3) and screenshot attached -> REOPEN
right. the problem here is a typo. while the osgi class defines class: osgistuff.OSGiSharedClass the project uses: osgistuff.OSGISharedClass please note the capital I in OSGI after I've changed the capital I to i, I didn't get any errors anymore