Hi,

It looks like for some interesting reasons the configadmin and the scr
bundles bind to different exported Configuration Admin API packages. I
would assume, that this is an issue of multiple bundles exporting the
same package, probably at different versions and thus causing this mishap.

The explanation for the difference of Java 5 and Java 6 I have is, that
there seems to be some difference in timing of bundle loading and
starting. Maybe the bundles are internally prepared in a Set or Map and
then iterated to install and start.

Using the Web Console you should be able to tell to which bundle the scr
and configadmin bundles wire to get the Configuration Admin API.

On the other hand, this is interesting because the SCR bundle should not
get the ConfigurationAdmin service if the API does not match. Strange.

Regards
Felix

On 12.04.2010 17:19, Christopher Brind wrote:
> Hi,
> 
> I'm getting the exception at the end of the email when running our app on
> Java 5.  However, it runs fine on Java 6.
> 
> The app is actually running embedded in a WAR deployed to JBoss 4.2.2 GA.
> 
> This problem stops our components (all SCR based) from being activated and
> actually sets them to disabled.  Manually enabling each component in turn
> eventually gets the system up and running, so it looks like  the
> ConfigurationAdmin manages to get going eventually, but not before causing
> problems elsewhere.
> 
> The war is setup like in the example war file and has the following bundles
> directly embedded:
> 
> com.springsource.org.apache.commons.codec-1.4.0.jar
> org.apache.felix.configadmin-1.2.4.jar
> org.apache.felix.eventadmin-1.2.2.jar
> org.apache.felix.fileinstall-2.0.8.jar
> org.apache.felix.http.bridge.jar
> org.apache.felix.log-1.0.0.jar
> org.apache.felix.scr-1.4.0.jar
> org.apache.felix.webconsole-3.0.0.jar
> 
> We then use fileinstall to load our actual application bundles from
> elsewhere (so that we're not affected by the lifecycle of the WAR file
> itself when we add or remove bundles at runtime).
> 
> So like I say, this all runs fine on Java 6 (on my Mac) but when my
> colleague tried with Java 5 on his Windows machine, that's when we got the
> exception.  He installed Java 6 and it worked.  He then upgraded Java 5 to
> the latest version he could and it blew up again.
> 
> (We're gradually reducing our dependencies on the WAR / JEE but for now
> we're stuck with this environment and our customer has Java 5 and can't
> update to Java 6 at the moment because that causes some other problems.)
> 
> Any thoughts / ideas greatly appreciated!
> 
> Thanks in advance.
> 
> Regards,
> Chris
> 
> 16:03:49,921 ERROR [standard] 87286758-13D8-4ED7-D468-5F2D3A5FF134
> [uk.co.arum.dido.components.standard.bundle.StandardComponents] Cannot
> register Component
> 16:03:49,921 ERROR [standard] Exception 87286758-13D8-4ED7-D468-5F2D3A5FF134
> java.lang.ClassCastException:
> org.apache.felix.cm.impl.ConfigurationAdminImpl
>  at
> org.apache.felix.scr.impl.config.ConfigurationComponentRegistry.createComponentHolder(ConfigurationComponentRegistry.java:104)
>  at
> org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:244)
>  at
> org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:147)
>  at
> org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:111)
>  at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:238)
>  at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:174)
>  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:3432)
>  at org.apache.felix.framework.Felix.startBundle(Felix.java:1525)
>  at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:779)
>  at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:760)
>  at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1090)
>  at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1076)
>  at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:405)
>  at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:212)
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to