Skip to main content

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

Hi Simon, Thomas,

This is running in development, so it is a pure Eclipse environment (Europa) without Servletbridge/TomCat, only Jetty 5.
We only deploy the servletbridge in test and production because there we switch to tomcat.

Added versioning information solves the problem, but as stated, there are a number of bundles using this package and this method of working is only possible if we have the code.
This also means that every new version of a bundle we need to update the import packages in the manifest

the osgi command : 'packages javax.servlet.http' learns us :

javax.servlet.http; version="0.0.0"<System Bundle [0]>
  initial@reference:file:../birt/javax.xml_1.3.4.v200806030440.jar/ [2] imports
  initial@reference:file:../birt/org.eclipse.birt.chart.device.extension_2.3.2.r232_20090115.jar/ [5] imports
  initial@reference:file:../others/org.eclipse.core.resources_3.4.1.R34x_v20080902.jar/ [6] imports
  initial@reference:file:../birt/org.eclipse.datatools.enablement.oda.ws_1.1.2.v200812171046.jar/ [8] imports
  initial@reference:file:../birt/org.eclipse.birt.chart.engine_2.3.2.r232_20090211.jar/ [9] imports
  initial@reference:file:../birt/org.apache.xml.resolver_1.2.0.v200806030312.jar/ [10] imports
  initial@reference:file:service-basic-registry-1.0-M5.jar/ [15] imports
  initial@reference:file:../birt/org.eclipse.birt.core.script.function_2.3.2.r232_v20090211.jar/ [19] imports
  initial@reference:file:../birt/org.eclipse.datatools.connectivity.console.profile_1.0.0.v200805231345.jar/ [22] imports
  initial@reference:file:../birt/org.eclipse.birt.report.engine.dataextraction.csv_2.3.2.r232_20090122.jar/ [23] imports
  initial@reference:file:../others/org.eclipse.osgi.services_3.1.200.v20071203.jar/ [26] imports
  initial@reference:file:../birt/org.apache.xerces_2.9.0.v200805270400.jar/ [28] imports
  initial@reference:file:../../com.isencia.sherpa.business/ [32] imports
  initial@reference:file:../../com.isencia.sherpa.web.extensions/ [34] imports
  initial@reference:file:../birt/org.eclipse.birt.report.model.adapter.oda_2.3.2.r232_20090108.jar/ [38] imports
  initial@reference:file:../birt/org.eclipse.datatools.connectivity.oda.flatfile_3.0.8.v200812171046.jar/ [52] imports
  initial@reference:file:../others/org.eclipse.update.configurator_3.2.201.R34x_v20080819.jar/ [57] imports
  initial@reference:file:../birt/org.eclipse.birt.report.data.oda.jdbc_2.3.2.r232_v20090212/ [65] imports
  initial@reference:file:com.isencia.esb.report-se-1.0-M4.jar/ [66] imports
  initial@reference:file:../birt/org.eclipse.birt.report.engine_2.3.2.r232_20090217.jar/ [67] imports
  initial@reference:file:../birt/org.eclipse.birt.data.aggregation_2.3.2.r232_v20090211.jar/ [68] imports
  initial@reference:file:../birt/org.eclipse.birt.report.engine.emitter.pdf_2.3.2.r232_20090202.jar/ [71] imports
  initial@reference:file:../birt/org.eclipse.datatools.connectivity.sqm.core_1.0.7.v200902180551.jar/ [74] imports
  initial@reference:file:../../com.isencia.sherpa.flow/ [75] imports
  initial@reference:file:../birt/org.eclipse.datatools.enablement.postgresql_1.0.1.v200805152355.jar/ [83] imports
  initial@reference:file:../birt/org.eclipse.datatools.connectivity.db.generic_1.0.1.v200810140922.jar/ [84] imports
  initial@reference:file:../birt/org.eclipse.birt.report.engine.emitter.html_2.3.2.r232_20090202.jar/ [86] imports
  initial@reference:file:../birt/org.eclipse.birt.report.data.adapter_2.3.2.r232_v20090211.jar/ [88] imports
  initial@reference:file:../birt/org.eclipse.birt.report.item.crosstab.core_2.3.2.r232_20090202.jar/ [92] imports
  initial@reference:file:../../com.isencia.sherpa.classification/ [93] imports
  initial@reference:file:../../com.isencia.sherpa.commons/ [94] imports
  initial@reference:file:javax.xml.rpc.jar/ [97] imports
  initial@reference:file:../../com.isencia.sherpa.template/ [98] imports
  initial@reference:file:../birt/org.apache.xml.serializer_2.7.1.v200806030322.jar/ [100] imports
  initial@reference:file:../../com.isencia.sherpa.properties/ [104] imports
  initial@reference:file:../birt/org.eclipse.birt.chart.engine.extension_2.3.2.r232_20090115.jar/ [105] imports
  initial@reference:file:../birt/org.eclipse.datatools.connectivity.oda.consumer_3.1.3.v200808270255.jar/ [106] imports
  initial@reference:file:../others/org.eclipse.core.runtime.compatibility_3.2.0.v20071008.jar/ [108] imports
  initial@reference:file:../birt/org.eclipse.birt.report.engine.emitter.prototype.excel_2.3.2.r232_20090202.jar/ [112] imports
  initial@reference:file:../birt/org.eclipse.datatools.connectivity.apache.derby_1.0.3.v200902070611.jar/ [117] imports
  initial@reference:file:../birt/org.eclipse.birt.report.data.oda.sampledb_2.3.2.r232_v20090211/ [121] imports
  initial@reference:file:../birt/org.eclipse.datatools.connectivity_1.1.2.v200901090028.jar/ [124] imports
  initial@reference:file:../birt/org.eclipse.birt.report.data.oda.jdbc.dbprofile.sampledb_2.3.2.r232_v20090211.jar/ [127] imports
  initial@reference:file:../birt/org.eclipse.datatools.enablement.sap.maxdb_1.0.0.v200805152355.jar/ [130] imports
  initial@reference:file:../../com.isencia.sherpa.codegen/ [133] imports
  initial@reference:file:../birt/org.eclipse.birt.chart.device.svg_2.3.2.r232_20090115.jar/ [135] imports
  initial@reference:file:../birt/org.eclipse.birt.report.data.oda.jdbc.dbprofile_2.3.2.r232_v20090211.jar/ [136] imports
  initial@reference:file:../birt/org.eclipse.birt.chart.reportitem_2.3.2.r232_20090115.jar/ [137] imports
  initial@reference:file:../birt/org.eclipse.birt.report.engine.emitter.ppt_2.3.2.r232_20090202.jar/ [138] imports
  initial@reference:file:../birt/org.eclipse.datatools.enablement.msft.sqlserver_1.0.1.v200807181158.jar/ [141] imports
  initial@reference:file:../birt/org.eclipse.datatools.connectivity.oda.design_3.0.7.v200807231215.jar/ [144] imports
  initial@reference:file:../birt/org.eclipse.emf.common_2.4.0.v200902171115.jar/ [148] imports
  initial@reference:file:../../com.isencia.sherpa.scheduler/ [153] imports
  initial@reference:file:../birt/org.eclipse.birt.report.engine.emitter.postscript_2.3.2.r232_20090202.jar/ [155] imports
  initial@reference:file:../birt/org.eclipse.datatools.connectivity.oda_3.1.3.v200808270255.jar/ [160] imports
  initial@reference:file:../../com.isencia.sherpa.persistence/ [161] imports
  initial@reference:file:../birt/org.eclipse.birt.report.model_2.3.2.r232_20090115.jar/ [162] imports
  initial@reference:file:../others/org.eclipse.core.expressions_3.4.0.v20080603-2000.jar/ [167] imports
  initial@reference:file:../birt/org.eclipse.emf.ecore.xmi_2.4.1.v200902171115.jar/ [170] imports
  initial@reference:file:../others/org.eclipse.core.filesystem_1.2.0.v20080604-1400.jar/ [171] imports
  initial@reference:file:../birt/org.eclipse.emf.ecore_2.4.2.v200902171115.jar/ [172] imports
  initial@reference:file:../birt/org.eclipse.birt.report.engine.dataextraction_2.3.2.r232_20090122.jar/ [178] imports
  initial@reference:file:../../com.isencia.sherpa.security/ [179] imports
  initial@reference:file:../birt/org.eclipse.emf.ecore.change_2.4.0.v200902171115.jar/ [180] imports
  initial@reference:file:../birt/org.eclipse.birt.data_2.3.2.r232_v20090211.jar/ [181] imports
  initial@reference:file:../birt/org.eclipse.datatools.enablement.mysql_1.0.2.v200810160130.jar/ [183] imports
  initial@reference:file:../birt/org.eclipse.datatools.connectivity.oda.profile_3.0.7.v200812050755.jar/ [184] imports
  initial@reference:file:../birt/org.eclipse.birt.core_2.3.2.r232_20090204a.jar/ [185] imports
  initial@reference:file:../birt/org.eclipse.birt.report.engine.emitter.wpml_2.3.2.r232_20090202.jar/ [191] imports
  initial@reference:file:../others/org.eclipse.core.runtime_3.4.0.v20080512.jar/ [192] imports
