Frage

my primary attempt is to build a CRUD app using Roo, following the example here:

https://www.icts.uiowa.edu/confluence/display/ICTSit/Spring+Roo+Tutorial

I am using Roo 1.2.5, Maven 3.1.1, and Spring 3.2.6 on JRE7.

This has been the best tutorial I have found so far. If anyone has a better example, please share!

However, when I execute the project in my Tomcat environment things still break. The primary error from there is:

HTTP Status 500 -  
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.NoClassDefFoundError: org/springframework/util/MimeType   

I have built multiple projects using Roo over the past few days, either from this tutorial or 10 others that all start with the reverse engineer command, and all give me the same type of a NoClassDefFoundError, either with this class or another. I understand this means that my pom.xml is more than likely incorrect, but I am hoping this is an issue with my configuration rather than something all Roo developers have simply accepted as manual maintenance.

Any advice would be tremendous... is it possible that the version of Roo combined with Spring and Maven I am using is simply buggy? I would love to use this framework/toolkit, but am nearing the point where manually writing the scaffolding by hand may be more straightforward.

.... UPDATE:

By adding the following dependency manually, I was able to run the project. However, I want to leave the question open to see if anyone further knows whether this missing jar is a known bug given the version of Spring Roo I am using, or otherwise:

<dependency>  
    <groupId>commons-fileupload</groupId>  
    <artifactId>commons-fileupload</artifactId>  
    <version>1.2.2</version>  
</dependency>

Thanks!

War es hilfreich?

Lösung

The best examples are those included in Roo: clinic.roo, pizzashop.roo, etc

Just run Roo and execute any of them as follows:

/_/ |_|\____/\____/    1.2.4.RELEASE [rev 75337cf]


Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
roo> script --file clinic.roo

On the other side, the reference doc is a good starting point: http://docs.spring.io/spring-roo/reference/html/

Finally, about java.lang.NoClassDefFoundError: org/springframework/util/MimeType note MimeType class was included in Spring 4 and Roo sets up your project for Spring 3, so you must customize the pom.xml as needed.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top