It would help if you could share the manifest and the content listing
(i.e., a jar tf my.logservice.impl.jar) of your my.logservice.impl.jar.

Furthermore, my guess would be that no matter what other bundle gets
installed by fileinstall after my.logservice.impl.jar is started, you'll
see an exception, right?

regards,

Karl


On Thu, Nov 1, 2012 at 8:33 PM, bokie <[email protected]> wrote:

> I've run into the weirdest problem...
>
> I've reduced my setup to the following in attempt to find the problem:
>  == CORE-BUNDLES-DIRECTORY ==
>  - osgi.cmpn-4.3.0.jar => installed at started manually at startup
>  - org.apache.felix.fileinstall-3.2.4.jar => installed at started manually
> at startup
>
>  == FELIX-FILEINSTALL-WATCH-DIRECTORY ==
>  - slf4j.api-1.7.2.jar => installed at started bu Felix FileInstall
>  - ch.qos.logback.core-1.0.7.jar => installed at started bu Felix
> FileInstall
>  - ch.qos.logback.classic-1.0.7.jar => installed at started bu Felix
> FileInstall
>  - my.logservice.impl.jar => installed at started bu Felix FileInstall
>  - javax.servlet-3.0.0.jar  => installed at started bu Felix FileInstall
>
> I've confirmed that the only bundle exporting org.osgi.service.log is the
> osgi.cmpn bundle.
>
> 1 - If I remove bundle javax.servlet completely, no Exception is thrown
> from
> FileInstall.
> 2 - If I move bundle javax.servlet from FELIX-FILEINSTALL-WATCH-DIRECTORY
> to
> CORE-BUNDLES-DIRECTORY and manually install and start it, no Exception is
> thrown from FileInstall.
>
> The exception:
> org.osgi.framework.BundleException: Activator start error in bundle
> org.apache.felix.fileinstall [2].
>         at org.apache.felix.framework.Felix.activateBundle(Felix.java:2027)
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1895)
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)
>         at my.app.Platform.start(Platform.java:122)
>         at my.app.Launch.main(Launch.java:8)
> Caused by: java.lang.ClassCastException: my.logservice.impl.SLF4jLogService
> cannot be cast to org.osgi.service.log.LogService
>         at
>
> org.apache.felix.fileinstall.internal.Util$OsgiLogger.getLogService(Util.java:185)
>         at
> org.apache.felix.fileinstall.internal.Util$OsgiLogger.log(Util.java:168)
>         at org.apache.felix.fileinstall.internal.Util.log(Util.java:81)
>         at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.log(DirectoryWatcher.java:653)
>         at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)
>         at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1216)
>         at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:505)
>         at
>
> org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:224)
>         at
>
> org.apache.felix.fileinstall.internal.FileInstall.updated(FileInstall.java:252)
>         at
>
> org.apache.felix.fileinstall.internal.FileInstall.start(FileInstall.java:139)
>         at
>
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
>         at org.apache.felix.framework.Felix.activateBundle(Felix.java:1977)
>         ... 5 more
>
> Thanks,
> Bokie
>
>
>
> --
> View this message in context:
> http://apache-felix.18485.n6.nabble.com/ClassCastException-from-FileInstall-for-LogService-tp5000223.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Karl Pauls
[email protected]
http://twitter.com/karlpauls
http://www.linkedin.com/in/karlpauls
https://profiles.google.com/karlpauls

Reply via email to