Search code examples
jerseyswaggerjax-rsweblogic

How to fix slf4j error in WebLogic deploy


I'm trying to deploy a REST Service (JAX-RS Jersey + Swagger) in Weblogic Server (without Maven) and I'm getting this error:

weblogic.application.ModuleException: java.lang.NoClassDefFoundError: org/slf4j/spi/LocationAwareLogger

I have referenced the .jar in the project: enter image description here

I've tried adding weblogic.xml and adding:

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

And

<prefer-application-packages>
            <package-name>org.slf4j</package-name> (and org.slf4j.*)
</prefer-application-packages>

And

<resource-name>org/slf4j/spi/LocationAwareLogger.class</resource-name> 

But doesn't work :(

Does anyone know what this could be?

Thanks & Regards


Solution

  • Finally I solved it, I have been adding the libraries one by one as I needed and in the end I only needed these: enter image description here