Skip to content
Advertisement

Type mismatch: cannot convert from org.slf4j.Logger to org.apache.log4j.Logger

i configure my environment in eclipse Mars but i got an error with the log4j. I use spring 4 and maven as dependency manager. Hier some part of code:

Eclipse show me an error on this line, the second part after the equals:

JavaScript

The error:

JavaScript

My propertyConfiguration is into the com.myapp.bootstrap and the xml file into src/main/resources.

my log4j.xml file:

JavaScript

And someone any ideas?

Thank

Advertisement

Answer

Check your imports. Sometimes Eclipse chooses the import org.slf4j.Logger instead of org.apache.log4j.Logger.

Use combination of either

JavaScript

or

JavaScript

or

Slf4j according to your library

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement