-1

In my Java application I'm using Spring 4.0.3. It starts without any Exceptions or Errors.

When I invoke a Rest- Service of my application to store something in my database I get the following stacktrace:

09:19:13,056 ERROR [io.undertow.request] (default task-10) UT005023: Exception handling request to /myapp/messages/myTemplate/cb5dc950-db86-11e5-90bc-168020524153: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/eaio/uuid/UUID
at org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1276)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:958)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)

The Error appears at this line of code:

final MessageTemplateNotGroup contactMessageTemplateNotGroup = this.saveOrUpdate(messageTemplateNotGroup);

This is how the mehtod saveOrUpdate is defined:

/** {@inheritDoc} */
public T saveOrUpdate(final T entity) {
    getSession().saveOrUpdate(entity);
    return entity;

}

In my application pom I have defined the uuid artefact:

<dependency>
    <groupId>com.eaio.uuid</groupId>
    <artifactId>uuid</artifactId>
    <version>3.2</version>
</dependency>

I dont know why the uuid artefact is not be find and why I get the NoClassDefFoundError?

jars in war file

quma
  • 5,233
  • 26
  • 80
  • 146
  • If you try mvn dependency:tree on the command line do you see the dependency `com.eaio.uuid` in the output? – gil.fernandes Jan 09 '18 at 08:35
  • Take look into the war, if the library is in the WEB-INF/lib Directory. If not post the complete pom and give more Details about the Project structure. – Jens Jan 09 '18 at 08:38
  • [INFO] +- com.eaio.uuid:uuid:jar:3.2:compile is in the dependency tree – quma Jan 09 '18 at 08:42

1 Answers1

0

If you are using @ModelAttribute /myapp/messages/myTemplate/{xyz} request, then change this to @RequestParam.

or

Try to use WildFly - 8.2 or use Jboss 7, because this is an issue with WildFly - 11 and WildFly - 8.1.

If not solved then send me request method you call.

ankit
  • 2,591
  • 2
  • 29
  • 54
  • take [link](https://stackoverflow.com/questions/14332982/org-springframework-web-util-nestedservletexception-request-processing-failed) reference – ankit Jan 09 '18 at 08:57