Noy
Noy

Reputation: 65

Groovy/Grails Tool Suite Connect to Existing MySQL database

I'll preface this by saying this is the first time I'm working with Grails.

I'm trying to connect to an existing database, so that I can create domain classes from the database. I've installed the Grails Database Reverse Engineering Plugin (version 4.0.0) and I am using Grails 2.4.4. I've followed the steps in the official user guide for the plugin and here.

When I run the command "-Dgrails.env=extract db-reverse-engineer" I get the following error:

[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException:    startup failed:
[groovyc] Compile error during compilation with javac.
[groovyc] GenericResponseWrapper.java:203: error: method does not override or implement a method from a supertype
[groovyc]   @Override
[groovyc]   ^
[groovyc] PageFragmentCachingFilter.java:389: error: cannot find symbol
[groovyc]           contentType = response.getContentType();
[groovyc]                                 ^
[groovyc]   symbol:   method getContentType()
[groovyc]   location: variable response of type HttpServletResponse
[groovyc] Note: Some input files use unchecked or unsafe operations.
[groovyc] Note: Recompile with -Xlint:unchecked for details.
[groovyc] 2 errors
[groovyc] 
[groovyc] 
[groovyc] 1 error

Hopefully I haven't left out too much information, please let me know what else I need to provide. Thank you.

Upvotes: 1

Views: 203

Answers (1)

Noy
Noy

Reputation: 65

OK, so what solved it for me was switching to version 3.0.0 of the Grails Database Reverse Engineering Plugin and then also using Hibernate 3.x.x.. I also commented the line "compile ':cache:1.1.8'" in BuildConfig.groovy. Once the models are created, you can always remove the comment. I hope this helps someone!

Upvotes: 1

Related Questions