1

I'm new to stackoverflow :)

I have a problem which has already been asked some times (e.g. "Groovy:unable to resolve class ..." (import error in LoginController.groovy)) ... and I didn't want to start a new topic but all the advices mentioned didn't help.

I'm using GGTS 3.5.1, grails 2.4.2 and runtime ":hibernate4:4.3.5.4". I wanted to create my own CustomNamingStrategy as exemplified in http://grails.org/doc/latest/guide/GORM.html#customNamingStrategy

This is what I have so far:

package test

import org.hibernate.cfg.ImprovedNamingStrategy
import org.hibernate.util.StringHelper

class CustomNamingStrategy extends ImprovedNamingStrategy {

    String classToTableName(String className) {
        "tbl" + StringHelper.unqualify(className)
    }

}

However, GGTS continously tells me that "Groovy:unable to resolve class org.hibernate.util.StringHelper". I've already tried to refresh dependencies, clean and build the project but without success.

Maybe one of you can help me - would be great!

Thanks for all!

Community
  • 1
  • 1
gabriel
  • 347
  • 3
  • 18
  • 1
    It appears that the `StringHelper` class has moved to a different package in hibernate4. Try: `import org.hibernate.internal.util.StringHelper` You might also think about using a different string utility class, since the "internal" designation may mean that the Hibernate class could change at any time (ie. non-published API) – Andrew Jul 02 '14 at 18:05

0 Answers0