javax.servlet.http; version="2.4.0"<initial@reference:file:../others/javax.servlet_2.4.0.v200706111738.jar/ [169]>
  initial@reference:file:../../com.isencia.enterprise.security/ [1] imports
  initial@reference:file:tool-1.0-M5.jar/ [3] imports
  initial@reference:file:../others/org.eclipse.equinox.http.servlet_1.0.100.v20080427-0830.jar/ [36] imports
  initial@reference:file:../../com.isencia.esengo.edm/ [54] imports
  initial@reference:file:../others/org.mortbay.jetty_5.1.14.v200806031611.jar/ [64] imports
  initial@reference:file:../../com.isencia.sherpa.web/ [72] imports
  initial@reference:file:../../com.isencia.sherpa.admin/ [76] imports
  initial@reference:file:../others/org.eclipse.equinox.http.jetty_1.1.0.v20080425.jar/ [110] imports
  initial@reference:file:../../com.isencia.sherpa.report/ [126] imports
  initial@reference:file:../others/org.eclipse.equinox.http.registry_1.0.100.v20080427-0830.jar/ [156] imports
  initial@reference:file:../../com.isencia.enterprise.commons/ [174] imports


Modifying all of the above is a use work and error prone.


-Dirk


Simon Kaegi wrote:

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



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

Back to the top