ERROR [org.springframework.web.servlet.DispatcherServlet]

My code is built in maven and uses jBoss 6 and java 7

The code works fine on the local machine, but when I try to start a war on the server, I get an error

ERROR [org.springframework.web.servlet.DispatcherServlet]

I tried using aop jar but still didn't manage to

Can someone explain the error to me and how to solve it?

+7
java spring-mvc maven jboss
source share
2 answers

It does not work when creating @Beans . In particular, it fails because NoClassDefFoundError: org / springframework / core / convert / converter / ConvertingComparator, which means that it cannot find the class definition for "ConvertingComparator". The earliest documentation I can find on ConvertingComparator, Spring 3.2.0 . Remember, you are using Spring 3.1.0.RELEASE . I tried to run the basic Spring project using your POM and ran into similar problems using the Spring version you provided. I also ran into conflicts with Spring 3.2.0 . I recommend using Spring 4.3.5.RELEASE in POM. I had no problems running my basic example after setting the properties you have:

<properties> <org.springframework.version>4.3.5.RELEASE</org.springframework.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> 

However, you may have other problems in your code. It is difficult to provide a holistic solution without additional information.

EDIT:

So, here are all your Spring dependencies:

spring - beans spring -web spring -webmvc spring -TX spring -jdbc

So first, let's talk about redundancy. spring-webmvc contains spring-web and spring-beans . Therefore, you can remove these dependencies from your POM, as they are redundant. spring-jdbc contains spring -tx , which makes this inclusion redundant. You can delete all data from POM right now for cleaning.

In your comment, you mentioned a new error that occurs because the org.springframework.mail package was not found. This package is in spring -context-support . Spring contextual support is indeed found in spring -webmvc , as well as an additional dependency. (so you have to turn it on manually)

In accordance with this thread, this package was moved to contextual support separately. I assume that you are trying to specifically use some of the objects available in the .mail package, and because you did not enable it, it was not found. With additional information about your project, the more we can dive into why 3.2 does not work, but 4.1 works. The difference is that all this means that 3.2 dependencies that you called did not display the required packages, but 4.1 dependencies.

+7
source share

You stopped the process, I mean, what specific bean can be used?

0
source share

All Articles