[ 
http://jira.codehaus.org/browse/JBEHAVE-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=222625#action_222625
 ] 

Tom Little commented on JBEHAVE-292:
------------------------------------

After 4 days of troubleshooting the issue is finally resolved. After getting 
past the ClassNotFoundError on a Windows 7 virtual machine I then inspected my 
machine to find out the fault. I found an earlier version of ant (1.7.1) in my 
repository and deleted all traces of it, including the ANT_HOME and 
apache-ant-1.8.1 directory that were there currently. I also found in my 
add/remove programs a Java Update 20 file, presumably left over from an old 
installation of JRE. This refused to be removed from the Add/Remove list, I 
ended up having to use Windows Install Clean Up utility to get rid of it. I 
believe this was affecting the JVM or classpath somehow.

After doing all that and rebooting I then did a fresh install of JDK 1.6.0_20 
and apache-ant-1.8.1, set the ANT_HOME environment variable and the error no 
longer appeared. After slightly rejigging the pom.xml to get the latest jbehave 
core dependency and adding a few more jars to the lib folder the LoginScenario 
now runs from command line with 'ant clean build' and from Eclipse as before.

Thank you Mauro for all you help and sorry that this issue wasn't related to 
Jbehave, hopefully if there are any more complaints of this nature this post 
may help troubleshoot as all old or corrupted Java Updates or installs and ant 
versions should be wiped clean first.

Thanks again, 

Tom.

> Failed To Instantiate Scenario - ClassNotFoundException
> -------------------------------------------------------
>
>                 Key: JBEHAVE-292
>                 URL: http://jira.codehaus.org/browse/JBEHAVE-292
>             Project: JBehave
>          Issue Type: Task
>          Components: Ant extension
>    Affects Versions: 2.5.4
>         Environment: Windows 7, JDK 1.6.18, JBehave 2.5.4, Selenium Server 
> and Selenium-Java client.
>            Reporter: Tom Little
>         Attachments: LoginProject.zip, LoginProject.zip
>
>
> Hi,
> I'm having an issue with a very basic project using Jbehave and Selenium and 
> hopefully someone can help me out.
>  I have managed to create a .scenario, LoginScenario.java and LoginSteps.java 
> basic test with Selenium built in to test a login of a website. This is all 
> setup in Eclipse with the correct .jars on the classpath and buildpath, it 
> runs and works correctly. There is also a base.properties file that the test 
> uses to determine the URL to test.
>  I've been trying to migrate the project into a command line build using an 
> Ant script. I have almost carbon copied the build.xml from the Trader example 
> from the Jbehave website except rather than reading in the dependencies from 
> the pom.xml it copies local JARs into the classpath. Hopefully I have all the 
> Jars I need. I've also left out the reporting stuff as I just want the tests 
> to run firstly.
> It fails to instantiate the LoginScenario.java file and further down in the 
> error list is a ClassNotFoundError which makes me think the classpath isn't 
> including the compiled classes even though the output says the compilation 
> has been sucessful and prints out a very long classpath with the Jars in and 
> the path C:\LoginProject\target\classes which is the destdir of the compile 
> target.
> I'm sure its just me missing something in the build.xml, I'm sure its not an 
> issue with the Java classes themselves as they work fine in Eclipse when you 
> run LoginScenario.java
> Ive attached the project and under /lib there is a list of the JARS I would 
> have in List of JARS.txt, sorry I know this is a bit of a rubbish way of 
> doing things I'm just not particularly familiar with Maven and how to use its 
> functionality.
> Many Thanks, 
> Tom.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to