On 11/11/11 4:48, Markus Dippold wrote:
Hi Richard,
it says it is stopped. If we stop the bundle 19 with more logging enabled, we
get this output:
The important point is, is the exception thrown after bundle 19 is
stopped (meaning that it has threads running after its bundle activator
was stopped) or is the exception thrown while bundle 19 is stopping
(meaning it should not get an exception).
There were changes here because the older framework let somethings
happen that it shouldn't. So it could be impacting you here, but it also
could be a bug.
-> richard
...
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.web.service.internal.Activator]
: Pax Web stopped
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.web.service.internal.HttpServiceProxy]
: Unregistering [/system/console/res]
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.web.service.internal.HttpServiceProxy]
: Unregistering [/system/console]
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.web.service.internal.HttpServiceFactoryImpl]
: Unbinding bundle: [org.apache.felix.webconsole [15]]
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.web.service.internal.HttpServiceProxy]
: Stopping http service:
[org.ops4j.pax.web.service.internal.HttpServiceProxy@13b9a2fd]
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.HttpServiceStopped]
: Changing HttpService state to
org.ops4j.pax.web.service.internal.HttpServiceStopped@8059dbd
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.web.service.internal.HttpServiceFactoryImpl]
: Unbinding bundle: [de.infoteam.infoteamservlet [6]]
org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.web.service.internal.HttpServiceProxy]
: Stopping http service:
[org.ops4j.pax.web.service.internal.HttpServiceProxy@5f47ff11]
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.HttpServiceStopped]
: Changing HttpService state to
org.ops4j.pax.web.service.internal.HttpServiceStopped@6fbae5f5
ERROR: Bundle org.ops4j.pax.web.pax-web-jetty-bundle [19] EventDispatcher:
Error during dispatch. (java.lang.IllegalStateException: Invalid BundleContext.)
...
g!
If we stop the bundle in felix 3.2.2, we get the same output, but without
exception:
...
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.Activator]
: Pax Web stopped
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.HttpServiceProxy]
: Unregistering [/system/console/res]
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.HttpServiceProxy]
: Unregistering [/system/console]
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.HttpServiceFactoryImpl]
: Unbinding bundle: [org.apache.felix.webconsole [15]]
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.HttpServiceProxy]
: Stopping http service:
[org.ops4j.pax.web.service.internal.HttpServiceProxy@2d61100c]
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.HttpServiceStopped]
: Changing HttpService state to
org.ops4j.pax.web.service.internal.HttpServiceStopped@23f95cce
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.HttpServiceFactoryImpl]
: Unbinding bundle: [de.infoteam.infoteamservlet [6]]
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.HttpServiceProxy]
: Stopping http service:
[org.ops4j.pax.web.service.internal.HttpServiceProxy@1646fef3]
org.ops4j.pax.web.pax-web-jetty-bundle[org.ops4j.pax.web.service.internal.HttpServiceStopped]
: Changing HttpService state to
org.ops4j.pax.web.service.internal.HttpServiceStopped@f0c0ef2
g!
In both felix version, the bundle state is "Resolved", after stopping the
bundle.
Best regards,
Markus
-----Ursprüngliche Nachricht-----
Von: Richard S. Hall [mailto:[email protected]]
Gesendet: Freitag, 11. November 2011 10:20
An: [email protected]
Betreff: Re: Pax Web and Felix 4.0.1
The first question I have is, is bundle 19 actually stopped when this
exception occurs? That would only happen if it wasn't cleaning up after
itself when its activator was stopped, which would then be a bug in it
that should be fixed.
On the other hand, if it hasn't been stopped yet, then something else
must be going on.
-> richard
On 11/11/11 3:07, Markus Dippold wrote:
Hi,
we tried to upgrade Felix from 3.2.2 to 4.0.1 and we are using Pax Web
1.0.7.
It works as expected, but every time we shut down the framework, Pax Web
throws an exception:
2011-11-11 08:41:00.839:INFO::stopped
HttpServiceContext{httpContext=org.apache.felix.webconsole.internal.serv
let.OsgiManagerHttpContext@2242f64e}
java.lang.IllegalStateException: Invalid BundleContext.
ERROR: Bundle org.ops4j.pax.web.pax-web-jetty-bundle [19]
EventDispatcher: Error during dispatch.
(java.lang.IllegalStateException: Invalid BundleContext.)
at
org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContext
Impl.java:514)
at
org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextI
mpl.java:473)
at
org.ops4j.pax.web.service.internal.Activator$DynamicsServiceTrackerCusto
mizer.removedService(Activator.java:364)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTr
acker.java:1006)
at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTr
acker.java:906)
at
org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:352)
at
org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTrack
er.java:949)
at
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCal
lback(EventDispatcher.java:932)
at
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(Eve
ntDispatcher.java:793)
at
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDi
spatcher.java:543)
at
org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4252)
at org.apache.felix.framework.Felix.access$000(Felix.java:74)
at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:390)
at
org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegi
stry.java:148)
at
org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceReg
istrationImpl.java:127)
at
org.apache.felix.framework.ServiceRegistry.unregisterServices(ServiceReg
istry.java:191)
at org.apache.felix.framework.Felix.stopBundle(Felix.java:2386)
at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1214)
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLev
elImpl.java:295)
at java.lang.Thread.run(Unknown Source)
The exception has no negative effects, but it just does not look good.
Can anybody help us to avoid this exception?
Best regards,
Markus
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]