ulsa
May 9th, 2008, 03:39 AM
I get a strange error message when starting spring-osgi-web-extender. It claims ContextPathStrategy is not available, or rather that it actually is exported from spring-osgi-web, but not imported by spring-osgi-web-extender:
[FelixStartLevel] INFO org.springframework.osgi.web.extender.internal.act ivator.WarLoaderListener - Starting [org.springframework.bundle.osgi.web.extender] bundle v.[1.1.0.m2]
[FelixStartLevel] ERROR System Bundle - Error starting file:/Users/ulrik/Source/testing-osgi/myapplication/runner/bundles/org.springframework.bundle.osgi.web.extender_1.1.0 .m2.jar
org.osgi.framework.BundleException: Activator start error.
at org.apache.felix.framework.Felix._startBundle(Feli x.java:1629)
at org.apache.felix.framework.Felix.startBundle(Felix .java:1519)
at org.apache.felix.framework.Felix.setFrameworkStart Level(Felix.java:1104)
at org.apache.felix.framework.StartLevelImpl.run(Star tLevelImpl.java:258)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NoClassDefFoundError: org/springframework/osgi/web/deployer/ContextPathStrategy
at org.springframework.osgi.web.extender.internal.act ivator.WarLoaderListener.start(WarLoaderListener.j ava:243)
at org.apache.felix.framework.util.SecureAction.start Activator(SecureAction.java:589)
at org.apache.felix.framework.Felix._startBundle(Feli x.java:1585)
... 4 more
Caused by: java.lang.ClassNotFoundException: *** Class 'org.springframework.osgi.web.deployer.ContextPath Strategy' was not found because bundle 3 does not import 'org.springframework.osgi.web.deployer' even though bundle 15 does export it. To resolve this issue, add an import for 'org.springframework.osgi.web.deployer' to bundle 3. ***
at org.apache.felix.framework.searchpolicy.R4SearchPo licyCore.findClass(R4SearchPolicyCore.java:195)
at org.apache.felix.framework.searchpolicy.R4SearchPo licy.findClass(R4SearchPolicy.java:45)
at org.apache.felix.framework.searchpolicy.ContentCla ssLoader.loadClass(ContentClassLoader.java:109)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:374)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.springframework.osgi.web.deployer.ContextPathS trategy
at org.apache.felix.framework.searchpolicy.R4SearchPo licyCore.findClassOrResource(R4SearchPolicyCore.ja va:483)
at org.apache.felix.framework.searchpolicy.R4SearchPo licyCore.findClass(R4SearchPolicyCore.java:186)
... 11 more
Looking at the versions, I see that indeed 1.1.0-m2 is used:
[ 3] [Resolved ] [ 5] spring-osgi-web-extender (1.1.0.m2)
...
[ 15] [Active ] [ 5] spring-osgi-web (1.1.0.m2)
Checking the manifest for spring-osgi-web-extender reveals that the package actually is imported:
% unzip -p ~/.m2/repository/org/springframework/osgi/spring-osgi-web-extender/1.1.0-m2/spring-osgi-web-extender-1.1.0-m2.jar META-INF/MANIFEST.MF
Import-Package: ...,org.springframework.osgi.web.deployer;resoluti on:=optional;
version="1.1.0.m2",...
...
Bundle-Version: 1.1.0.m2
Here is the complete bundle listing:
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (1.0.3)
[ 1] [Active ] [ 5] jcl104-over-slf4j (1.4.3)
[ 2] [Active ] [ 5] catalina.start.osgi (1.0.0.SNAPSHOT)
[ 3] [Resolved ] [ 5] spring-osgi-web-extender (1.1.0.m2)
[ 4] [Active ] [ 1] spring-beans (2.5.4)
[ 5] [Active ] [ 1] spring-osgi-io (1.1.0.m2)
[ 6] [Active ] [ 1] aopalliance.osgi (1.0.0.SNAPSHOT)
[ 7] [Active ] [ 5] spring-web (2.5.4)
[ 8] [Active ] [ 1] spring-core (2.5.4)
[ 9] [Active ] [ 5] spring-webmvc (2.5.4)
[ 10] [Active ] [ 1] spring-osgi-extender (1.1.0.m2)
[ 11] [Active ] [ 5] slf4j-api (1.4.3)
[ 12] [Active ] [ 1] spring-aop (2.5.4)
[ 13] [Active ] [ 5] spring-test (2.5.4)
[ 14] [Active ] [ 5] catalina.osgi (6.0.16.SNAPSHOT)
[ 15] [Active ] [ 5] spring-osgi-web (1.1.0.m2)
[ 16] [Active ] [ 1] spring-osgi-core (1.1.0.m2)
[ 17] [Active ] [ 1] spring-context (2.5.4)
[ 18] [Active ] [ 5] slf4j-log4j12 (1.4.3)
[ 19] [Active ] [ 5] backport-util-concurrent.osgi (3.1.0.SNAPSHOT)
[ 20] [Active ] [ 5] se.jayway.labs.spring.osgi.service (1.0.0.SNAPSHOT)
[ 21] [Active ] [ 5] se.jayway.labs.spring.osgi.web (1.0.0.SNAPSHOT)
[ 22] [Active ] [ 5] javax.servlet.api 2.4 [osgi] (2.4)
[ 23] [Active ] [ 1] osgi.compendium (4.0.1)
[ 24] [Active ] [ 1] OPS4J - Pax Logging API (1.1.0)
[ 25] [Active ] [ 1] OPS4J - Pax Logging Service (1.1.0)
[ 26] [Active ] [ 1] spring-context-support (2.5.4)
[ 27] [Active ] [ 1] asm.osgi (2.2.3.SNAPSHOT)
[ 28] [Active ] [ 1] backport-util-concurrent.osgi (3.0.0.SNAPSHOT)
[ 29] [Active ] [ 1] cglib-nodep.osgi (2.1.3.SNAPSHOT)
[ 30] [Active ] [ 1] spring-osgi-annotation (1.1.0.m2)
[ 31] [Active ] [ 1] Apache Felix Shell Service (1.0.0)
[ 32] [Active ] [ 1] Apache Felix Shell TUI (1.0.0)
[FelixStartLevel] INFO org.springframework.osgi.web.extender.internal.act ivator.WarLoaderListener - Starting [org.springframework.bundle.osgi.web.extender] bundle v.[1.1.0.m2]
[FelixStartLevel] ERROR System Bundle - Error starting file:/Users/ulrik/Source/testing-osgi/myapplication/runner/bundles/org.springframework.bundle.osgi.web.extender_1.1.0 .m2.jar
org.osgi.framework.BundleException: Activator start error.
at org.apache.felix.framework.Felix._startBundle(Feli x.java:1629)
at org.apache.felix.framework.Felix.startBundle(Felix .java:1519)
at org.apache.felix.framework.Felix.setFrameworkStart Level(Felix.java:1104)
at org.apache.felix.framework.StartLevelImpl.run(Star tLevelImpl.java:258)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.NoClassDefFoundError: org/springframework/osgi/web/deployer/ContextPathStrategy
at org.springframework.osgi.web.extender.internal.act ivator.WarLoaderListener.start(WarLoaderListener.j ava:243)
at org.apache.felix.framework.util.SecureAction.start Activator(SecureAction.java:589)
at org.apache.felix.framework.Felix._startBundle(Feli x.java:1585)
... 4 more
Caused by: java.lang.ClassNotFoundException: *** Class 'org.springframework.osgi.web.deployer.ContextPath Strategy' was not found because bundle 3 does not import 'org.springframework.osgi.web.deployer' even though bundle 15 does export it. To resolve this issue, add an import for 'org.springframework.osgi.web.deployer' to bundle 3. ***
at org.apache.felix.framework.searchpolicy.R4SearchPo licyCore.findClass(R4SearchPolicyCore.java:195)
at org.apache.felix.framework.searchpolicy.R4SearchPo licy.findClass(R4SearchPolicy.java:45)
at org.apache.felix.framework.searchpolicy.ContentCla ssLoader.loadClass(ContentClassLoader.java:109)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:374)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.springframework.osgi.web.deployer.ContextPathS trategy
at org.apache.felix.framework.searchpolicy.R4SearchPo licyCore.findClassOrResource(R4SearchPolicyCore.ja va:483)
at org.apache.felix.framework.searchpolicy.R4SearchPo licyCore.findClass(R4SearchPolicyCore.java:186)
... 11 more
Looking at the versions, I see that indeed 1.1.0-m2 is used:
[ 3] [Resolved ] [ 5] spring-osgi-web-extender (1.1.0.m2)
...
[ 15] [Active ] [ 5] spring-osgi-web (1.1.0.m2)
Checking the manifest for spring-osgi-web-extender reveals that the package actually is imported:
% unzip -p ~/.m2/repository/org/springframework/osgi/spring-osgi-web-extender/1.1.0-m2/spring-osgi-web-extender-1.1.0-m2.jar META-INF/MANIFEST.MF
Import-Package: ...,org.springframework.osgi.web.deployer;resoluti on:=optional;
version="1.1.0.m2",...
...
Bundle-Version: 1.1.0.m2
Here is the complete bundle listing:
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (1.0.3)
[ 1] [Active ] [ 5] jcl104-over-slf4j (1.4.3)
[ 2] [Active ] [ 5] catalina.start.osgi (1.0.0.SNAPSHOT)
[ 3] [Resolved ] [ 5] spring-osgi-web-extender (1.1.0.m2)
[ 4] [Active ] [ 1] spring-beans (2.5.4)
[ 5] [Active ] [ 1] spring-osgi-io (1.1.0.m2)
[ 6] [Active ] [ 1] aopalliance.osgi (1.0.0.SNAPSHOT)
[ 7] [Active ] [ 5] spring-web (2.5.4)
[ 8] [Active ] [ 1] spring-core (2.5.4)
[ 9] [Active ] [ 5] spring-webmvc (2.5.4)
[ 10] [Active ] [ 1] spring-osgi-extender (1.1.0.m2)
[ 11] [Active ] [ 5] slf4j-api (1.4.3)
[ 12] [Active ] [ 1] spring-aop (2.5.4)
[ 13] [Active ] [ 5] spring-test (2.5.4)
[ 14] [Active ] [ 5] catalina.osgi (6.0.16.SNAPSHOT)
[ 15] [Active ] [ 5] spring-osgi-web (1.1.0.m2)
[ 16] [Active ] [ 1] spring-osgi-core (1.1.0.m2)
[ 17] [Active ] [ 1] spring-context (2.5.4)
[ 18] [Active ] [ 5] slf4j-log4j12 (1.4.3)
[ 19] [Active ] [ 5] backport-util-concurrent.osgi (3.1.0.SNAPSHOT)
[ 20] [Active ] [ 5] se.jayway.labs.spring.osgi.service (1.0.0.SNAPSHOT)
[ 21] [Active ] [ 5] se.jayway.labs.spring.osgi.web (1.0.0.SNAPSHOT)
[ 22] [Active ] [ 5] javax.servlet.api 2.4 [osgi] (2.4)
[ 23] [Active ] [ 1] osgi.compendium (4.0.1)
[ 24] [Active ] [ 1] OPS4J - Pax Logging API (1.1.0)
[ 25] [Active ] [ 1] OPS4J - Pax Logging Service (1.1.0)
[ 26] [Active ] [ 1] spring-context-support (2.5.4)
[ 27] [Active ] [ 1] asm.osgi (2.2.3.SNAPSHOT)
[ 28] [Active ] [ 1] backport-util-concurrent.osgi (3.0.0.SNAPSHOT)
[ 29] [Active ] [ 1] cglib-nodep.osgi (2.1.3.SNAPSHOT)
[ 30] [Active ] [ 1] spring-osgi-annotation (1.1.0.m2)
[ 31] [Active ] [ 1] Apache Felix Shell Service (1.0.0)
[ 32] [Active ] [ 1] Apache Felix Shell TUI (1.0.0)