[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] javax.servlet.http classloading problem

Dirk,
That's a tough problem and probably the best way to fix it is to ensure the servlet api packages being exported by the system bundle are versioned.

What environment are you running in where you have the servlet api exposed by the system bundle? The only environment I'm aware of is under the servletbridge where we're careful to export with package version information.
I'd use "ss" to figure out if a framework extension is being used to export the servlet api and then if possible add versioning information to that bundle's exports.
HTH
-Simon

ps. These sorts of questions should be asked in the equinox newsgroup instead of the dev-list.


Inactive hide details for Dirk Jacobs ---04/21/2009 05:21:27 AM---Hi, I'm running on platform 3.4.2 and encountered the followiDirk Jacobs ---04/21/2009 05:21:27 AM---Hi, I'm running on platform 3.4.2 and encountered the following problem during development :


From:

Dirk Jacobs <dirk.jacobs@xxxxxxxxxx>

To:

equinox-dev@xxxxxxxxxxx

Date:

04/21/2009 05:21 AM

Subject:

[equinox-dev] javax.servlet.http classloading problem




Hi, I'm running on platform 3.4.2 and encountered the following problem
during development :

When doing a package import of javax.servlet.http and NOT specifying a
version,
the package that is loaded is always from the system bundle :
javax.servlet.http; version="0.0.0"<System Bundle [0]>

If we specify a version in the import packages, we get our correct
package :
javax.servlet.http;
version="2.4.0"<initial@reference:
file:../others/javax.servlet_2.4.0.v200706111738.jar/ 
[52]>


We tried a lot of thing but we couldn't prevent equinox from loading the
system bundle if no explicit version is specified.
We tried to use :

org.osgi.framework.system.packages
org.osgi.framework.bootdelegation


But no luck. (with other packages like sun.*, com.sun.* we could
succesfully control the loading process)

At the end, the problem is that you get 'package usage conflict errors'
because 2 different versions of javax.servlet.http get loaded.
For code we own, this is not a problem, we can add the version but for
third-party lib's (bundles we are using), this is not possible.




_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


GIF image

GIF image