Cuke4Duke/Eclipse/Maven Newbie with problems debugging.

328 views
Skip to first unread message

lexstarwind

unread,
Mar 31, 2011, 4:34:04 PM3/31/11
to Cukes
I've been having a problem for the last couple of days getting a
proper cuke4duke development environment setup. I'm using Maven 3.0.3,
Eclipse Helio SR2, and Cuke4Duke 0.4.3 in a Window XP environment. I
did have ruby and jruby installed (for other projects), but I have
removed them in case they were cause some sort of conflict. I setup a
basic toy example that actually runs fine from the command line. All
tests pass, at least they do now, but my problem is that I can't debug
using eclipse. I'm not sure what the problem is. I followed the
directions from the following link https://github.com/aslakhellesoy/cuke4duke/wiki/Debug-Cuke4Duke-Steps.
But every time i try to debug (from the IDE or remotely) I get the
same error:

java.lang.NoClassDefFoundError: org/jruby/Main

I understand that cuke4duke uses jruby, but I'm really a .Net
developer, so all this is new to me. I'll post the Step definition and
feature file content below, but I don't think that is the problem,
because I can run mvn integration-test from the command line and the
test runs and passes. I purposely injected an error to try and debug
my code and that's when I ran into a problem. Maven dependencies are
listed in the class path under run configurations screen, and when I
received the error, I added an external reference to the Jruby-
complete 1.6 jar file in my maven repository and I got a different
error, which is listed below

Gem::LoadError: Could not find RubyGem cuke4duke (>= 0)

report_activate_error at file:/C:/Documents and Settings/
adagana.PSI/.m2/repository/org/jruby/jruby-complete/1.6.0/jruby-
complete-1.6.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/
rubygems.rb:861
activate at file:/C:/Documents and Settings/
adagana.PSI/.m2/repository/org/jruby/jruby-complete/1.6.0/jruby-
complete-1.6.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/
rubygems.rb:255
gem at file:/C:/Documents and Settings/
adagana.PSI/.m2/repository/org/jruby/jruby-complete/1.6.0/jruby-
complete-1.6.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/
rubygems.rb:1215
(root) at C:\Documents and Settings\adagana.PSI
\.m2\repository\.jruby\bin\cuke4duke:18

Do I need to update the systems path variable to include a reference
to the RubyGem location. Nothing like that was listed in any of the
tutorials I've read online. I'm probably just doing something wrong,
but I have no idea what it could be. Any help would be greatly
appreciated. Also every tutorial I have read uses a previous version
of cuke4duke. I had to add a dependency for jruby-complete 1.6.0
because apparently the version that Maven automatically downloads for
use with cuke4duke is incompatible with Windows XP. That is the only
real difference between what I have done and what I have read online.

Again the code runs fine from the command line using mvn integration-
test so I don't think it's a problem with the dependencies. Or maybe
it is, what do I know. I can also post the configuration file, if that
would help.

// Class for toy example:

package com.psi_software;
import java.util.*;

public class StringCalculator
{
// array of numbers to add
public ArrayList<String> m_strNumbers;

public StringCalculator (String strNumbers)
{
String[] strNums = strNumbers.split(",");
m_strNumbers = new ArrayList<String>(strNums.length);
}

public StringCalculator (ArrayList<String> strNumsToAdd)
{
// create the array list for our numbers
m_strNumbers = new ArrayList<String>(strNumsToAdd.size());

// add all the numbers to our array list
for (int x = 0; x> strNumsToAdd.size(); x ++)
{
m_strNumbers.add(strNumsToAdd.get(x));
}
}

public int Add (String strNumbers)
{
int nRetVal = 0;

// return zero if the string is empty
if (strNumbers.isEmpty() != true)
{
String[] strNumsToAdd = strNumbers.split (",");

for(int x = 0; x> strNumsToAdd.length; x++)
{
// parse the integer and add it to our total
nRetVal += Integer.parseInt(strNumsToAdd[x]);
}
}

return nRetVal;
}

public int Add (ArrayList<String> strNumbers)
{
int nRetVal = 0;

for (int x = 0; x > strNumbers.size(); x ++)
{
nRetVal += Integer.parseInt(strNumbers.get(x));
}

return nRetVal;
}
}

