Hi,
we are using the Pax Web Jetty Bundle in Apache Felix. Our basic
OSGI-Environment looks like this:
ID|State |Level|Name
0|Active | 0|System Bundle (4.0.2)
1|Active | 1|Apache Felix Bundle Repository (1.6.6)
2|Active | 1|Apache Felix Configuration Admin Service (1.2.8)
3|Active | 1|Apache Felix EventAdmin (1.2.14)
4|Active | 1|Apache Felix Gogo Command (0.12.0)
5|Active | 1|Apache Felix Gogo Runtime (0.10.0)
6|Active | 1|Apache Felix Gogo Shell (0.10.0)
7|Active | 1|Apache Felix Declarative Services (1.6.0)
8|Active | 1|Apache Felix Web Management Console (3.1.8)
9|Active | 1|Apache Felix Web Console Event Plugin (1.0.2)
10|Active | 1|Apache Felix Web Console Memory Usage Plugin (1.0.2)
11|Active | 1|OSGi R4 Compendium Bundle (4.1.0)
12|Active | 1|OPS4J Pax Web - Jetty Bundle (1.0.7)
Everything works fine, except of an unimportant but annoying exception on
bundle shutdown.
Now we tried to upgrade Pax Web to 1.0.8, where this problem should be solved.
Unfortunately it seems something in the bundle or a new dependency is missing.
This exception comes on startup:
-------------------------------------
...
Welcome to Apache Felix Gogo
g! 2012-01-12 16:04:26.150:INFO::jetty-7.x.y-SNAPSHOT
2012-01-12 16:04:26.208:INFO::Started [email protected]:8081
STARTING
2012-01-12 16:04:26.271:INFO::started
HttpServiceContext{httpContext=org.apache.felix.webconsole.internal.servlet.OsgiManagerHttpContext@72ebf3f0}
ERROR: Bundle org.ops4j.pax.web.pax-web-jetty-bundle [13] Error starting
file:/X:/Felix/bundle/pax-web-jetty-bundle-1.0.8.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org.ops4j.pax.web.pax-web-jetty-bundle [13]: Unable to resolve 13.0: missing
requirement [13.0] osgi.wiring.package;
(&(osgi.wiring.package=org.apache.jasper)(version>=7.5.0)(!(version>=8.0.0))))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.ops4j.pax.web.pax-web-jetty-bundle [13]: Unable to resolve 13.0: missing
requirement [13.0] osgi.wiring.package;
(&(osgi.wiring.package=org.apache.jasper)(version>=7.5.0)(!(version>=8.0.0)))
at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:662)
-------------------------------------
Then we tried the new Pax Web 1.1.2. But also this version seems to have some
new dependencies. The bundle cannot be started because of a missing dependency:
-------------------------------------
ERROR: Bundle org.ops4j.pax.web.pax-web-jetty-bundle [12] Error starting
file:/X:/Felix/bundle/pax-web-jetty-bundle-1.1.2.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org.ops4j.pax.web.pax-web-jetty-bundle [12]: Unable to resolve 12.0: missing
requirement [12.0] osgi.wiring.package;
(osgi.wiring.package=org.eclipse.jdt.core.compiler))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.ops4j.pax.web.pax-web-jetty-bundle [12]: Unable to resolve 12.0: missing
requirement [12.0] osgi.wiring.package;
(osgi.wiring.package=org.eclipse.jdt.core.compiler)
at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:662)
-------------------------------------
So we added "org.eclipse.jdt.core.compiler-3.5.1.jar". But this only led to the
next problem:
-------------------------------------
Welcome to Apache Felix Gogo
g! INFO : org.apache.felix.webconsole.plugins.memoryusage (10): Setting
Automatic Memory Dump Threshold to 0% for pools [Code Cache, PS Old Gen, PS
Perm Gen]
INFO : org.apache.felix.webconsole.plugins.memoryusage (10): Automatic Memory
Dump cannot be set for pools [PS Eden Space, PS Survivor Space]
INFO : org.apache.felix.webconsole.plugins.memoryusage (10): Setting Automatic
Memory Dump Interval to 21600 seconds
INFO : org.apache.felix.webconsole.plugins.memoryusage (10): Storing Memory
Dumps in X:\Felix\.\felix-cache\bundle10\data\dumps
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at
org.ops4j.pax.web.service.internal.Activator.<clinit>(Activator.java:86)
at
org.ops4j.pax.web.service.jetty.internal.CompositeActivator.<init>(CompositeActivator.java:38)
...
-------------------------------------
To add the simple Apache Felix Log bundle didn“t help. To avoid this error, we
have to add the Pax Logging Api "pax-logging-api-1.6.3.jar".
Then everything works again as expected. Also the exception on framework
shutdown has disappeared. so far so good.
Unfortunately we do not want to use Pax Logging, but our own minimal logging
solution. Perhaps our customers even want to use a third solution.
Do we really have to install Pax Logging to use a Pax Web bundle of the 1.1.x
branch, or have we missed something?
Best regards,
Markus
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general