How do I use Hibernate in a dependency of a Grails project?

This is a follow on to the question posed here: http://devnet.jetbrains.net/thread/434579

I have a Grail application that references a Java library (as a Module dependency).  This works, but as soon as I add hibernate as a dependency of the Java library the Grails will no longer run.

| Loading Grails 2.0.1

| Error Error executing script RunApp: Provider for javax.xml.parsers.SAXParserFactory cannot be found (Use --stacktrace to see the full trace)



(see the referenced question for the expanded stack trace).

I can't see any good way around this.  The Grails dependency-report does not show any libraries in conflict.  The error occurs if the hibernate plugin is installed in the Grails application or not.

Suggestions?
5 comments
Comment actions Permalink

I recommend you ask this on Grails forum: http://grails.1312388.n4.nabble.com/Grails-user-f1312389.html   Because it is not an IDE related issue.

0
Comment actions Permalink

Sorry, I should have been more specific.

If I bring the dependency in via the groovy build configuration, I do not have the issue.  The issue only shows up when I do module dependency management.  

So while, technically, it isn't an IDE issue, it will only show up when using the IDE and I doubt the Grails people will be able to help me with this.

Adding

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.0.0.Final</version>
        </dependency>


to the POM file of my sample project in the other question will demonstrate the issue.
0
Comment actions Permalink

I'm sorry, I said unclearly in my last post. You should not remove dependencies from BuildConfig.groovy. Return it. Dependency to java library should be defined in both place BuildConfig.groovy and IDEA dependency manager.
Navigation will work after update IDEA to last EAP: http://confluence.jetbrains.net/display/IDEADEV/IDEA+11.1+EAP

0
Comment actions Permalink

This does not actually address the issue with the hibernate dependency, any suggestions on that?

0
Comment actions Permalink

Bump.

I know you guys are pounding away on 11.1, so this isn't really a nag.  I just don't want it to fall off the edge of the earth.

Andy

0

Please sign in to leave a comment.