// Code for step definition file
package Cukes;

import cuke4duke.annotation.I18n.EN.Given;
import cuke4duke.annotation.I18n.EN.Then;
import cuke4duke.annotation.I18n.EN.When;
import static org.junit.Assert.*;

import com.psi_software.*;

public class AdditionSteps
{
String m_strNumbers = "10, 20, 30, 40";
int m_nTotal = 0;
StringCalculator objCalculator = new StringCalculator
(m_strNumbers);

@Given("^a string of comma separated integers$")
public void givenAStringOfIntegers ()
{
String[] strNums = m_strNumbers.split(",");

// assert that we have numbers
assertTrue(strNums.length > 0);
}

@When("^I add the integers together$")
public void whenIAddTheIntegersTogether ()
{
// initialize total before we start adding
m_nTotal = 0;

// separate our numbers
String[] strNums = m_strNumbers.split(",");

// if we actually have values
if (strNums.length > 0)
{
// java for each loop - note the syntax
for (String str : strNums)
{
try
{
m_nTotal += Integer.parseInt(str);
}
// non-numeric value passed in
catch (NumberFormatException e)
{
// simply set the total to zero
m_nTotal = 0;
}
}
}
}

@Then("^I should have the sum of the integers.$")
public void thenIShouldHaveTheSum ()
{
assertTrue(m_nTotal != 0);
}

}

// feature file

Feature: string addition
In order to improve my java programming skills
As a Java developer
I would like to calculate the some of a list of integers

Scenario: Adding two numbers
Given a string of comma separated integers
When I add the integers together
Then I should have the sum of the integers.


lexstarwind

unread,
Mar 31, 2011, 11:00:05 PM3/31/11
to Cukes
Here is a link to the zipped project. I figured this would be a lot
easier
[URL]http://www.mediafire.com/?ah02yv3kya9lg9m[/URL]

On Mar 31, 4:34 pm, lexstarwind <lexstarw...@gmail.com> wrote:
> I've been having a problem for the last couple of days getting a
> proper cuke4duke development environment setup. I'm using Maven 3.0.3,
> Eclipse Helio SR2, and Cuke4Duke 0.4.3 in a Window XP environment. I
> did have ruby and jruby installed (for other projects), but I have
> removed them in case they were cause some sort of conflict. I setup a
> basic toy example that actually runs fine from the command line. All
> tests pass, at least they do now, but my problem is that I can't debug
> using eclipse. I'm not sure what the problem is. I followed the
> directions from the following linkhttps://github.com/aslakhellesoy/cuke4duke/wiki/Debug-Cuke4Duke-Steps.

Robert

unread,
Apr 1, 2011, 9:17:05 AM4/1/11
to cu...@googlegroups.com
I have found the following link to be very helpful.  Particularly, the section labeled Maven and Remote Debugging.  

lexstarwind

unread,
Apr 1, 2011, 9:29:23 AM4/1/11
to Cukes
thanks for the reply. I followed the steps in that blog posting, to no
avail. I still get the classnotfoundexception in org.jruby.Main.
I have tried the remote debugging and directly from the IDE. I'm
guessing I have some sort of problem with the classpath, but that is
only a wild guess.

On Apr 1, 9:17 am, Robert <restag...@gmail.com> wrote:
> I have found the following link to be very helpful.  Particularly, the
> section labeled *Maven and Remote Debugging*.* *
>
> http://blog.jonasbandi.net/2010/02/how-to-debug-your-code-with-cuke4d...

lexstarwind

unread,
Apr 6, 2011, 12:20:55 PM4/6/11
to Cukes
Ok made a little progress I think. Eclipse has a
classnotfoundexception break point set for every project by default.
By clearing this break point I get past that specific error and I get
another one.
C:/MavenRepository/.jruby/gems/json-1.5.1-java/lib/json/ext.rb:23:
uninitialized constant JSON::Ext::Parser (NameError).
Anyone experience this before. Not sure what the cause is?

