Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359910 - Jetty-jsp 7.4.2 bundle has incorrect package exports
Summary: Jetty-jsp 7.4.2 bundle has incorrect package exports
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: osgi (show other bugs)
Version: 7.5.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jan Bartel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 16:24 EDT by Raman Gupta CLA
Modified: 2012-03-21 23:38 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raman Gupta CLA 2011-10-04 16:24:22 EDT
This is for version 3.0.1.RELEASE, which I could not select in the "Version" field above.

The jetty-jsp bundle [1] in this version has incorrect exports.

The exports are:

Export-Package: org.eclipse.jetty.util.security;version="7.4.2.v201105
 26",org.eclipse.jetty.util.statistic;version="7.4.2.v20110526",org.ec
 lipse.jetty.jsp;version="7.4.2.v20110526",org.eclipse.jetty.util.thre
 ad;version="7.4.2.v20110526",org.eclipse.jetty.util.component;version
 ="7.4.2.v20110526",org.eclipse.jetty.util.resource;version="7.4.2.v20
 110526",org.eclipse.jetty.util.log;version="7.4.2.v20110526",org.ecli
 pse.jetty.util;version="7.4.2.v20110526",org.eclipse.jetty.util.ajax;
 version="7.4.2.v20110526"

Because this bundle exports a bunch of packages which it does not actually contain, it prevents the proper resolution of these classes. For example, I have a bundle trying to import classes from org.eclipse.jetty.util.ajax, which the bundle resolves via the bundle org.apache.jasper.glassfish-2.1.0.v201007080150 which includes the jetty-jsp package as a fragment. And so of course it cannot find the class.

[1] repository/ext/jetty-jsp-2.1-7.4.2.v20110526.jar
Comment 1 Raman Gupta CLA 2011-10-04 18:51:41 EDT
Updated version to 3.0.0.RELEASE which also has this issue.
Comment 2 Chris Frost CLA 2011-10-05 11:28:53 EDT
I have found this problem and it is also present in the latest 7.5.2 build as well. We have no control over the contents of the Jetty bundles as they are build by the Jetty team. I'm moving this issue to the Jetty team for them to resolve. By the looks of it I'm guessing they intend the exports to be provided by some other bundle but I'm not sure how.
Comment 3 Hugues Malphettes CLA 2011-10-09 23:54:35 EDT
Hi Chris and Raman.
In fact we don't use the jetty-jsp-2.1 jar at all in OSGi.
Up to 7.5.1 it was meant to bridge the jasper-login with jetty-login but I enver managed to make it work in OSGi.

In 7.5.2 its role outside of OSGi has been expanded to add the eclipse compiler plugin support for jasper due to a change in the glassfish jsp-impl code that was breaking JDK5 support.

But here again in OSGi we are not using it: it will simply not work.
Would it be possible to remove this bundle from your installations?
Comment 4 Chris Frost CLA 2011-10-10 12:12:38 EDT
Hi,

Yes, that is easily removed. Is there any way to be sure which bundles we need to include and which we don't for OSGi Jetty.

Chris.
Comment 5 Hugues Malphettes CLA 2011-10-10 19:42:14 EDT
(In reply to comment #4)
> Hi,
> 
> Yes, that is easily removed. Is there any way to be sure which bundles we need
> to include and which we don't for OSGi Jetty.
> 
> Chris.

Hum, at least for this case I need to simply make it clear that this jar is not an OSGi bundle. So I could simply remove the entire OSGi related info from the manifest.

In general, jetty is really a la carte. There is p2 and the eclipse-features but they are not consumed by virgo. Then there is the docs that need to be updated.

Let's keep this bug opened until I can answer this better.
Comment 6 Chris Frost CLA 2011-10-11 10:41:07 EDT
I guess I'm looking for a list of bundles that are required to complete the OSGi web container spec and then a list of bundles that provide extra, optional functionality.
Comment 7 Jan Bartel CLA 2012-03-20 05:23:19 EDT
Since jetty-7.6.1, the jetty-jsp module is simply a maven convenience for declaring all jsp dependencies. So you can declare a dependency on org.eclipse.jetty.jetty-jsp in your pom and it will bring in via transitive dependencies all necessary jars like ecj compiler, jasper engine, jstl jars etc etc.

It is not used in an osgi environment.

Jan
Comment 8 Jan Bartel CLA 2012-03-21 23:38:01 EDT
I'm closing this issue as the jetty-jsp jar is no longer needed in osgi (as per my comment 21-3-2012).

Chris, I believe that the jetty-osgi-boot and jetty-osgi-boot-jsp bundles address the osgi webapp spec. If you need further info, can we discuss on jetty-dev list?

thanks
Jan