You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Thierry Templier <te...@yahoo.fr> on 2009/02/26 11:17:58 UTC

Re: Problems with SLF4J in Felix trunk

Hello Richard,

I'm trying to make work SLF4J with Felix 1.4.1 and have the same problem than Jon:

org.osgi.framework.BundleException: Fragments with exports, imports, or native code are not currently supported.
	at org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:270)
(...)

when I try to install and start the slf4j / log4j / commons-logging bundles:

- com.springsource.slf4j.api-1.5.0.jar
- com.springsource.slf4j.log4j-1.5.0.jar
- com.springsource.slf4j.org.apache.commons.logging-1.5.0.jar
- log4j.osgi-1.2.15-SNAPSHOT.jar

Do you have investigate the problem further and fix it?

Thanks very much for your help,
Thierry

> Ok, this definitely appears to be a bug in Felix. We just added checks
> to throw exceptions when starting/stopping fragments. I thought I put 
> checks around all cases where we start/stop bundles, but apparently I 
> missed some. I committed a fix for this, so hopefully it should not be 
> an issue now. Just in time, since we are cutting a 1.4.1 release right 
> now. :-)
> 
> If you can test it really quickly right now and tell us for sure if it 
> is working, then that would be awesome...but I guess we cannot expect 
> quick turnaround on Saturday. :-)
> 
> Thanks for reporting it.
> 
> -> richard



      


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


Re: Problems with SLF4J in Felix trunk

Posted by Thierry Templier <te...@yahoo.fr>.
Interesting to know!
Thanks Dieter,
Thierry

> maybe not exactly what you asked for, but I recently posted
> an slf4j-osgi adapter on the slf4j dev mailinglist. It
> redirects all slf4j events to a LogService. You can start
> using the service layer for logging instead of package layer
> and avoid some import/export troubles, easily switch
> implementations etc ...
> 
> http://www.slf4j.org/pipermail/dev/2009-February/002104.html
> 
> Dieter.


      


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


Re: Problems with SLF4J in Felix trunk

Posted by Dieter Houthooft <di...@lin-k.net>.

On 26 Feb 2009, at 11:17, Thierry Templier wrote:

> I'm trying to make work SLF4J with Felix 1.4.1 and have the same  
> problem than Jon:

maybe not exactly what you asked for, but I recently posted an slf4j- 
osgi adapter on the slf4j dev mailinglist. It redirects all slf4j  
events to a LogService. You can start using the service layer for  
logging instead of package layer and avoid some import/export  
troubles, easily switch implementations etc ...

http://www.slf4j.org/pipermail/dev/2009-February/002104.html

Dieter.

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


Re: Problems with SLF4J in Felix trunk

Posted by Thierry Templier <te...@yahoo.fr>.
Hello João,

Thanks for your answer!

> I'm using slf4j with log4j binding, and it works quite well. Just had to
> make the change to felix.fragment.validation as Richard suggested .

I'm not sure to undestand how it can work if the fragment of the slf4j with log4j binding isn't supported. Perhaps do you use a binding packaging without fragment?

I'm really interested to know how you make it work!

Cheers,
Thierry


      


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


Re: Problems with SLF4J in Felix trunk

Posted by Thierry Templier <te...@yahoo.fr>.
Hello João,

I think that I have the explanation. Some slf4j with log4j bindings are based on fragment features and other not. I used the wrong one...

> I'm using slf4j with log4j binding, and it works quite well. Just had to
> make the change to felix.fragment.validation as Richard suggested .

Thanks for your help!!
Thierry


      


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


Re: Problems with SLF4J in Felix trunk

Posted by João Assunção <jo...@joaoassuncao.com>.
I'm using slf4j with log4j binding, and it works quite well. Just had to
make the change to felix.fragment.validation as Richard suggested .

On Thu, Feb 26, 2009 at 10:17 AM, Thierry Templier <te...@yahoo.fr> wrote:

