开发者

OSGI LogService.log method does not work!

I have the weirdest bug, when writting my LogHelper class.

I am using org.osgi.service.log.LogService (with Apache Felix implementation).

Now I can call the:

LogService.log(int level, String message)

with no problems, but when I try to use the one with the exception:

LogService.log(int level, String message, Throwable exception)

Eclipse highlights the call as wrong, and gives me this wierd error message:

The type org.osgi.framework.ServiceReference cannot be resolved. It is indirectly referenced from required .cla开发者_运维知识库ss files


Your bundle should import package org.osgi.framework that is used by LogService.


According to nice folks at apache felix this is because Eclipse does not see ServiceReference in my classpath.

Putting the "org.osgi.core" into my (maven+osgi) dependencies, fixed it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