Hi guys,
sorry I was out for a rugby game ;)
Pax Logging wraps log4j, it doesn't import the whole log4j api.
Some part of the log4j API is not included because all doesn't make
sense in OSGi.
It's the case for org.apache.log4j.LogManager: it's part of log4j but
it's not included in pax-logging (api or service).
In the latest pax-logging release, I included a couple of Log4j and
SLf4j new classes, but not this one as it's not really usefull in OSGi
(due to the Logging service).
So, what's your usage of LogManager ? I'm pretty sure you can avoid to
use it.
Regards
JB
On 08/13/2014 10:21 PM, asookazian2 wrote:
Thanks for the tip. I tried this and it did not work.
Still seeing exception in the karaf.log:
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.LogManager not
found by org.ops4j.pax.logging.pax-logging-api [7]
I will try to research the response that Achim gave. thx guys.
bane73 wrote
Not really the most correct answer, but try modifying your export section
to export everything.
That SHOULD work, I believe, because your project is using that JAR (thus,
it's contained inside of it) but you are not telling OSGI that you want to
use it and so it is blocking it from your JAR's classpath.
IOW, in your POM right below the
<Bundle-ClassPath>
section you should have a
<Export-Package>
section. Delete everything and replace with a wildcard:
ie:
<Export-Package>
*
</Export-Package>
That should do the trick. If it does, don't settle for that though. The
correct answer is, I think, to install org.apache.log4j either as it's own
bundle or as a part of a "dependency"-bundle. I'm still pretty new to
OSGI, though, so I could be wrong.
--
View this message in context:
http://karaf.922171.n3.nabble.com/No-appenders-could-be-found-for-logger-log4j-related-tp4034739p4034752.html
Sent from the Karaf - User mailing list archive at Nabble.com.
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com