<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">Unfortunately I don’t see immediately how that helps, sorry.</div><div class=""><br class=""></div><div class="">Thank you,</div><div class="">J</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 28, 2016, at 17:35, Srikanth Hugar <<a href="mailto:srikanth.hugar@gmail.com" class="">srikanth.hugar@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">  It's been long time since I made it successful, let me know whether mentioned link helps you. Otherwise I will try to pull code and send you. </p><p dir="ltr" class=""><a href="http://srikanthhugar.blogspot.in/2014/07/how-to-configure-pax-logging-to-use.html?m=1" class="">http://srikanthhugar.blogspot.in/2014/07/how-to-configure-pax-logging-to-use.html?m=1</a></p>
<div class="gmail_quote">On Jan 29, 2016 6:43 AM, "Joel W" <<a href="mailto:witt403@googlemail.com" class="">witt403@googlemail.com</a>> wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br class="">
<br class="">
I’m switching logging mechanisms from JUL to SLF4J+Logback on an application that is an OSGi bundle - it’s a plugin for an OSGi application. However, I’m getting some wiring problems: many Logback dependencies don’t seem to be resolved. I have the relevant Maven dependencies as follows:<br class="">
<br class="">
         <dependency><br class="">
         <groupId>org.slf4j</groupId><br class="">
         <artifactId>slf4j-api</artifactId><br class="">
         <version>1.7.12</version><br class="">
     </dependency><br class="">
     <dependency><br class="">
         <groupId>ch.qos.logback</groupId><br class="">
         <artifactId>logback-core</artifactId><br class="">
         <version>1.1.3</version><br class="">
     </dependency><br class="">
     <dependency><br class="">
         <groupId>ch.qos.logback</groupId><br class="">
         <artifactId>logback-classic</artifactId><br class="">
         <version>1.1.3</version><br class="">
     </dependency><br class="">
<br class="">
All 3 of these are specified in the class path of the application runner script. This script also points to a basic logback.xml configuration file that just prints to stdout. For bundling I use the maven-bundle-plugin v3.0.1, where the relevant directives are:<br class="">
<br class="">
<Export-Package><br class="">
        org.slf4j*, ch.qos.logback*<br class="">
</Export-Package><br class="">
<Embed-Transitive>true</Embed-Transitive><br class="">
<br class="">
The application gets assembled using maven-assembly-plugin v2.6; I’ve attempted to have the above 3 dependencies start as bundles, before the main application, or simply included them in my /lib/ folder. Upon attempting to initialize the application, I get the error:<br class="">
<br class="">
14:13:01.540 [FelixStartLevel] ERROR o.p.o.framework.FrameworkSlf4jLogger - Error starting file:/…/app-name/target/distribution/bundles/app.jar<br class="">
org.osgi.framework.BundleException: Unresolved constraint in bundle app [15]: Unable to resolve 15.0: missing requirement [15.0] osgi.wiring.package; (osgi.wiring.package=groovy.lang)<br class="">
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002) ~[org.apache.felix.main-4.4.1.jar:na]<br class="">
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2045) ~[org.apache.felix.main-4.4.1.jar:na]<br class="">
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299) ~[org.apache.felix.main-4.4.1.jar:na]<br class="">
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) [org.apache.felix.main-4.4.1.jar:na]<br class="">
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25]<br class="">
<br class="">
If I include groovy.lang* in the <Export-Package> directive, then I get another missing requirement: javax.jms, and this keeps going with packages that Logback depends on (javax.mail, java.mail.internet, javax.servlet…). I’ve experimented quite a bit, but unfortunately I can’t spot what I’m missing or doing wrong. Does anyone have any idea what might be wrong?<br class="">
<br class="">
Any help would be greatly appreciated!<br class="">
<br class="">
Many thanks,<br class="">
Joel<br class="">
_______________________________________________<br class="">
logback-user mailing list<br class="">
<a href="mailto:logback-user@qos.ch" class="">logback-user@qos.ch</a><br class="">
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" rel="noreferrer" target="_blank" class="">http://mailman.qos.ch/mailman/listinfo/logback-user</a></blockquote></div>
_______________________________________________<br class="">logback-user mailing list<br class=""><a href="mailto:logback-user@qos.ch" class="">logback-user@qos.ch</a><br class="">http://mailman.qos.ch/mailman/listinfo/logback-user</div></blockquote></div><br class=""></div></body></html>