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 209631 - Libraries customizer bogus warnings about Import-Package
Summary: Libraries customizer bogus warnings about Import-Package
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 198248
  Show dependency tree
 
Reported: 2012-03-15 17:53 UTC by Vladimir Voskresensky
Modified: 2012-04-04 10:11 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Library Screenshot (18.50 KB, image/png)
2012-03-22 12:11 UTC, bgibson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2012-03-15 17:53:11 UTC
In Properties->Libraries of standalone application suite I see
-------
Module com.jcraft.jsch in ide requests the token org.ietf.jgss but there are no 
known providers.
--------

and Resolve button is disabled.
Comment 1 Vladimir Voskresensky 2012-03-15 17:55:11 UTC
Btw, even if I exclude com.jcraft.jsch the next problem appears
------
Module org.apache.ws.commons.util in ide requests the token org.w3c.dom but there are no known providers.
------
then excluding org.apache.ws.commons.util cause
-------
Module org.apache.xmlrpc in ide requests the token org.apache.ws.commons.serialize but all providers (e.g. module org.apache.ws.commons.util in ide) are excluded.
-------
Comment 2 Vladimir Voskresensky 2012-03-15 17:55:46 UTC
so Resolve never activated to help to solve real dependency issues
Comment 3 Vladimir Voskresensky 2012-03-18 20:12:30 UTC
Jesse, do to this very strange warning it's impossible to see real resolve conflicts.
For instance some of our NB based applications start failing to compile, because someone have added in existing modules dependency on org.netbeans.modules.utilities.project, but it's impossible to detect which one.

And as result we have:
BUILD FAILED
/export1/hudson/jobs/pythia-sputnik-dbxtool/workspace/netbeans/harness/suite.xml:184: The following error occurred while executing this line:
/export1/hudson/jobs/pythia-sputnik-dbxtool/workspace/netbeans/harness/build.xml:174: Module org.netbeans.modules.utilities.project excluded from the target platform
Comment 4 bgibson 2012-03-22 12:11:44 UTC
Created attachment 117075 [details]
Library Screenshot
Comment 5 bgibson 2012-03-22 12:13:01 UTC
I to see this error.  It is not stopping me from compiling or running my application.  See attached screenshot.
Comment 6 Vladimir Voskresensky 2012-03-22 12:57:24 UTC
(In reply to comment #5)
> I to see this error.  It is not stopping me from compiling or running my
> application.  See attached screenshot.
It does not stop you, because you don't have unresolved dependencies. In my case there are and it's impossible to detect which one.
Comment 7 bgibson 2012-03-22 13:03:57 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > I to see this error.  It is not stopping me from compiling or running my
> > application.  See attached screenshot.
> It does not stop you, because you don't have unresolved dependencies. In my
> case there are and it's impossible to detect which one.

Yes, currently I don't have unresolved dependencies but if I did I would be having your issue as well.  I stumbled upon this bug researching the message I was seeing in the libraries window.  I just figured I'd add a note to let you and NetBeans development team know I see what you mean.
Comment 8 Jesse Glick 2012-03-23 15:25:24 UTC
Looks to be OSGi-specific; I will check why this is appearing and whether it can be suppressed or made more precise.
Comment 9 Jesse Glick 2012-04-02 21:17:17 UTC
Indeed the mapping from OSGi headers to NB metadata is rather complex, and it seems that the SuiteCustomizerLibraries missing dependency logic regressed in at least three separate ways in 7.1 by including Eclipse bundles in the IDE.
Comment 10 Jesse Glick 2012-04-02 21:36:58 UTC
Specifically the problems were:

1. ManifestManager ignored Import-Package: javax.anything, but actually the JRE provides a few more packages like org.ietf.jgss.

2. org.eclipse.equinox.app imports org.osgi.service.event which it appears neither Equinox itself nor any other bundle exports; but this is marked resolution:=optional so it should be ignored.

3. libs.git requests org.jcraft.jsch >= 1.3.0, which it actually gets in a binary platform, but when you make a suite based on main/nbbuild/netbeans/ the module list scanner based on nb.org sources finds no version from c.jcraft.jsch/manifest.mf. Therefore this appears as a bogus error just if you use main/nbbuild/netbeans/ as the platform, but not if you use a prebuilt platform.

Will fix #1 and #2. #3 seems less important to fix now; could include a version number in source manifest as a workaround.
Comment 11 Jesse Glick 2012-04-02 21:46:02 UTC
core-main #0da6a5978b4a
Comment 12 Quality Engineering 2012-04-04 10:11:43 UTC
Integrated into 'main-golden', will be available in build *201204040400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0da6a5978b4a
User: Jesse Glick <jglick@netbeans.org>
Log: #209631: Libraries customizer bogus warnings about Import-Package
ManifestManager's OSGi translation was imperfect for some Equinox/Mylyn bundles.
Fixing list of container-exported packages to include everything in JRE 6; and ignoring optional imports.
Also reverting 73d8f71f94a2 which seems to have duplicated a fix made earlier in 244ff72d120d.