简体   繁体   中英

java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger in Tomcat(Ubuntu 16.04)

I 'm getting this exception when I am trying to deploy the .war file in Tomcat

java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
        at org.hibernate.ejb.Ejb3Configuration.<clinit>(Ejb3Configuration.java:142)
        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:55)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47)

Please be aware that:

-The same .war file is already working on a different Server(Linux OpenSuse)

-I copied the Tomcat folder(all the server's) from the old server(OpenSuse) to the new server(Ubuntu 16.04). This way the files are the same.

-The JVM is the same in both of the servers.

-The exception does not happen during Development time(in Eclipse).

My questions are:

-Some people have suggested me to change my maven pom files. Does it make sense? Because as I said the .war is already working on the OpenSuse server.

-Should I be able to deploy the same.war without any change. Shouldn't I?

There is at-least one of the libraries missing in the server you are getting the error.

Check all libraries in the $PATH variables you are using in the server its working.

Hope this Helps!

Regards, Eby

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM