Frank Lyaruu created FELIX-5205:
-----------------------------------
Summary: Webconsole and text console throw IllegalStateException
Key: FELIX-5205
URL: https://issues.apache.org/jira/browse/FELIX-5205
Project: Felix
Issue Type: Bug
Components: Declarative Services (SCR), Gogo Shell, Web Console
Affects Versions: scr-2.0.2
Environment: Mac OSX 10.11.2 Java 1.8.0_66
Reporter: Frank Lyaruu
Recently I've upgraded my application from using Karaf 3.x to Karaf 4.x. The
application works fine, but sometimes (I can't reproduce consistenly but it
happens regularly) the 'Components' tab of the webconsole throws an
IllegalStateException:
Problem accessing /system/console/components. Reason:
Server Error
Caused by:
java.lang.IllegalStateException: Invalid BundleContext.
at
org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:511)
at
org.apache.felix.framework.BundleContextImpl.getBundle(BundleContextImpl.java:114)
at
org.apache.felix.scr.impl.runtime.ServiceComponentRuntimeImpl.bundleToDTO(ServiceComponentRuntimeImpl.java:345)
at
org.apache.felix.scr.impl.runtime.ServiceComponentRuntimeImpl.holderToDescription(ServiceComponentRuntimeImpl.java:241)
at
org.apache.felix.scr.impl.runtime.ServiceComponentRuntimeImpl.getComponentDescriptionDTOs(ServiceComponentRuntimeImpl.java:79)
at
org.apache.felix.webconsole.plugins.ds.internal.WebConsolePlugin$RequestInfo.<init>(WebConsolePlugin.java:615)
at
org.apache.felix.webconsole.plugins.ds.internal.WebConsolePlugin.doGet(WebConsolePlugin.java:177)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at
org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:567)
at
org.apache.felix.webconsole.internal.servlet.KarafOsgiManager.doService(KarafOsgiManager.java:78)
at
org.apache.felix.webconsole.internal.servlet.KarafOsgiManager$1.run(KarafOsgiManager.java:58)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.karaf.util.jaas.JaasHelper.doAs(JaasHelper.java:103)
at
org.apache.felix.webconsole.internal.servlet.KarafOsgiManager.service(KarafOsgiManager.java:56)
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
....
If I do a 'scr:list' in the Gogo shell, I get a similar error:
2016-03-02 14:48:25,065 | ERROR | nsole user karaf | ShellUtil
| 58 - org.apache.karaf.shell.core - 4.0.4 | Exception caught while
executing command
java.lang.IllegalStateException: Invalid BundleContext.
at
org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:511)
at
org.apache.felix.framework.BundleContextImpl.getBundle(BundleContextImpl.java:114)
at
org.apache.felix.scr.impl.runtime.ServiceComponentRuntimeImpl.bundleToDTO(ServiceComponentRuntimeImpl.java:345)
at
org.apache.felix.scr.impl.runtime.ServiceComponentRuntimeImpl.holderToDescription(ServiceComponentRuntimeImpl.java:241)
at
org.apache.felix.scr.impl.runtime.ServiceComponentRuntimeImpl.getComponentDescriptionDTOs(ServiceComponentRuntimeImpl.java:79)
at org.apache.felix.scr.impl.ScrCommand.list(ScrCommand.java:248)
at org.apache.felix.scr.impl.ScrGogoCommand.list(ScrGogoCommand.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)[:1.8.0_66-internal]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_66-internal]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_66-internal]
at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_66-internal]
at
org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)[58:org.apache.karaf.shell.core:4.0.4]
...
That it happens both in Gogo and Webconsole makes me think the problem is in
SCR. Any ideas?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)