Hello
I have a java application where we use OSGi equinox v3.4.0 to use and
manage different OSGi bundles as part of our application deployment.
Now we have a plan to migrate to OSGi equinox v3.10.1. With this new OSGi
container, I see some of the, open source, bundles are not getting resolved
even though all the dependant bundles/fragments are available to the
container.
Please refer to the below examples for complete details.
I could start the OSGi container successfully and the 'ss' command (listing
all bundles) shows the following result.
osgi> ss
"Framework is launched."
id State Bundle
0 ACTIVE org.eclipse.osgi_3.10.1.v20140909-1633
1 ACTIVE com.springsource.javax.annotation_1.0.0
2 ACTIVE com.springsource.javax.ejb_3.0.0
3 ACTIVE com.springsource.javax.el_2.1.0
4 ACTIVE com.springsource.javax.management.j2ee_1.0.1
5 ACTIVE com.springsource.javax.persistence_1.0.0
6 ACTIVE com.springsource.javax.resource_1.5.0
7 ACTIVE com.springsource.javax.servlet_2.5.0
8 ACTIVE com.springsource.javax.servlet.jsp_2.1.0
9 INSTALLED com.springsource.javax.servlet.jsp.jstl_1.1.2
10 ACTIVE com.springsource.javax.transaction_1.1.0
11 ACTIVE com.springsource.javax.xml.soap_1.3.0
12 ACTIVE com.springsource.javax.xml.stream_1.0.1
13 ACTIVE com.springsource.javax.xml.ws_2.1.1
14 INSTALLED
com.springsource.org.apache.catalina.springsource_6.0.20.S2-r5956
15 INSTALLED
com.springsource.org.apache.coyote.springsource_6.0.20.S2-r5956
16 ACTIVE
com.springsource.org.apache.el.springsource_6.0.20.S2-r5956
17 ACTIVE
com.springsource.org.apache.jasper.org.eclipse.jdt_6.0.16
18 INSTALLED
com.springsource.org.apache.jasper.springsource_6.0.20.S2-r5956
19 ACTIVE
com.springsource.org.apache.juli.extras.springsource_6.0.20.S2-r5956
20 ACTIVE javax.interceptor_1.1.0
21 ACTIVE javax.jms_1.1.0
22 ACTIVE javax.mail_1.4.0
23 ACTIVE javax.xml.rpc_1.1.0
24 ACTIVE org.apache.felix.gogo.command_0.10.0.v201209301215
25 ACTIVE org.apache.felix.gogo.runtime_0.10.0.v201209301036
26 ACTIVE org.apache.felix.gogo.shell_0.10.0.v201212101605
27 INSTALLED org.apache.jasper.glassfish_2.2.2.v201205150955
28 INSTALLED org.eclipse.core.runtime_3.10.0.v20140318-2214
29 ACTIVE org.eclipse.equinox.common_3.6.200.v20130402-1505
30 ACTIVE org.eclipse.equinox.console_1.1.0.v20140131-1639
31 ACTIVE org.eclipse.osgi.services_3.4.0.v20140312-2051
You can notice that the bundle
*com.springsource.org.apache.catalina.springsource_6.0.20.S2-r5956* is just
INSTALLED but not started. The bundles
*com.springsource.org.apache.coyote.springsource_6.0.20.S2-r5956* and
*com.springsource.org.apache.jasper.springsource_6.0.20.S2-r5956* are
fragment bundles and are attached to apache catalina springsource bundle.
When I tried to start the bundle
*com.springsource.org.apache.catalina.springsource_6.0.20.S2-r5956* I get
following exception.
osgi> start 14
gogo: BundleException: Could not resolve module:
com.springsource.org.apache.catalina.springsource [14]
Unresolved requirement: Import-Package: org.apache.tomcat;
version="[6.0.20.S2-r5956,6.0.20.S2-r5956]"
-> Export-Package: org.apache.tomcat; bundle-version="6.0.20.S2-r5956";
bundle-symbolic-name="com.springsource.org.apache.jasper.springsource";
version="6.0.20.S2-r5956"; uses:="javax.servlet"
com.springsource.org.apache.jasper.springsource [18]
Unresolved requirement: Import-Package: org.apache.tools.ant;
version="[1.7.0,2.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package:
org.apache.tools.ant.taskdefs; version="[1.7.0,2.0.0)";
resolution:="optional"
Unresolved requirement: Import-Package:
org.apache.tools.ant.types; version="[1.7.0,2.0.0)"; resolution:="optional"
Unresolved requirement: Import-Package: org.apache.tools.ant.util;
version="[1.7.0,2.0.0)"; resolution:="optional"
Unresolved requirement: Fragment-Host:
com.springsource.org.apache.catalina.springsource;
version="[6.0.20.S2-r5956, 6.0.20.S2-r5956]"
Unresolved requirement: Import-Package: org.apache.coyote;
version="[6.0.20.S2-r5956,6.0.20.S2-r5956]"
-> Export-Package: org.apache.coyote; bundle-version="6.0.20.S2-r5956";
bundle-symbolic-name="com.springsource.org.apache.coyote.springsource";
version="6.0.20.S2-r5956";
uses:="javax.management,org.apache.tomcat.util.buf,org.apache.tomcat.util.http,
org.apache.tomcat.util.net"
com.springsource.org.apache.coyote.springsource [15]
Unresolved requirement: Fragment-Host:
com.springsource.org.apache.catalina.springsource;
bundle-version="[6.0.20.S2-r5956,6.0.20.S2-r5956]"
-> Bundle-SymbolicName:
com.springsource.org.apache.catalina.springsource;
bundle-version="6.0.20.S2-r5956"
Unresolved requirement: Import-Package: org.apache.catalina;
version="[6.0.20.S2-r5956,6.0.20.S2-r5956]"
-> Export-Package: org.apache.catalina;
bundle-version="6.0.20.S2-r5956";
bundle-symbolic-name="com.springsource.org.apache.catalina.springsource";
version="6.0.20.S2-r5956";
uses:="javax.naming.directory,javax.servlet,javax.servlet.http,org.apache.catalina.connector,org.apache.catalina.deploy,org.apache.catalina.util,org.apache.juli.logging,org.apache.tomcat,org.apache.tomcat.util.http.mapper"
Unresolved requirement: Import-Package:
org.apache.catalina.deploy; version="[6.0.20.S2-r5956,6.0.20.S2-r5956]"
-> Export-Package: org.apache.catalina.deploy;
bundle-version="6.0.20.S2-r5956";
bundle-symbolic-name="com.springsource.org.apache.catalina.springsource";
version="6.0.20.S2-r5956"
Unresolved requirement: Import-Package: org.apache.coyote.ajp;
version="[6.0.20.S2-r5956,6.0.20.S2-r5956]"
-> Export-Package: org.apache.coyote.ajp;
bundle-version="6.0.20.S2-r5956";
bundle-symbolic-name="com.springsource.org.apache.coyote.springsource";
version="6.0.20.S2-r5956";
uses:="javax.management,org.apache.coyote,org.apache.tomcat.util.buf,
org.apache.tomcat.util.net"
Unresolved requirement: Import-Package: org.apache.coyote.http11;
version="[6.0.20.S2-r5956,6.0.20.S2-r5956]"
-> Export-Package: org.apache.coyote.http11;
bundle-version="6.0.20.S2-r5956";
bundle-symbolic-name="com.springsource.org.apache.coyote.springsource";
version="6.0.20.S2-r5956";
uses:="javax.management,org.apache.coyote,org.apache.tomcat.util.buf,
org.apache.tomcat.util.net"
Looking at the above exception, the bundles are not getting resolved. But,
I see, the import and exports packages are maintained properly and all the
bundles and packages are available to the container.
I got these bundles from springsource repository and are maintained by
spring source.
The same configuration/bundles works fine with Eclipse Equinox v3.4.0
container. But When I replace the OSGi container with 3.10.1 related jars,
it fails.
Do you see any problem in this? Has anything changed with respect to
fragment bundles in new OSGi (v3.10.x) container specification ?
Thanks and Regards
-------------------------------
Raghavendra Neelekani
_______________________________________________
equinox-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev