[ 
https://issues.apache.org/jira/browse/FELIX-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard S. Hall closed FELIX-1176.
----------------------------------

    Resolution: Invalid

I am closing this as invalid, but please reopen it if I misunderstood the issue.

> RuntimeException in SynchronousBundleListener does not effect Bundle 
> lisfecycle
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-1176
>                 URL: https://issues.apache.org/jira/browse/FELIX-1176
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.0
>            Reporter: Thomas Diesler
>
> A bundle is started even if a registered SynchronousBundleListeners throws a 
> RuntimeException
> SynchronousBundleListeners 
> (http://www.osgi.org/javadoc/r4v41/org/osgi/framework/SynchronousBundleListener.html)
> Unlike normal BundleListener objects, SynchronousBundleListeners are 
> synchronously called during bundle lifecycle processing. The bundle lifecycle 
> processing will not proceed until all SynchronousBundleListeners have 
> completed. SynchronousBundleListener objects will be called prior to 
> BundleListener objects. 
> ---------------- 
> public class BlueprintExtender implements SynchronousBundleListener
> {
>  
>    @SuppressWarnings("unchecked")
>    public void bundleChanged(BundleEvent event)
>    {
>      
>       if (event.getType() == BundleEvent.STARTING)
>       {
>           // throws RTE
>       }
> }
> 2009-05-25 11:12:16,336 INFO  [context-basic] BundleEvent RESOLVED
> 2009-05-25 11:12:16,440 ERROR [org.jboss.osgi.felix.framework.FelixLogger] 
> EventDispatcher: Error during dispatch.
> java.lang.IllegalStateException: Failed to create schema loader: 
> java.lang.ClassCastException org.apache.xerces.impl.xs.XSImplementationImpl 
> cannot be cast to org.apache.xerces.xs.XSImplementation
>       at org.jboss.xb.binding.Util$2.run(Util.java:517)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at org.jboss.xb.binding.Util.getXSImplementation(Util.java:488)
>       at org.jboss.xb.binding.Util.loadSchema(Util.java:357)
>       at 
> org.jboss.xb.binding.sunday.unmarshalling.XsdBinder.bind(XsdBinder.java:113)
>       at 
> org.jboss.xb.binding.sunday.unmarshalling.XsdBinder.bind(XsdBinder.java:100)
>       at 
> org.jboss.osgi.blueprint.parser.BlueprintParser.<init>(BlueprintParser.java:55)
>       at 
> org.jboss.osgi.blueprint.extender.BlueprintExtender.processDescriptor(BlueprintExtender.java:122)
>       at 
> org.jboss.osgi.blueprint.extender.BlueprintExtender.bundleChanged(BlueprintExtender.java:92)
>       at 
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:771)
>       at 
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:700)
>       at 
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:597)
>       at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3418)
>       at org.apache.felix.framework.Felix.startBundle(Felix.java:1443)
>       at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)
>       at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:760)
>       at 
> org.jboss.osgi.spi.testing.EmbeddedBundle.start(EmbeddedBundle.java:74)
>       at 
> org.jboss.test.osgi.blueprint.context.BlueprintContextTestCase.setUp(BlueprintContextTestCase.java:61)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>       at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
>       at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
>       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>       at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>       at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>       at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>       at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>       at 
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>       at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>       at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
>       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>       at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> 2009-05-25 11:12:16,446 INFO  [jboss-osgi-husky-harness] Test-Package: 
> org.jboss.test.osgi.blueprint.context in bundle: context-basic [11]
> 2009-05-25 11:12:16,449 INFO  [context-basic] BundleEvent STARTED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to