InvocationTargetException when re-importing a grails app

I've changed the pom.xml of my grails app and when I try to re-impot it I get the following errors:

[INFO] [grails:maven-compile]
[ERROR] BUILD FAILED
[ERROR] Unable to start Grails

java.lang.reflect.InvocationTargetException

org.apache.maven.plugin.PluginExecutionException: Mojo execution failed.
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:601)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498
...
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to start Grails
    at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:253)
...
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.codehaus.groovy.grails.cli.support.GrailsBuildHelper.execute(GrailsBuildHelper.java:119)
...
Caused by: java.lang.reflect.InvocationTargetException
...
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:129)

If I run grails:maven-compile outside of IDEA I get no errors.

The environment:

  • IntelliJIDEA 8.1 (build 9732)
  • Grails 1.1
  • Maven 2.0.9


What is wrong?

Regards,
Felipe Cypriano

3 comments
Comment actions Permalink

Hi, Felipe,

Please try disabling automatic folders update on import on Settings->Maven->Importing page. It seems to be a problem with Maven Embedder + Maven Grails plugin compatibility.

Thanks,
Anton Makeev

0
Comment actions Permalink

Ok Anton,

But the project is a Maven Multi Project, and only the Grails subproject is having trouble. By disabling automatic update folder on import I get any problems with my other projects? What would be the consequences of this option?

Regards,
Felipe Cypriano

0
Comment actions Permalink

This option disables automatic source generation in orfer for IDEA to discover custom source folders generated by plugins.
If you don't have such, you may safely disable this option. If you have, you can manually setup the source folders.

In the next eap will be available an option to select a phase to run during this task, with such an option you will be able to configure it according to your particular configuration.

Thanks,
Anton  Makeev

0

Please sign in to leave a comment.