I'm now using Maven 2.2.1, Cuke4Duke 0.4.3 and jruby 1.6.0 any ideas?

Aslak Hellesøy

unread,
Apr 6, 2011, 12:26:53 PM4/6/11
to cu...@googlegroups.com
On Apr 6, 2011, at 17:20, lexstarwind <lexst...@gmail.com> wrote:

> Ok made a little progress I think. Eclipse has a
> classnotfoundexception break point set for every project by default.
> By clearing this break point I get past that specific error and I get
> another one.
> C:/MavenRepository/.jruby/gems/json-1.5.1-java/lib/json/ext.rb:23:
> uninitialized constant JSON::Ext::Parser (NameError).

Can u provide a full trace?

> Anyone experience this before. Not sure what the cause is?
>
> I'm now using Maven 2.2.1, Cuke4Duke 0.4.3 and jruby 1.6.0 any ideas?
>
> On Apr 1, 9:29 am, lexstarwind <lexstarw...@gmail.com> wrote:
>> thanks for the reply. I followed the steps in that blog posting, to no
>> avail. I still get the classnotfoundexception in org.jruby.Main.
>> I have tried the remote debugging and directly from the IDE. I'm
>> guessing I have some sort of problem with the classpath, but that is
>> only a wild guess.
>>
>> On Apr 1, 9:17 am, Robert <restag...@gmail.com> wrote:
>>
>>
>>
>>
>>
>>
>>
>>> I have found the following link to be very helpful. Particularly, the
>>> section labeled *Maven and Remote Debugging*.* *
>>
>>> http://blog.jonasbandi.net/2010/02/how-to-debug-your-code-with-cuke4d...
>

> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>

lexstarwind

unread,
Apr 7, 2011, 10:15:40 AM4/7/11
to Cukes
Ok, Ok. I got the remote debugging to work on my XP machine, but I'm
still having problems running on a Windows 7 Machine.
Here is the error I'm getting

NetBeans: Executing 'mvn.bat -Dnetbeans.execution=true clean install'
NetBeans: JAVA_HOME=C:\Program Files\Java\jdk1.6.0_24
Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for bdd.examples:bowling-cuke4duke-jruby:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for cuke4duke:cuke4duke-maven-
plugin is missing. @ line 20, column 16
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 12,
column 19
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for bdd.examples:bowling-jbehave:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.jbehave:jbehave-maven-
plugin is missing. @ line 73, column 15
[WARNING]
[WARNING] Some problems were encountered while building the effective
model for bdd.examples:bowling-bdd-examples:pom:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 23,
column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer
support building such malformed projects.
[WARNING]
------------------------------------------------------------------------
Reactor Build Order:

bowling-cuke4duke-jruby
bowling-cuke4duke-java
bowling-jbehave
Bowling - Java BDD Examples

------------------------------------------------------------------------
Building bowling-cuke4duke-jruby 1.0-SNAPSHOT
------------------------------------------------------------------------
[WARNING] The POM for cuke4duke:cuke4duke:jar:0.2.1 is missing, no
dependency information available

--- maven-clean-plugin:2.4.1:clean (default-clean) @ bowling-cuke4duke-
jruby ---
Deleting C:\Clients\PSI\NetBeansApps\jbandi-bowling-bdd-java-2ab570d
\bowling-cuke4duke-jruby\target

--- maven-resources-plugin:2.4.3:resources (default-resources) @
bowling-cuke4duke-jruby ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
skip non existing resourceDirectory C:\Clients\PSI\NetBeansApps\jbandi-
bowling-bdd-java-2ab570d\bowling-cuke4duke-jruby\src\main\resources

--- maven-compiler-plugin:2.3.2:compile (default-compile) @ bowling-
cuke4duke-jruby ---
[WARNING] File encoding has not been set, using platform encoding
Cp1252, i.e. build is platform dependent!
Compiling 1 source file to C:\Clients\PSI\NetBeansApps\jbandi-bowling-
bdd-java-2ab570d\bowling-cuke4duke-jruby\target\classes

