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 230417 - Will not load class o.o.f.l.FrameworkFactory arbitrarily from one of ModuleCL@7b238834[org.netbeans.libs.osgi] and ModuleCL@6f07524[org.netbeans.modules.websvc.restlib]
Summary: Will not load class o.o.f.l.FrameworkFactory arbitrarily from one of ModuleCL...
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-29 05:42 UTC by David Konecny
Modified: 2013-06-28 02: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 David Konecny 2013-05-29 05:42:17 UTC
Fixing issue 229898 and upgrading Jersey library to 2.0 and exporting all Jersey 2.0 jars via <class-path-extension> prevents IDE from starting up. It fails with:

WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.osgi.framework.launch.FrameworkFactory arbitrarily from one of ModuleCL@7b238834[org.netbeans.libs.osgi] and ModuleCL@6f07524[org.netbeans.modules.websvc.restlib] starting from SystemClassLoader[564 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
WARNING [org.openide.util.lookup.MetaInfServicesLookup]: org.osgi.framework.launch.FrameworkFactory could not be found in SystemClassLoader[564 modules]
java.lang.IllegalStateException: Cannot find OSGi framework implementation. Is org.netbeans.libs.felix module or similar enabled?
	at org.netbeans.core.netigso.Netigso.prepare(Netigso.java:159)
	at org.netbeans.NetigsoHandle.turnOn(NetigsoHandle.java:127)
	at org.netbeans.ModuleManager.enable(ModuleManager.java:1176)
	at org.netbeans.ModuleManager.enable(ModuleManager.java:1011)
	at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:340)
	at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:276)
	at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:301)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:181)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:150)
	at org.netbeans.core.startup.Main.start(Main.java:307)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
	at java.lang.Thread.run(Thread.java:722)
Comment 1 David Konecny 2013-05-29 05:50:13 UTC
I commented out the exported jar for now: 4281c57c7d80

I wonder what is the correct solution?

Why does the library exporting all these JARs? So that it is possible to write NetBeans EE module which is using Jersey features (as illustrate in apisupport.restsample/rest-sample-application/rest-sample-module)? That would make sense. But does the library must export all implementation jars or would it be enough to export only API jars like javax.ws.rs-api-2.0.jar and jersey-*.jar?
Comment 2 Quality Engineering 2013-05-30 01:36:15 UTC
Integrated into 'main-golden', will be available in build *201305292301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4281c57c7d80
User: David Konecny <dkonecny@netbeans.org>
Log: #230417 - temporary workaround
Comment 3 Milan Kuchtiak 2013-06-27 12:02:48 UTC
Good question.

I remember that the reason for this API was to allow, on Netbeans platform, to create a Jersey (1.x) Client for some (publicly available REST resources (e.g. Facebook).

I need to figure out which packages are really needed for JAX-RS 2.0 Client now.
Comment 4 Milan Kuchtiak 2013-06-27 15:12:36 UTC
Fixed.

Restrict websvc.restlib to JAX-RS 2.0 client functionality.

See:
http://hg.netbeans.org/web-main/rev/8d606de402ae
Comment 5 Quality Engineering 2013-06-28 02:17:03 UTC
Integrated into 'main-silver', will be available in build *201306272300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8d606de402ae
User: Milan Kuchtiak <mkuchtiak@netbeans.org>
Log: #230417 restrict websvc.restlib to JAX-RS 2.0 client functionality