Announcement Announcement Module
Collapse
No announcement yet.
IllegalStateException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • IllegalStateException

    I have a rather puzzling problem, maybe just for me. I have one bundle which is servlet/web and it invokes code in another bundle as a test. Basically if I redeploy the web bundle without restarting server the below exception occurs. The web bundle is hot deployed under pickup. The error says the "core" bundle has been uninstalled, but the osgi console still lists it as active.

    I am using SpringDM server version 1.0.2.SR02. Any ideas would be very helpful. Please let me know what other information can be helpful.

    [2009-12-19 20:48:07.625] server-tomcat-thread-7 System.out I Called collectDeviceInventorySync
    [2009-12-19 20:48:07.641] XDE11 .server.ffdc.core.internal.StandardDumpGenerator.w riteCause(145) E Exception trace -
    java.lang.IllegalStateException: Bundle "file:////root/XMP_Platform/xmp_runtime/dm-server-1.0.2.SR02/work/com.springsource.server.deployer/Module/core-0.0.2-SNAPSHOT.jar-0/core-0.0.2-SNAPSHOT.jar" h
    as been uninstalled
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.checkValid(AbstractBundle.java:1228)
    at org.eclipse.osgi.framework.internal.core.BundleHos t.checkLoader(BundleHost.java:181)
    at org.eclipse.osgi.framework.internal.core.BundleHos t.getResource(BundleHost.java:266)
    at com.springsource.server.servlet.tomcat.loader.Osgi WebappClassLoader.getResource(OsgiWebappClassLoade r.java:347)
    at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
    at com.springsource.server.servlet.tomcat.loader.Osgi WebappClassLoader.getResourceAsStream(OsgiWebappCl assLoader.java:398)
    at javax.xml.parsers.SecuritySupport$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.xml.parsers.SecuritySupport.getResourceAsStr eam(Unknown Source)
    at javax.xml.parsers.FactoryFinder.findJarServiceProv ider(Unknown Source)
    at javax.xml.parsers.FactoryFinder.find(Unknown Source)
    at javax.xml.parsers.DocumentBuilderFactory.newInstan ce(Unknown Source)
    at com.cisco.nm.workflow.run.XDERunnerUtil.parseDocum ent(XDERunnerUtil.java:34)
    at com.cisco.nm.workflow.run.XDERunnerRequest.runWork flow(XDERunnerRequest.java:174)
    at com.cisco.nm.workflow.run.XDERunnerRequest.run(XDE RunnerRequest.java:80)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    at com.cisco.nm.workflow.run.ThreadPool$PooledThread. run(ThreadPool.java:61)

    [2009-12-19 20:48:12.058] XDE11 com.springsource.server.ffdc.core.internal.Standar dDumpGenerator I <SPFF0002I> Wrote dump file "/root/XMP_Platform/xmp_runtime/dm-server-1.0.2.SR02
    /serviceability/dump/2009-12-19_20-48-07.dump"
    java.lang.IllegalStateException: Bundle "file:////root/XMP_Platform/xmp_runtime/dm-server-1.0.2.SR02/work/com.springsource.server.deployer/Module/core-0.0.2-SNAPSHOT.jar-0/core-0.0.2-SNAPSHOT.jar" h
    as been uninstalled
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.checkValid(AbstractBundle.java:1228)
    at org.eclipse.osgi.framework.internal.core.BundleHos t.checkLoader(BundleHost.java:181)
    at org.eclipse.osgi.framework.internal.core.BundleHos t.getResource(BundleHost.java:266)
    at com.springsource.server.servlet.tomcat.loader.Osgi WebappClassLoader.getResource(OsgiWebappClassLoade r.java:347)
    at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
    at com.springsource.server.servlet.tomcat.loader.Osgi WebappClassLoader.getResourceAsStream(OsgiWebappCl assLoader.java:398)
    at javax.xml.parsers.SecuritySupport$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.xml.parsers.SecuritySupport.getResourceAsStr eam(Unknown Source)
    at javax.xml.parsers.FactoryFinder.findJarServiceProv ider(Unknown Source)
    at javax.xml.parsers.FactoryFinder.find(Unknown Source)
    at javax.xml.parsers.DocumentBuilderFactory.newInstan ce(Unknown Source)
    at com.cisco.nm.workflow.run.XDERunnerUtil.parseDocum ent(XDERunnerUtil.java:34)
    at com.cisco.nm.workflow.run.XDERunnerRequest.runWork flow(XDERunnerRequest.java:174)
    at com.cisco.nm.workflow.run.XDERunnerRequest.run(XDE RunnerRequest.java:80)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    at com.cisco.nm.workflow.run.ThreadPool$PooledThread. run(ThreadPool.java:61)

    [2009-12-19 20:48:12.059] XDE11 System.err E Exception in thread "XDE11" java.lang.IllegalStateException: Bundle "file:////ro
    ot/XMP_Platform/xmp_runtime/dm-server-1.0.2.SR02/work/com.springsource.server.deployer/Module/core-0.0.2-SNAPSHOT.jar-0/core-0.0.2-SNAPSHOT.jar" has been uninstalled
    [2009-12-19 20:48:12.059] XDE11 System.err E at org.eclipse.osgi.framework.internal.core.AbstractB undle.checkValid(Abstract
    Bundle.java:1228)
    [2009-12-19 20:48:12.059] XDE11 System.err E at org.eclipse.osgi.framework.internal.core.BundleHos t.checkLoader(BundleHost.
    java:181)
    [2009-12-19 20:48:12.059] XDE11 System.err E at org.eclipse.osgi.framework.internal.core.BundleHos t.getResource(BundleHost.
    java:266)
    [2009-12-19 20:48:12.059] XDE11 System.err E at com.springsource.server.servlet.tomcat.loader.Osgi WebappClassLoader.getReso
    urce(OsgiWebappClassLoader.java:347)
    [2009-12-19 20:48:12.059] XDE11 System.err E at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
    [2009-12-19 20:48:12.059] XDE11 System.err E at com.springsource.server.servlet.tomcat.loader.Osgi WebappClassLoader.getReso
    urceAsStream(OsgiWebappClassLoader.java:398)
    [2009-12-19 20:48:12.059] XDE11 System.err E at javax.xml.parsers.SecuritySupport$4.run(Unknown Source)
    [2009-12-19 20:48:12.059] XDE11 System.err E at java.security.AccessController.doPrivileged(Native Method)
    [2009-12-19 20:48:12.060] XDE11 System.err E at javax.xml.parsers.SecuritySupport.getResourceAsStr eam(Unknown Source)
    [2009-12-19 20:48:12.060] XDE11 System.err E at javax.xml.parsers.FactoryFinder.findJarServiceProv ider(Unknown Source)
    [2009-12-19 20:48:12.060] XDE11 System.err E at javax.xml.parsers.FactoryFinder.find(Unknown Source)
    [2009-12-19 20:48:12.060] XDE11 System.err E at javax.xml.parsers.DocumentBuilderFactory.newInstan ce(Unknown Source)
    [2009-12-19 20:48:12.060] XDE11 System.err E at com.cisco.nm.workflow.run.XDERunnerUtil.parseDocum ent(XDERunnerUtil.java:34
    )
    [2009-12-19 20:48:12.060] XDE11 System.err E at com.cisco.nm.workflow.run.XDERunnerRequest.runWork flow(XDERunnerRequest.jav
    a:174)
    [2009-12-19 20:48:12.060] XDE11 System.err E at com.cisco.nm.workflow.run.XDERunnerRequest.run(XDE RunnerRequest.java:80)
    [2009-12-19 20:48:12.060] XDE11 System.err E at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
    [2009-12-19 20:48:12.060] XDE11 System.err E at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    [2009-12-19 20:48:12.060] XDE11 System.err E at com.cisco.nm.workflow.run.ThreadPool$PooledThread. run(ThreadPool.java:61)

  • #2
    I'm not sure precisely what is causing that problem, but I can explain some of the behaviour. When you hot re-deloy the web bundle, dm Server attempts to perform an update/refresh operation on it rather than doing a full redeploy. I suspect dm Server considers that the update/refresh was successful. However, this means that the OSGi framework is called to update the bundle and then perform a PackageAdmin refreshPackages operation. For a period of time, until the refreshPackages operation completes, the bundle will be in an intermediate state of being updated. The error you are seeing is probably due to the old state of the bundle being uninstalled. The OSGi console is showing the new state of the bundle.

    To dig deeper into this problem, look at the stack trace and try to discover why the web bundle is being invoked in the middle of its state update. Did you spawn a thread which may be referring to the old state in some way?

    You may like to compare the behaviour if you delete the web bundle, wait a bit, and then deploy it again. In this case, dm Server won't perform an update/refresh but will uninstalled and then re-install the bundle.

    Happy debugging! ;-)

    Comment

    Working...
    X