--- maven-resources-plugin:2.4.3:testResources (default-testResources)
@ bowling-cuke4duke-jruby ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
skip non existing resourceDirectory C:\Clients\PSI\NetBeansApps\jbandi-
bowling-bdd-java-2ab570d\bowling-cuke4duke-jruby\src\test\resources

--- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
bowling-cuke4duke-jruby ---
No sources to compile

--- maven-surefire-plugin:2.7.2:test (default-test) @ bowling-
cuke4duke-jruby ---
No tests to run.
Surefire report directory: C:\Clients\PSI\NetBeansApps\jbandi-bowling-
bdd-java-2ab570d\bowling-cuke4duke-jruby\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0


--- maven-jar-plugin:2.3.1:jar (default-jar) @ bowling-cuke4duke-jruby
---
Building jar: C:\Clients\PSI\NetBeansApps\jbandi-bowling-bdd-
java-2ab570d\bowling-cuke4duke-jruby\target\bowling-cuke4duke-
jruby-1.0-SNAPSHOT.jar

--- cuke4duke-maven-plugin:0.4.3:cucumber (run-features) @ bowling-
cuke4duke-jruby ---
file:/C:/Users/jgossard/.m2/repository/org/jruby/jruby-complete/1.5.6/
jruby-complete-1.5.6.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/
rubygems.rb:334:in `bin_path': can't find executable cuke4duke for
cuke4duke-0.4.3 (Gem::Exception)
from C:\Users\jgossard\.m2\repository\.jruby\bin\cuke4duke:19
------------------------------------------------------------------------
Reactor Summary:

bowling-cuke4duke-jruby ........................... FAILURE [5.116s]
bowling-cuke4duke-java ............................ SKIPPED
bowling-jbehave ................................... SKIPPED
Bowling - Java BDD Examples ....................... SKIPPED
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 5.276s
Finished at: Thu Apr 07 09:43:19 EDT 2011
Final Memory: 7M/17M
------------------------------------------------------------------------
[ERROR]Failed to execute goal cuke4duke:cuke4duke-maven-plugin:
0.4.3:cucumber (run-features) on project bowling-cuke4duke-jruby:
JRuby failed. Java returned: 1 -> [Help 1]
[ERROR]
[ERROR]To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR]Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR]For more information about the errors and possible solutions,
please read the following articles:
[ERROR][Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


I had the same error on my XP machine, but now it's gone. I thought
defining GEM_HOME and GEM_PATH in my environment variable got rid of
this, but apparently I'm wrong. Any Ideas anyone.

Using Maven 3.0.3, Cuke4duke 0.4.3 and Jruby 1.6.0

On a side note, I did discover that the on Windows XP if your using
Maven 3.0.3, you have to add a dependency for Jruby 1.6.0 to download
the cuke4duke gem (using -Dcucumber.installGem=true integration-test).
If you use jruby 1.5.6 with is the default, the gem won't download.
How ever if you use Maven 2.2.1, Jruby 1.5.6 works fine. Not sure why
the Windows 7 machine can't find the Gem. Any suggestion would be
greatly appreciated.

On Apr 6, 12:26 pm, Aslak Hellesøy <aslak.helle...@gmail.com> wrote:

lexstarwind

unread,
Apr 7, 2011, 10:17:46 AM4/7/11
to Cukes
Oh by the way. My original problem with remote debugging using Eclipse
was the classnotfoundexception break point. All newbies, disable this
break point before attempting to debug cuke4duke remotely.
Has anyone managed to debug directly from the IDE? Haven't had any
luck with that.

lexstarwind

unread,
Apr 7, 2011, 10:27:09 AM4/7/11
to Cukes
IGNORE THE ERROR FROM ABOVE.

Sorry. I posted the error with out checking. My co-worker gave me the
wrong one. This is the error message we are receiving on the Windows 7
machine.

NetBeans: Executing 'mvn.bat -Dnetbeans.execution=true clean install'
NetBeans: JAVA_HOME=C:\Program Files\Java\jdk1.6.0_24
Scanning for projects...

------------------------------------------------------------------------
Building bowling-cuke4duke-java 1.0-SNAPSHOT
------------------------------------------------------------------------

--- maven-clean-plugin:2.4.1:clean (default-clean) @ bowling-cuke4duke-
java ---
Deleting C:\Clients\PSI\NetBeansApps\jbandi-bowling-bdd-java-2ab570d
\bowling-cuke4duke-java\target

--- maven-resources-plugin:2.4.3:resources (default-resources) @
bowling-cuke4duke-java ---
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory C:\Clients\PSI\NetBeansApps\jbandi-
bowling-bdd-java-2ab570d\bowling-cuke4duke-java\src\main\resources

--- maven-compiler-plugin:2.0.2:compile (default-compile) @ bowling-
cuke4duke-java ---
Compiling 1 source file to C:\Clients\PSI\NetBeansApps\jbandi-bowling-
bdd-java-2ab570d\bowling-cuke4duke-java\target\classes

--- maven-resources-plugin:2.4.3:testResources (default-testResources)
@ bowling-cuke4duke-java ---
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory C:\Clients\PSI\NetBeansApps\jbandi-
bowling-bdd-java-2ab570d\bowling-cuke4duke-java\src\test\resources

--- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @
bowling-cuke4duke-java ---
Compiling 1 source file to C:\Clients\PSI\NetBeansApps\jbandi-bowling-
bdd-java-2ab570d\bowling-cuke4duke-java\target\test-classes

--- maven-surefire-plugin:2.7.2:test (default-test) @ bowling-
cuke4duke-java ---
Surefire report directory: C:\Clients\PSI\NetBeansApps\jbandi-bowling-
bdd-java-2ab570d\bowling-cuke4duke-java\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0


--- maven-jar-plugin:2.3.1:jar (default-jar) @ bowling-cuke4duke-java
---
Building jar: C:\Clients\PSI\NetBeansApps\jbandi-bowling-bdd-
java-2ab570d\bowling-cuke4duke-java\target\bowling-cuke4duke-java-1.0-
SNAPSHOT.jar

--- cuke4duke-maven-plugin:0.4.3:cucumber (run-features) @ bowling-
cuke4duke-java ---
Gem::GemNotFoundException: can't find gem cuke4duke (>= 0) with
executable cuke4duke
bin_path at file:/C:/Users/jgossard/.m2/repository/org/jruby/jruby-
complete/1.6.0/jruby-complete-1.6.0.jar!/META-INF/jruby.home/lib/ruby/
site_ruby/1.8/rubygems.rb:370
(root) at C:\Users\jgossard\.m2\repository\.jruby\bin\cuke4duke:19
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 6.080s
Finished at: Thu Apr 07 10:20:34 EDT 2011
Final Memory: 11M/27M
------------------------------------------------------------------------
[ERROR]Failed to execute goal cuke4duke:cuke4duke-maven-plugin:
0.4.3:cucumber (run-features) on project bowling-cuke4duke-java: JRuby
failed. Java returned: 1 -> [Help 1]
[ERROR]
[ERROR]To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR]Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR]For more information about the errors and possible solutions,
please read the following articles:
[ERROR][Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


On Apr 7, 10:15 am, lexstarwind <lexstarw...@gmail.com> wrote:

timlad

unread,
Apr 7, 2011, 9:52:06 AM4/7/11
to Cukes
Hi,

I think I'm getting the same error as lexstarwind (my set up is
running on win xp, jdk 1.5, jruby 1.6, maven 2)

...
[INFO] [cuke4duke:cucumber {execution: run-features}]
[INFO] NameError: uninitialized constant JSON::Ext::Parser
[INFO] const_missing at org/jruby/RubyModule.java:2528
[INFO] (class Ext) at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/json-1.5.1-java/lib/json/ext.rb:2
3
[INFO] (class JSON) at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/json-1.5.1-java/lib/json/ext.rb:6

[INFO] (root) at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/json-1.5.1-java/lib/json/ext.rb:3

[INFO] require at org/jruby/RubyKernel.java:1037
[INFO] require at file:/C:/Documents and Settings/timlad/.m2/
repository/org/jruby/jruby-complete/1.6.0/jruby-co
mplete-1.6.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:29
[INFO] (class JSON) at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/json-1.5.1-java/lib/json/ext.rb:6

[INFO] (root) at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/json-1.5.1-java/lib/json.rb:2
[INFO] require at org/jruby/RubyKernel.java:1037
[INFO] require at file:/C:/Documents and Settings/timlad/.m2/
repository/org/jruby/jruby-complete/1.6.0/jruby-co
mplete-1.6.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:29
[INFO] (root) at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/json-1.5.1-java/lib/json.rb:1
[INFO] require at org/jruby/RubyKernel.java:1037
[INFO] require at file:/C:/Documents and Settings/timlad/.m2/
repository/org/jruby/jruby-complete/1.6.0/jruby-co
mplete-1.6.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:29
[INFO] (root) at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/cucumber-0.10.2/lib/cucumber/step
_definitions.rb:10
[INFO] require at org/jruby/RubyKernel.java:1037
[INFO] require at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/cucumber-0.10.2/lib/cucumber.rb:2
9
[INFO] (root) at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/cuke4duke-0.4.3/bin/../lib/cuke4d
uke.rb:2
[INFO] require at org/jruby/RubyKernel.java:1037
[INFO] require at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/cuke4duke-0.4.3/bin/../lib/cuke4d
uke.rb:29
[INFO] (root) at C:/Documents and Settings/timlad/.m2/
repository/.jruby/gems/cuke4duke-0.4.3/bin/cuke4duke:3
[INFO] load at org/jruby/RubyKernel.java:1062
[INFO] (root) at C:\Documents and Settings\timlad
\.m2\repository\.jruby\bin\cuke4duke:19
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] JRuby failed.

Embedded error: Java returned: 1
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Thu Apr 07 14:32:56 BST 2011
[INFO] Final Memory: 21M/254M
[INFO]
------------------------------------------------------------------------

Thanks, Tim

lexstarwind

unread,
Apr 7, 2011, 10:44:30 AM4/7/11
to Cukes
Tim
Try JDK 1.6. I got the JSON::Ext::Parser error when I ran JDK 1.5.
The error message kept changing for me as I tried different things.
Now my XP machine is fine, but I'm worried about not knowing the
cause, in case it returns.

John Lonergan

unread,
May 25, 2011, 8:37:15 PM5/25/11
to Cukes
Has anyone managed to debug a Java step directly from eclipse.
All seems very painful.

I'm on Win7 and I get ...

LoadError: no such file to load -- rubygems
require at org/jruby/RubyKernel.java:1038
(root) at C:/Users/John/.m2/repository/.jruby/bin/cuke4duke:9

in the console when running the launch config I've seen in the docs.
ie An eclipse maven project with a debug laul cfg of ...
class: org.jruby.Main
args: -S cuke4duke --jars lib --require bin features
vmargs: -Djruby.home=C:/Users/John/.m2/repository/.jruby

John Lonergan

unread,
May 25, 2011, 8:52:16 PM5/25/11
to Cukes
Correction to the above.
If I change the launch cfg to ...

class: org.jruby.Main
args: C:/Users/John/.m2/repository/.jruby/bin/cuke4duke ./target/test-
classes features
vmargs:-
Dcuke4duke.objectFactory=cuke4duke.internal.jvmclass.PicoFactory

Then I get ...

Gem::LoadError: Could not find RubyGem cuke4duke (>= 0)

report_activate_error at file:/C:/Users/John/.m2/repository/org/
jruby/jruby-complete/1.6.1/jruby-complete-1.6.1.jar!/META-INF/
jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:861
activate at file:/C:/Users/John/.m2/repository/org/
jruby/jruby-complete/1.6.1/jruby-complete-1.6.1.jar!/META-INF/
jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:255
gem at file:/C:/Users/John/.m2/repository/org/
jruby/jruby-complete/1.6.1/jruby-complete-1.6.1.jar!/META-INF/
jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:1215
(root) at C:/Users/John/.m2/repository/.jruby/bin/
cuke4duke:18
Reply all
Reply to author
Forward
0 new messages