> Hello Richard,
>
> I'm trying to make work SLF4J with Felix 1.4.1 and have the same problem
> than Jon:
>
> org.osgi.framework.BundleException: Fragments with exports, imports, or
> native code are not currently supported.
>        at
> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:270)
> (...)
>
> when I try to install and start the slf4j / log4j / commons-logging
> bundles:
>
> - com.springsource.slf4j.api-1.5.0.jar
> - com.springsource.slf4j.log4j-1.5.0.jar
> - com.springsource.slf4j.org.apache.commons.logging-1.5.0.jar
> - log4j.osgi-1.2.15-SNAPSHOT.jar
>
> Do you have investigate the problem further and fix it?
>
> Thanks very much for your help,
> Thierry
>
> > Ok, this definitely appears to be a bug in Felix. We just added checks
> > to throw exceptions when starting/stopping fragments. I thought I put
> > checks around all cases where we start/stop bundles, but apparently I
> > missed some. I committed a fix for this, so hopefully it should not be
> > an issue now. Just in time, since we are cutting a 1.4.1 release right
> > now. :-)
> >
> > If you can test it really quickly right now and tell us for sure if it
> > is working, then that would be awesome...but I guess we cannot expect
> > quick turnaround on Saturday. :-)
> >
> > Thanks for reporting it.
> >
> > -> richard
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Problems with SLF4J in Felix trunk

Posted by Thierry Templier <te...@yahoo.fr>.
Hello Stuart,

Thanks for your answer.

> certain fragments are still not yet fully supported and the framework
> will by default throw an exception when such fragments are installed.

The MANIFEST of the slf4j log4j-12 binding jar uses indeed Export-Package and Import-Package headers...

> to turn this into a warning, add the following configuration setting:
> 
>    felix.fragment.validation=warning
> 
> ( from
> http://felix.apache.org/site/apache-felix-usage-documentation.html
> )
> 
> note this just turns the install exception into a warning, it does not
> affect the current state of fragment support in the Felix framework.
> 
> [ I'll add this to the framework FAQ ]

Thanks for the hint!!

Cheers,
Thierry


      


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


Re: Problems with SLF4J in Felix trunk

Posted by Stuart McCulloch <mc...@gmail.com>.
2009/2/26 Thierry Templier <te...@yahoo.fr>

> Hello Richard,
>
> I'm trying to make work SLF4J with Felix 1.4.1 and have the same problem
> than Jon:
>
> org.osgi.framework.BundleException: Fragments with exports, imports, or
> native code are not currently supported.
>        at
> org.apache.felix.framework.util.manifestparser.ManifestParser.validateFragment(ManifestParser.java:270)
> (...)
>

certain fragments are still not yet fully supported and the framework
will by default throw an exception when such fragments are installed.

to turn this into a warning, add the following configuration setting:

   felix.fragment.validation=warning

( from http://felix.apache.org/site/apache-felix-usage-documentation.html )

note this just turns the install exception into a warning, it does not
affect the current state of fragment support in the Felix framework.

[ I'll add this to the framework FAQ ]

when I try to install and start the slf4j / log4j / commons-logging bundles:
>
> - com.springsource.slf4j.api-1.5.0.jar
> - com.springsource.slf4j.log4j-1.5.0.jar
> - com.springsource.slf4j.org.apache.commons.logging-1.5.0.jar
> - log4j.osgi-1.2.15-SNAPSHOT.jar
>
> Do you have investigate the problem further and fix it?
>
> Thanks very much for your help,
> Thierry
>
> > Ok, this definitely appears to be a bug in Felix. We just added checks
> > to throw exceptions when starting/stopping fragments. I thought I put
> > checks around all cases where we start/stop bundles, but apparently I
> > missed some. I committed a fix for this, so hopefully it should not be
> > an issue now. Just in time, since we are cutting a 1.4.1 release right
> > now. :-)
> >
> > If you can test it really quickly right now and tell us for sure if it
> > is working, then that would be awesome...but I guess we cannot expect
> > quick turnaround on Saturday. :-)
> >
> > Thanks for reporting it.
> >
> > -> richard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

-- 
Cheers, Stuart