Fatal Error running the 'Creating a JRuby Plugin' Example
The 'Creating a JRuby Plugin' Example (18-4) does not seem to work for me. When I run the `mvn install` command, I get the following error:
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] edu/emory/mathcs/backport/java/util/concurrent/locks/ReentrantLock
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/locks/ReentrantLock
at org.jruby.internal.runtime.ThreadService.<init>(ThreadService.java:55)
at org.jruby.Ruby.<init>(Ruby.java:115)
at org.jruby.Ruby.newInstance(Ruby.java:242)
at org.jruby.Ruby.getDefaultInstance(Ruby.java:232)
at org.codehaus.plexus.component.jruby.JRubyRuntimeInvoker.invoke(JRubyRuntimeInvoker.java:288)
My guess is that the jruby-maven-plugin has a dependency on the code JRuby lib, but not the complete lib. I have tried adding the missing dependencies but it doesn't work. I am using Maven version 2.0.9. Has anyone came across this? </init></init>
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] edu/emory/mathcs/backport/java/util/concurrent/locks/ReentrantLock
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/locks/ReentrantLock
at org.jruby.internal.runtime.ThreadService.<init>(ThreadService.java:55)
at org.jruby.Ruby.<init>(Ruby.java:115)
at org.jruby.Ruby.newInstance(Ruby.java:242)
at org.jruby.Ruby.getDefaultInstance(Ruby.java:232)
at org.codehaus.plexus.component.jruby.JRubyRuntimeInvoker.invoke(JRubyRuntimeInvoker.java:288)
My guess is that the jruby-maven-plugin has a dependency on the code JRuby lib, but not the complete lib. I have tried adding the missing dependencies but it doesn't work. I am using Maven version 2.0.9. Has anyone came across this? </init></init>
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
-
Inappropriate?Resolved this problem. I added the following two dependencies to the pom:
<dependency>
<groupid>backport-util-concurrent</groupid>
<artifactid>backport-util-concurrent</artifactid>
<version>3.0</version>
</dependency>
<dependency>
<groupid>asm</groupid>
<artifactid>asm-all</artifactid>
<version>2.2.3</version>
</dependency>
I’m happy
-
Inappropriate?Thanks for the fix kman.
Just wanted to let everyone know to be sure to add the dependency in both areas of the dependency tags like so:
<project>
<modelversion>4.0.0</modelversion>
<groupid>com.mycompany</groupid>
<artifactid>rubyplugin</artifactid>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<dependencies>
<dependency>
<groupid>org.codehaus.mojo</groupid>
<artifactid>jruby-maven-plugin</artifactid>
<version>1.0-beta-4</version>
</dependency>
<dependency>
<groupid>backport-util-concurrent</groupid>
<artifactid>backport-util-concurrent</artifactid>
<version>3.0</version>
</dependency>
<dependency>
<groupid>asm</groupid>
<artifactid>asm-all</artifactid>
<version>2.2.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactid>maven-plugin-plugin</artifactid>
<dependencies>
<dependency>
<groupid>org.codehaus.mojo</groupid>
<artifactid>jruby-maven-plugin</artifactid>
<version>1.0-beta-4</version>
</dependency>
<dependency>
<groupid>backport-util-concurrent</groupid>
<artifactid>backport-util-concurrent</artifactid>
<version>3.0</version>
</dependency>
<dependency>
<groupid>asm</groupid>
<artifactid>asm-all</artifactid>
<version>2.2.3</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
1 person says
this answers the question
Loading Profile...



