You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Philipp Höfler <Ph...@pernexas.com> on 2018/08/01 08:58:51 UTC

Felix Log Service version 1.2.0 cannot be referenced

Hi,

I am trying to utilize the new Felix Log Service (1.2.0) with DS.
But no matter what I am trying, the reference is always null.

I added a field with the annotation in my class.

@Reference(service = org.osgi.service.log.LoggerFactory.class)
private org.osgi.service.log.Logger _logger;

In addition, I've added the following two bundles to the -runbundles property of my bndrun file:

org.apache.felix.log;version='[1.2.0,1.2.1)',\
org.apache.felix.log.extension;version='[1.0.0,1.0.1)',\

I am not sure, if this is really necessary.
Even if no logger implementation (logback, log4j) is available, I would have expected that the reference could be resolved?

But also, when I add logback to the -runbundles, the logger cannot be resolved and is always null

ch.qos.logback.classic;version='[1.2.3,1.2.4)',\
ch.qos.logback.core;version='[1.2.3,1.2.4)',\

You can inspect the whole project on GitHub:
https://github.com/phhoef/osgi-test/blob/master/rest-service/src/main/java/com/my/app/rest/rest/ServerInfoControllerImpl.java

Thanks

Re: Felix Log Service version 1.2.0 cannot be referenced

Posted by Carsten Ziegeler <cz...@apache.org>.
I just started the release process for SCR 2.1.2 which contains the fix.

If everything goes well, it will be available on Monday

Regards

Carsten


Philipp Höfler wrote
> Hallo Ray,
> 
> thanks for pointing this out. 😊
> 
> Best,
> Philipp
> 
> -----Ursprüngliche Nachricht-----
> Von: Raymond Auge <ra...@liferay.com> 
> Gesendet: Mittwoch, 1. August 2018 22:51
> An: felix users <us...@felix.apache.org>
> Betreff: Re: Felix Log Service version 1.2.0 cannot be referenced
> 
> There's a bug in Felix SCR which solves this but it is not yet released.
> 
> I won't be able to do it at least 'till next week.
> 
> Sincerely,
> - Ray
> 
> On Wed, Aug 1, 2018, 04:59 Philipp Höfler, <Ph...@pernexas.com>
> wrote:
> 
>> Hi,
>>
>> I am trying to utilize the new Felix Log Service (1.2.0) with DS.
>> But no matter what I am trying, the reference is always null.
>>
>> I added a field with the annotation in my class.
>>
>> @Reference(service = org.osgi.service.log.LoggerFactory.class)
>> private org.osgi.service.log.Logger _logger;
>>
>> In addition, I've added the following two bundles to the -runbundles 
>> property of my bndrun file:
>>
>> org.apache.felix.log;version='[1.2.0,1.2.1)',\
>> org.apache.felix.log.extension;version='[1.0.0,1.0.1)',\
>>
>> I am not sure, if this is really necessary.
>> Even if no logger implementation (logback, log4j) is available, I 
>> would have expected that the reference could be resolved?
>>
>> But also, when I add logback to the -runbundles, the logger cannot be 
>> resolved and is always null
>>
>> ch.qos.logback.classic;version='[1.2.3,1.2.4)',\
>> ch.qos.logback.core;version='[1.2.3,1.2.4)',\
>>
>> You can inspect the whole project on GitHub:
>>
>> https://github.com/phhoef/osgi-test/blob/master/rest-service/src/main/
>> java/com/my/app/rest/rest/ServerInfoControllerImpl.java
>>
>> Thanks
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: Felix Log Service version 1.2.0 cannot be referenced

Posted by Philipp Höfler <Ph...@pernexas.com>.
Hallo Ray,

thanks for pointing this out. 😊

Best,
Philipp

-----Ursprüngliche Nachricht-----
Von: Raymond Auge <ra...@liferay.com> 
Gesendet: Mittwoch, 1. August 2018 22:51
An: felix users <us...@felix.apache.org>
Betreff: Re: Felix Log Service version 1.2.0 cannot be referenced

There's a bug in Felix SCR which solves this but it is not yet released.

I won't be able to do it at least 'till next week.

Sincerely,
- Ray

On Wed, Aug 1, 2018, 04:59 Philipp Höfler, <Ph...@pernexas.com>
wrote:

> Hi,
>
> I am trying to utilize the new Felix Log Service (1.2.0) with DS.
> But no matter what I am trying, the reference is always null.
>
> I added a field with the annotation in my class.
>
> @Reference(service = org.osgi.service.log.LoggerFactory.class)
> private org.osgi.service.log.Logger _logger;
>
> In addition, I've added the following two bundles to the -runbundles 
> property of my bndrun file:
>
> org.apache.felix.log;version='[1.2.0,1.2.1)',\
> org.apache.felix.log.extension;version='[1.0.0,1.0.1)',\
>
> I am not sure, if this is really necessary.
> Even if no logger implementation (logback, log4j) is available, I 
> would have expected that the reference could be resolved?
>
> But also, when I add logback to the -runbundles, the logger cannot be 
> resolved and is always null
>
> ch.qos.logback.classic;version='[1.2.3,1.2.4)',\
> ch.qos.logback.core;version='[1.2.3,1.2.4)',\
>
> You can inspect the whole project on GitHub:
>
> https://github.com/phhoef/osgi-test/blob/master/rest-service/src/main/
> java/com/my/app/rest/rest/ServerInfoControllerImpl.java
>
> Thanks
>

Re: Felix Log Service version 1.2.0 cannot be referenced

Posted by Raymond Auge <ra...@liferay.com>.
There's a bug in Felix SCR which solves this but it is not yet released.

I won't be able to do it at least 'till next week.

Sincerely,
- Ray

On Wed, Aug 1, 2018, 04:59 Philipp Höfler, <Ph...@pernexas.com>
wrote:

> Hi,
>
> I am trying to utilize the new Felix Log Service (1.2.0) with DS.
> But no matter what I am trying, the reference is always null.
>
> I added a field with the annotation in my class.
>
> @Reference(service = org.osgi.service.log.LoggerFactory.class)
> private org.osgi.service.log.Logger _logger;
>
> In addition, I've added the following two bundles to the -runbundles
> property of my bndrun file:
>
> org.apache.felix.log;version='[1.2.0,1.2.1)',\
> org.apache.felix.log.extension;version='[1.0.0,1.0.1)',\
>
> I am not sure, if this is really necessary.
> Even if no logger implementation (logback, log4j) is available, I would
> have expected that the reference could be resolved?
>
> But also, when I add logback to the -runbundles, the logger cannot be
> resolved and is always null
>
> ch.qos.logback.classic;version='[1.2.3,1.2.4)',\
> ch.qos.logback.core;version='[1.2.3,1.2.4)',\
>
> You can inspect the whole project on GitHub:
>
> https://github.com/phhoef/osgi-test/blob/master/rest-service/src/main/java/com/my/app/rest/rest/ServerInfoControllerImpl.java
>
> Thanks
>