Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to use slf4j/Logback on weblogic

ILya CycloneMay 13 2020 — edited May 26 2020

Trying to reuse a library in ADF application.

I have some library code packaged as jar. Library application is created with maven and uses logback.

library pom.xml:

<dependency>

  <groupId>ch.qos.logback</groupId>

  <artifactId>logback-classic</artifactId>

  <version>1.2.3</version>

</dependency>

Library and its logging are working fine in junit tests.

Library is packaged as jar and copied into ADF application ViewController/public_html/WEB-INF/lib.

In ViewController project properties / Library and Classpath this jar is added with Add JAR button.

ADF application starts on integrated weblogic but when library code is called, I'm getting

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory

I tried

  <container-descriptor>

    <prefer-web-inf-classes>true</prefer-web-inf-classes>

and

  <container-descriptor>

    <prefer-application-packages>

      <package-name>org.slf4j.*</package-name>

in weblogic.xml, but neithed helped.

JDeveloper 12.2.1.3

This post has been answered by ILya Cyclone on May 13 2020
Jump to Answer
Comments
Post Details
Added on May 13 2020
6 comments
4,998 views