Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7756657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:52:46+00:00 2026-06-01T12:52:46+00:00

I have a Grail application that references a Java library (as an IntelliJ Module

  • 0

I have a Grail application that references a Java library (as an IntelliJ 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)

In my Java module, I am adding hibernate with the following:

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

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.

Bear in mind that (in this case) the Java library is not being incorporated via the BuildConfig.groovy. It is being incorporated as an IntelliJ Module dependency. If I incorporate the module as a jar via BuildConfig.groovy, everything works, but I lose the ability to step into the Java code.

Clarifying:

Per the JetBrains folks, the Java library is incorporated both as an IntelliJ Module dependency and in the BuildConfig.groovy. When executed from the command line, the project works, this is only an issue when starting from the IDE.

Suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:52:47+00:00Added an answer on June 1, 2026 at 12:52 pm

    After experimentation, I stumbled upon the following which seems to be working very well (at least in IDEA 11.1):

    • Your Java library JAR should be referenced from the
      BuildConfig.groovy (we use Maven, so we had to add the local Maven
      repo as well)
    • Also reference your modules as module dependencies of the Grails module
    • (this is critical) in the run config for your grails project, uncheck the “add –classpath …” option

    The module dependency gives you:

    • Immediate awareness of the Java classes and their methods from the Grails project
    • Support for stepping into the Java code from your Grails project.

    The BuildConfig reference gives you:

    • support for the grails commands, including run-app (which is how IntelliJ kicks things off when running/debugging a project)

    If you leave the –classpath option checked, then you foul up the way that grails resolves its dependencies. There may be a better way to do this, but I haven’t found it.

    Additional Note

    There’s a bug in the interaction of grails and maven which causes grails to not pull in dependencies from local Maven 3 repositories if the pom.xml wasn’t changed.

    Therefore, our complete dependency refresh cycle looks like:

    • goto top
    • mvn clean install
    • find the relevant POM files in the repo and touch them
    • back to grails app directory and grails refresh-dependencies
    • run the app

    You only need to do this when there are updates to the upstream Java libraries.

    Hat tip to Sergey from Jet Brains for tracking that one down.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a groovy/grails application that needs to serve images It works fine on
I have an application that needs to send e-mails. Currently, this is what I
I have an implementation that just like gmail application, but have met some problem
I have one grails application.In that I have one model class named Book. From
I have created an application that creates notifications, using the following code: // notification
I have developed a grails application that stores a great deal of information. Currently,
Here is the scenario. I have an file outside of my Grails application that
My Grails application has a large number of enums that look like this: public
I have a third party application that requires a 'POP 3 connection string'. I'd
I have a Grails application that I am migrating from 1.0.3 to 1.3.7 It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.