mehandih / grails-jaxrs

Automatically exported from code.google.com/p/grails-jaxrs
0 stars 0 forks source link

Grails 2.2.3 with Maven and grails-jaxrs 0.8 throws NoClassDefFoundError at build time #76

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. create a new grails 2.2.3 project with maven support, like so:
  $ grails create-app jaxrstest
  $ cd jaxrstest
  $ grails create-pom com.example
2. add jaxrs-plugin, both to BuilsConfig.groovy and pom.xml (see attachment)
3. run "mvn install"

What is the expected output? What do you see instead?

I expect the project to be compilable.

What version of the product are you using? On what operating system?

I tested this example project on Windows 7
(jaxrs 0.8, grails 2.2.3)

<code>
Fatal error during compilation org.apache.tools.ant.BuildException: 
java.lang.NoClassDefFoundError: org/springframework/beans/factory/Aware (Use 
--stacktrace to see the full trace)
[ERROR] Failed to execute goal 
org.grails:grails-maven-plugin:2.2.3:maven-compile (default-maven-compile) on 
project jaxrstest: Forked Grails VM exited with error -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.grails:grails-maven-plugin:2.2.3:maven-compile (default-maven-compile) on 
project jaxrstest: Forked Grails VM exited with error
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Forked Grails VM 
exited with error
        at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:388)
        at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:308)
        at org.grails.maven.plugin.MvnCompileMojo.execute(MvnCompileMojo.java:41)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: java.lang.RuntimeException: Forked Grails VM exited with error
        at org.grails.maven.plugin.tools.ForkedGrailsRuntime.fork(ForkedGrailsRuntime.java:117)
        at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:386)
        ... 23 more
</code>

Please provide any additional information below.

I tried adding spring-beans to pom.xml to resolve the missing dependency, but 
it did not help.

Original issue reported on code.google.com by schoeffe...@gmail.com on 29 Jul 2013 at 9:55

Attachments:

GoogleCodeExporter commented 8 years ago
Any clue on this? I'm having the same problem here, although I'm not sure if 
jax-rs plugin is the cause...

Original comment by miguel.e...@gmail.com on 21 Oct 2013 at 10:07

GoogleCodeExporter commented 8 years ago
OK, refer to: https://github.com/krasserm/grails-jaxrs/pull/20

That worked for me.

Original comment by miguel.e...@gmail.com on 21 Oct 2013 at 11:59