mardi 7 juillet 2015

log4j/slf4j breaks deploy to glassfish 4

I have an EJB project I'm deploying to Glassfish via eclipse, and the following line of code causes the deploy to break:

Logger L = LoggerFactory.getLogger(IPersonDao.class);

If I remove this line, it works fine. I can leave the slf4j import statements and if I comment out this line, no problem. If I enable this like, Glassfish gives an error:

java.lang.RuntimeException: Unable to load the EJB module. DeploymentContext does not contain any EJB. ...

Why? This makes no sense, and if I use either a log4j Logger or an slf4j Logger the deploy breaks. Comment out that line, and it works.

What gives?

Aucun commentaire:

Enregistrer un commentaire