[ 
http://jira.codehaus.org/browse/JBEHAVE-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom Little updated JBEHAVE-292:
-------------------------------

    Attachment: LoginProject.zip

Hi Mauro, 

Thanks for your swift reply, I've configured Maven and created a POM.xml which 
contains those dependencies. This is now read in by the build.xml as an 
artifact and all the correct JARs that you mentioned are now copied over into 
target/lib. I am still getting the same Failed to Instantiate error though. I 
have attached the new Login Project, if you could run it using the command 
'ant' or 'ant -verbose' and let me know if you get my error or whether it 
passes, I will then know if the code itself is fine and there is an outside 
element effecting the ClassPath or perhaps some version compatibility issue 
that is stopping my code from working or whether there is something within the 
code causing it.

I have done a few things to diagnose the issue further, I've tried running 'ant 
-noclasspath' which didn't help, I've also created an output.txt which is the 
verbose output I get when I first run my code, followed by the Failed To 
Instantiate error and stack trace in the terminal. I've also attached a file 
EnvironmentVariables.txt which lists all my relevant Environment Variables, you 
may see something obvious in there. 

I realise this now may be out of the scope of help which you offer for JBehave, 
hopefully you can confirm whether it is an error with my existing code or 
something outside of this that is causing the issue. 

Thanks for the reporting advice, I just want to get my class to run first then 
I'll sort all that out after.

Also I thought it was worth mentioning what appeared in my /target folder. I 
have two folders /target/lib with all the Jars you mentioned and I have 
/target/classes with LoginSteps.class, LoginSteps$1.class, LoginScenario.class, 
LoginScenario$1.class, SystemUndertest.class and login_scenario.scenario. 

Also I wonder if the .classpath file that is left over from Eclipse may be 
affecting it somehow, I've left it in for you incase you think it might.

Thanks to anyone who can shed some light and thank you Mauro for the help I've 
recieved so far.

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