简体   繁体   中英

Error on war file deployment on WebLogic Server

I am deploying one war file on WebLogic server (12.1.3.0.0) but when I try to start that application to serve all requests. It get failed with the following error message: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.hasExceptionMappings()Z org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.hasExceptionMappings()Z .

The same war file is working fine on Windows platform and other Linux machines but I am getting that error on one particular Linux machine so my understanding is that there is something missing (eg some package) on this machine but I am unable to identify that what exactly.

It means "I cannot find the method hasExceptionMappings inside class org.springframework.web.method.annotation.ExceptionHandlerMethodResolver"

Please check if the spring jar version that the WebLogic using is different when you are compile the WAR. The spring library could be a shared library, you may check the classpath first.

FYI: https://docs.oracle.com/middleware/1212/wls/WLPRG/classloading.htm#WLPRG319

If this code works on other machines and is definitely an identical deployment, then the difference must be on the machine where you are deploying it. I agree you should check the versions of the Spring files that are provided on this server against those where it does run successfully. When you find a difference you will know what needs fixing.

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