Details

    • Type: Sub-task Sub-task
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Build
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I've integrated Jbehave test in Hudson as A Maven goal but whenever I run Test via Hudson-web-interface, I get following error

      BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 33.609s
      [INFO] Finished at: Mon Dec 03 15:08:52 2012
      [INFO] Final Memory: 26M/81M
      [INFO] ------------------------------------------------------------------------
      [INFO] o.h.m.e.h.MavenExecutionResultHandler - Build failed with exception(s)
      [INFO] o.h.m.e.h.MavenExecutionResultHandler - [1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jbehave:jbehave-maven-plugin:4.0-beta-2:run-stories-as-paths (run-stories-as-paths) on project ABCServices: Failed to run stories as paths
      [DEBUG] Closing connection to remote
      [ERROR] Failed to execute goal org.jbehave:jbehave-maven-plugin:4.0-beta-2:run-stories-as-paths (run-stories-as-paths) on project ABCServices:
      Failed to run stories as paths: Story path '.svn/all-wcprops' not found by class loader EmbedderClassLoader[urls=[/Users/abc/.hudson/jobs/TestHudson/workspace/target/test-classes/, /Users/abc/.hudson/jobs/TestHudson/workspace/target/classes/, SSIOServicesClient-1.0-SNAPSHOT.jar, poi-3.8.jar, cxf-rt-frontend-jaxws-2.5.2.jar, xml-resolver-1.2.jar, asm-3.3.jar, cxf-api-2.5.2.jar, cxf-rt-core-2.5.2.jar, cxf-rt-bindings-soap-2.5.2.jar, cxf-tools-common-2.5.2.jar, cxf-rt-databinding-jaxb-2.5.2.jar, cxf-rt-bindings-xml-2.5.2.jar, cxf-rt-frontend-simple-2.5.2.jar, cxf-rt-ws-addr-2.5.2.jar, cxf-rt-transports-http-2.5.2.jar, cxf-rt-transports-common-2.5.2.jar, cxf-rt-frontend-jaxrs-2.5.0.jar, cxf-common-utilities-2.5.0.jar, jsr311-api-1.1.1.jar, jettison-1.3.jar, jaxb-api-2.1.jar, stax-api-1.0-2.jar, activation-1.1.jar, cxf-bundle-jaxrs-2.5.0.jar, xmlschema-core-2.0.1.jar, woodstox-core-asl-4.1.1.jar, stax2-api-3.1.1.jar, geronimo-stax-api_1.0_spec-1.0.1.jar, geronimo-annotation_1.0_spec-1.1.1.jar, neethi-3.0.1.jar, wsdl4j-1.6.2.jar, geronimo-activation_1.1_spec-1.1.jar, geronimo-javamail_1.4_spec-1.7.1.jar, aopalliance-1.0.jar, spring-asm-3.0.6.RELEASE.jar, commons-logging-1.1.1.jar, jetty-continuation-7.5.3.v20111011.jar, jetty-http-7.5.3.v20111011.jar, jetty-io-7.5.3.v20111011.jar, jetty-util-7.5.3.v20111011.jar, jetty-security-7.5.3.v20111011.jar, slf4j-api-1.6.2.jar, geronimo-servlet_2.5_spec-1.1.2.jar, log4j-1.2.16.jar, gson-1.7.1.jar, jaxb-impl-2.0.3.jar, jsr173_api-1.0.jar, testng-6.5.1.jar, junit-4.10.jar, hamcrest-core-1.1.jar, bsh-2.0b4.jar, jcommander-1.12.jar, snakeyaml-1.6.jar, spring-core-3.1.1.RELEASE.jar, spring-context-3.1.1.RELEASE.jar, spring-web-3.1.1.RELEASE.jar, spring-expression-3.1.1.RELEASE.jar, spring-beans-3.1.1.RELEASE.jar, spring-aop-3.1.1.RELEASE.jar, spring-context-support-3.1.1.RELEASE.jar, spring-tx-3.1.1.RELEASE.jar, spring-orm-3.1.1.RELEASE.jar, spring-jdbc-3.1.1.RELEASE.jar, spring-oxm-3.1.1.RELEASE.jar, commons-lang-2.5.jar, spring-test-3.1.1.RELEASE.jar, commons-httpclient-3.1.jar, commons-codec-1.2.jar, SharedshelfSchema-0.7.jar, xom-1.2.5.jar, xml-apis-1.3.03.jar, xercesImpl-2.8.0.jar, xalan-2.7.0.jar, json-lib-2.4-jdk15.jar, commons-beanutils-1.8.0.jar, commons-collections-3.2.1.jar, ezmorph-1.0.6.jar, VWWebServicesClient-1.0.jar, httpclient-4.2.1.jar, httpcore-4.2.1.jar, httpmime-4.0.1.jar, apache-mime4j-0.6.jar, json-20090211.jar, hibernate-entitymanager-3.5.6-Final.jar, hibernate-core-3.5.6-Final.jar, antlr-2.7.6.jar, dom4j-1.6.1.jar, jta-1.1.jar, hibernate-annotations-3.5.6-Final.jar, hibernate-commons-annotations-3.2.0.Final.jar, cglib-2.2.jar, javassist-3.9.0.GA.jar, hibernate-jpa-2.0-api-1.0.0.Final.jar, morphia-0.99.1-SNAPSHOT.jar, mongo-java-driver-2.10.0.jar, cglib-nodep-2.2.2.jar, jbehave-maven-plugin-4.0-beta-3.jar, jbehave-core-4.0-beta-3.jar, junit-dep-4.8.2.jar, hamcrest-library-1.1.jar, hamcrest-integration-1.1.jar, commons-io-1.4.jar, plexus-utils-2.0.5.jar, freemarker-2.3.16.jar, paranamer-2.4.jar, xstream-1.3.1.jar, xpp3_min-1.1.4c.jar, maven-plugin-api-2.0.11.jar, maven-artifact-2.0.11.jar, maven-project-2.0.11.jar, maven-settings-2.0.11.jar, maven-profile-2.0.11.jar, maven-model-2.0.11.jar, maven-artifact-manager-2.0.11.jar, maven-repository-metadata-2.0.11.jar, wagon-provider-api-1.0-beta-2.jar, maven-plugin-registry-2.0.11.jar, plexus-interpolation-1.1.jar, plexus-container-default-1.0-alpha-9-stable-1.jar, classworlds-1.1-alpha-2.jar, plexus-archiver-1.2.jar, plexus-io-1.0.1.jar, proxytoys-1.0.jar, tuprolog-extensions-2.1.1.jar, tuprolog-2.1.1.jar, xunit-1.9.jar, guice-2.0.1.jar, dtkit-metrics-model-0.8.jar, dtkit-metrics-util-0.8.jar, saxon-9.1.0.8.jar, saxon-9.1.0.8-s9api.jar, saxon-9.1.0.8-dom.jar, dtkit-metrics-hudson-api-0.8.jar, dtkit-junit-model-0.8.jar, dtkit-default-junit-hudson-0.9.jar, dtkit-default-junit-0.9.jar],parent=ClassRealm[plugin>org.jbehave:jbehave-maven-plugin:4.0-beta-2, parent: sun.misc.Launcher$AppClassLoader@5ab8df17]] -> [Help 1]
      [ERROR]

      Please tell me what should I do to resolve this issue.

      PS: I am not using any Source Code Management.

        Activity

        Hide
        Mauro Talevi added a comment -

        Well, the clue is in the error message: "Failed to run stories as paths: Story path '.svn/all-wcprops' not found"

        You say you're not using any SCM but evidently the .svn directories are still there.

        Solution is to exclude these stories or put a filter on the story paths. Have a look at the examples :

        https://github.com/jbehave/jbehave-core/tree/jbehave-4.x/examples

        Look in the *Stories files for the story path config.

        Show
        Mauro Talevi added a comment - Well, the clue is in the error message: "Failed to run stories as paths: Story path '.svn/all-wcprops' not found" You say you're not using any SCM but evidently the .svn directories are still there. Solution is to exclude these stories or put a filter on the story paths. Have a look at the examples : https://github.com/jbehave/jbehave-core/tree/jbehave-4.x/examples Look in the *Stories files for the story path config.
        Mauro Talevi made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not A Bug [ 6 ]
        Hide
        Sobia Ali added a comment -

        Really appreciate your help. I am using Jbehave, Hudson, Maven first time, can you please tell me how to exclude these svn stories(.svn/all-wcprops' ), Link that u have shared has lots of folders and files(*Stories), Can you please tell me specifically which file should I look, for reference?

        Show
        Sobia Ali added a comment - Really appreciate your help. I am using Jbehave, Hudson, Maven first time, can you please tell me how to exclude these svn stories(.svn/all-wcprops' ), Link that u have shared has lots of folders and files(*Stories), Can you please tell me specifically which file should I look, for reference?
        Hide
        Mauro Talevi added a comment -

        https://github.com/jbehave/jbehave-core/blob/jbehave-4.x/examples/trader/src/main/java/org/jbehave/examples/trader/TraderStories.java

         @Override    
        protected List<String> storyPaths() {        
            return new StoryFinder().findPaths(codeLocationFromClass(this.getClass()).getFile(), asList("**/*.story"), asList("**/failing_before*.story", "**/given_relative*.story"));    
        }
        

        The StoryFinder allows you to control the source and the includes/excludes.

        Show
        Mauro Talevi added a comment - https://github.com/jbehave/jbehave-core/blob/jbehave-4.x/examples/trader/src/main/java/org/jbehave/examples/trader/TraderStories.java @Override protected List< String > storyPaths() { return new StoryFinder().findPaths(codeLocationFromClass( this .getClass()).getFile(), asList( "**/*.story" ), asList( "**/failing_before*.story" , "**/given_relative*.story" )); } The StoryFinder allows you to control the source and the includes/excludes.
        Hide
        Joachim Nilsson added a comment -

        Hi,
        Consider controlling the stories from outside your code, which might be true if you allow QA department to control which stories to run automated after development is done.

        Example:
        @Override
        protected List<String> storyPaths() {
        try

        { return Arrays.asList(System.getProperty(“storyfiles”).split(",")); }

        catch (NullPointerException | SecurityException | IllegalArgumentException e)

        { throw new RuntimeException("System property 'storyfiles' was not available during startup.", e); }

        }

        Example of a gradle task that will run the stories if you have extended JUnitStories:
        task runJBehaveTests(type: Test) {
        file('target').mkdirs()
        FileTree tree = fileTree(dir: 'src/test/resources')
        tree.include '*/.story'
        String storyfiles = ""
        tree.each

        { file -> storyfiles += "," + file.getName() }

        storyfiles = storyfiles.replaceFirst(",","")
        System.out.println("This test will run following stories: "+storyfiles)
        systemProperty 'storyfiles',storyfiles
        }

        Show
        Joachim Nilsson added a comment - Hi, Consider controlling the stories from outside your code, which might be true if you allow QA department to control which stories to run automated after development is done. Example: @Override protected List<String> storyPaths() { try { return Arrays.asList(System.getProperty(“storyfiles”).split(",")); } catch (NullPointerException | SecurityException | IllegalArgumentException e) { throw new RuntimeException("System property 'storyfiles' was not available during startup.", e); } } Example of a gradle task that will run the stories if you have extended JUnitStories: task runJBehaveTests(type: Test) { file('target').mkdirs() FileTree tree = fileTree(dir: 'src/test/resources') tree.include '* / .story' String storyfiles = "" tree.each { file -> storyfiles += "," + file.getName() } storyfiles = storyfiles.replaceFirst(",","") System.out.println("This test will run following stories: "+storyfiles) systemProperty 'storyfiles',storyfiles }
        Hide
        Sobia Ali added a comment - - edited

        you both are overriding "storyPaths()" but I am not using it because I am extending my story from JUnitStory rather than JUnitStories.So I am not able to override this method.My code is here

        public class ABCStory extends JUnitStory {

        @Override

        public Configuration configuration()

        { return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(this.getClass().getClassLoader())) .useStoryReporterBuilder( new StoryReporterBuilder().withDefaultFormats() .withFormats(Format.CONSOLE, Format.HTML)); }

        // Here we specify the steps classes
        @Override

        public List<CandidateSteps> candidateSteps()

        { return new InstanceStepsFactory(configuration(), new ABCSteps()) .createCandidateSteps(); }

        @Override
        @Test
        public void run() {
        try

        { super.run(); }

        catch (Throwable e)

        { e.printStackTrace(); }

        }

        Also codeLocationFromClass() is not working it gives compile time exception of "No Such method".

        Show
        Sobia Ali added a comment - - edited you both are overriding "storyPaths()" but I am not using it because I am extending my story from JUnitStory rather than JUnitStories.So I am not able to override this method.My code is here public class ABCStory extends JUnitStory { @Override public Configuration configuration() { return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(this.getClass().getClassLoader())) .useStoryReporterBuilder( new StoryReporterBuilder().withDefaultFormats() .withFormats(Format.CONSOLE, Format.HTML)); } // Here we specify the steps classes @Override public List<CandidateSteps> candidateSteps() { return new InstanceStepsFactory(configuration(), new ABCSteps()) .createCandidateSteps(); } @Override @Test public void run() { try { super.run(); } catch (Throwable e) { e.printStackTrace(); } } Also codeLocationFromClass() is not working it gives compile time exception of "No Such method".
        Hide
        Sobia Ali added a comment - - edited

        Guys!! I tried to include following code as u suggested
        @Override
        protected List<String> storyPaths()

        { return new StoryFinder().findPaths(CodeLocations.codeLocationFromClass(this.getClass()).getFile(), Arrays.asList("**/*.story"),Arrays.asList("**/.svn/*")); }

        but it makes no difference, still getting the same error.What am I missing?

        Show
        Sobia Ali added a comment - - edited Guys!! I tried to include following code as u suggested @Override protected List<String> storyPaths() { return new StoryFinder().findPaths(CodeLocations.codeLocationFromClass(this.getClass()).getFile(), Arrays.asList("**/*.story"),Arrays.asList("**/.svn/*")); } but it makes no difference, still getting the same error.What am I missing?
        Sobia Ali made changes -
        Resolution Not A Bug [ 6 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Sobia Ali added a comment -

        Ok finally I have resolved all previous issues and set all parameters now getting following error

        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 27.414s
        [INFO] Finished at: Tue Dec 04 11:34:05 PKT 2012
        [INFO] Final Memory: 26M/81M
        [INFO] ------------------------------------------------------------------------
        [INFO] o.h.m.e.h.MavenExecutionResultHandler - Build failed with exception(s)
        [INFO] o.h.m.e.h.MavenExecutionResultHandler - [1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jbehave:jbehave-maven-plugin:4.0-beta-2:run-stories-as-paths (run-stories-as-paths) on project ABCServices: Failed to run stories as paths
        [DEBUG] Closing connection to remote
        [ERROR] Failed to execute goal org.jbehave:jbehave-maven-plugin:4.0-beta-2:run-stories-as-paths (run-stories-as-paths) on project ABCServices: Failed to run stories as paths: Story path 'org/art/abc/server/test/ABCStory.java' not found by class loader EmbedderClassLoader[urls=[/Users/abc/.hudson/jobs/TestHudson-ABC/workspace/target/test-classes/, /Users/abc/.hudson/jobs/TestHudson-ABC/workspace/target/classes/, SSIOServicesClient-1.0-SNAPSHOT.jar, poi-3.8.jar, cxf-rt-frontend-jaxws-2.5.2.jar, xml-resolver-1.2.jar, asm-3.3.jar, cxf-api-2.5.2.jar, cxf-rt-core-2.5.2.jar, cxf-rt-bindings-soap-2.5.2.jar, cxf-tools-common-2.5.2.jar, cxf-rt-databinding-jaxb-2.5.2.jar, cxf-rt-bindings-xml-2.5.2.jar, cxf-rt-frontend-simple-2.5.2.jar, cxf-rt-ws-addr-2.5.2.jar, cxf-rt-transports-http-2.5.2.jar, cxf-rt-transports-common-2.5.2.jar, cxf-rt-frontend-jaxrs-2.5.0.jar, cxf-common-utilities-2.5.0.jar, jsr311-api-1.1.1.jar, jettison-1.3.jar, jaxb-api-2.1.jar, stax-api-1.0-2.jar, activation-1.1.jar, cxf-bundle-jaxrs-2.5.0.jar, xmlschema-core-2.0.1.jar, woodstox-core-asl-4.1.1.jar, stax2-api-3.1.1.jar, geronimo-stax-api_1.0_spec-1.0.1.jar, geronimo-annotation_1.0_spec-1.1.1.jar, neethi-3.0.1.jar, wsdl4j-1.6.2.jar, geronimo-activation_1.1_spec-1.1.jar, geronimo-javamail_1.4_spec-1.7.1.jar, aopalliance-1.0.jar, spring-asm-3.0.6.RELEASE.jar, commons-logging-1.1.1.jar, jetty-continuation-7.5.3.v20111011.jar, jetty-http-7.5.3.v20111011.jar, jetty-io-7.5.3.v20111011.jar, jetty-util-7.5.3.v20111011.jar, jetty-security-7.5.3.v20111011.jar, slf4j-api-1.6.2.jar, geronimo-servlet_2.5_spec-1.1.2.jar, log4j-1.2.16.jar, gson-1.7.1.jar, jaxb-impl-2.0.3.jar, jsr173_api-1.0.jar, testng-6.5.1.jar, junit-4.10.jar, hamcrest-core-1.1.jar, bsh-2.0b4.jar, jcommander-1.12.jar, snakeyaml-1.6.jar, spring-core-3.1.1.RELEASE.jar, spring-context-3.1.1.RELEASE.jar, spring-web-3.1.1.RELEASE.jar, spring-expression-3.1.1.RELEASE.jar, spring-beans-3.1.1.RELEASE.jar, spring-aop-3.1.1.RELEASE.jar, spring-context-support-3.1.1.RELEASE.jar, spring-tx-3.1.1.RELEASE.jar, spring-orm-3.1.1.RELEASE.jar, spring-jdbc-3.1.1.RELEASE.jar, spring-oxm-3.1.1.RELEASE.jar, commons-lang-2.5.jar, spring-test-3.1.1.RELEASE.jar, commons-httpclient-3.1.jar, commons-codec-1.2.jar, SharedshelfSchema-0.7.jar, xom-1.2.5.jar, xml-apis-1.3.03.jar, xercesImpl-2.8.0.jar, xalan-2.7.0.jar, json-lib-2.4-jdk15.jar, commons-beanutils-1.8.0.jar, commons-collections-3.2.1.jar, ezmorph-1.0.6.jar, VWWebServicesClient-1.0.jar, httpclient-4.2.1.jar, httpcore-4.2.1.jar, httpmime-4.0.1.jar, apache-mime4j-0.6.jar, json-20090211.jar, hibernate-entitymanager-3.5.6-Final.jar, hibernate-core-3.5.6-Final.jar, antlr-2.7.6.jar, dom4j-1.6.1.jar, jta-1.1.jar, hibernate-annotations-3.5.6-Final.jar, hibernate-commons-annotations-3.2.0.Final.jar, cglib-2.2.jar, javassist-3.9.0.GA.jar, hibernate-jpa-2.0-api-1.0.0.Final.jar, morphia-0.99.1-SNAPSHOT.jar, mongo-java-driver-2.10.0.jar, cglib-nodep-2.2.2.jar, jbehave-maven-plugin-4.0-beta-3.jar, jbehave-core-4.0-beta-3.jar, junit-dep-4.8.2.jar, hamcrest-library-1.1.jar, hamcrest-integration-1.1.jar, commons-io-1.4.jar, plexus-utils-2.0.5.jar, freemarker-2.3.16.jar, paranamer-2.4.jar, xstream-1.3.1.jar, xpp3_min-1.1.4c.jar, maven-plugin-api-2.0.11.jar, maven-artifact-2.0.11.jar, maven-project-2.0.11.jar, maven-settings-2.0.11.jar, maven-profile-2.0.11.jar, maven-model-2.0.11.jar, maven-artifact-manager-2.0.11.jar, maven-repository-metadata-2.0.11.jar, wagon-provider-api-1.0-beta-2.jar, maven-plugin-registry-2.0.11.jar, plexus-interpolation-1.1.jar, plexus-container-default-1.0-alpha-9-stable-1.jar, classworlds-1.1-alpha-2.jar, plexus-archiver-1.2.jar, plexus-io-1.0.1.jar, proxytoys-1.0.jar, tuprolog-extensions-2.1.1.jar, tuprolog-2.1.1.jar, xunit-1.9.jar, guice-2.0.1.jar, dtkit-metrics-model-0.8.jar, dtkit-metrics-util-0.8.jar, saxon-9.1.0.8.jar, saxon-9.1.0.8-s9api.jar, saxon-9.1.0.8-dom.jar, dtkit-metrics-hudson-api-0.8.jar, dtkit-junit-model-0.8.jar, dtkit-default-junit-hudson-0.9.jar, dtkit-default-junit-0.9.jar],parent=ClassRealm[plugin>org.jbehave:jbehave-maven-plugin:4.0-beta-2, parent: sun.misc.Launcher$AppClassLoader@5ab8df17]] -> [Help 1]

        please tell me what to do to resolve this issue? .. I have this file 'org/art/abc/server/test/ABCStory.java' in my filesystem at exat position.

        My Pom.xml entry is

        <plugin>
        <groupId>org.jbehave</groupId>
        <artifactId>jbehave-maven-plugin</artifactId>
        <version>4.0-beta-2</version>
        <dependencies>
        <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.16</version>
        </dependency>
        </dependencies>
        <executions>
        <execution>

        <id>run-stories-as-paths</id>

        <phase>integration-test</phase>

        <configuration>

        <Includes>
        <Include>**/ABCStory.java
        </Include>

        </Includes>
        <excludes>
        <exclude>*/.svn/*</exclude>
        <exclude>**/ABCSteps.java
        </exclude>

        </excludes>

        <scope>test</scope>
        <ignoreFailureInStories>false</ignoreFailureInStories>
        <ignoreFailureInView>false</ignoreFailureInView>

        </configuration>

        <goals>
        <goal>run-stories-as-paths</goal>

        </goals>
        </execution>

        </executions>
        </plugin>

        and Story file looks like

        public class ABCStory extends JUnitStories {

        @Override

        public Configuration configuration()

        { return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(this.getClass().getClassLoader())) .useStoryReporterBuilder( new StoryReporterBuilder().withDefaultFormats() .withFormats(Format.CONSOLE, Format.HTML)); }

        @Override
        protected List<String> storyPaths()

        { return new StoryFinder().findPaths(CodeLocations.codeLocationFromClass(this.getClass()).getFile(), Arrays.asList("**/*.story","**/*story.*"),Arrays.asList("**/all-wcprops")); }

        // Here we specify the steps classes
        @Override

        public List<CandidateSteps> candidateSteps()

        { return new InstanceStepsFactory(configuration(), new ABCSteps()) .createCandidateSteps(); }

        @Override
        @Test
        public void run() {
        try

        { super.run(); }

        catch (Throwable e)

        { // TODO Auto-generated catch block e.printStackTrace(); }

        }
        }

        Please reply. All the help would be appreciated.

        Show
        Sobia Ali added a comment - Ok finally I have resolved all previous issues and set all parameters now getting following error [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 27.414s [INFO] Finished at: Tue Dec 04 11:34:05 PKT 2012 [INFO] Final Memory: 26M/81M [INFO] ------------------------------------------------------------------------ [INFO] o.h.m.e.h.MavenExecutionResultHandler - Build failed with exception(s) [INFO] o.h.m.e.h.MavenExecutionResultHandler - [1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jbehave:jbehave-maven-plugin:4.0-beta-2:run-stories-as-paths (run-stories-as-paths) on project ABCServices: Failed to run stories as paths [DEBUG] Closing connection to remote [ERROR] Failed to execute goal org.jbehave:jbehave-maven-plugin:4.0-beta-2:run-stories-as-paths (run-stories-as-paths) on project ABCServices: Failed to run stories as paths: Story path 'org/art/abc/server/test/ABCStory.java' not found by class loader EmbedderClassLoader[urls= [/Users/abc/.hudson/jobs/TestHudson-ABC/workspace/target/test-classes/, /Users/abc/.hudson/jobs/TestHudson-ABC/workspace/target/classes/, SSIOServicesClient-1.0-SNAPSHOT.jar, poi-3.8.jar, cxf-rt-frontend-jaxws-2.5.2.jar, xml-resolver-1.2.jar, asm-3.3.jar, cxf-api-2.5.2.jar, cxf-rt-core-2.5.2.jar, cxf-rt-bindings-soap-2.5.2.jar, cxf-tools-common-2.5.2.jar, cxf-rt-databinding-jaxb-2.5.2.jar, cxf-rt-bindings-xml-2.5.2.jar, cxf-rt-frontend-simple-2.5.2.jar, cxf-rt-ws-addr-2.5.2.jar, cxf-rt-transports-http-2.5.2.jar, cxf-rt-transports-common-2.5.2.jar, cxf-rt-frontend-jaxrs-2.5.0.jar, cxf-common-utilities-2.5.0.jar, jsr311-api-1.1.1.jar, jettison-1.3.jar, jaxb-api-2.1.jar, stax-api-1.0-2.jar, activation-1.1.jar, cxf-bundle-jaxrs-2.5.0.jar, xmlschema-core-2.0.1.jar, woodstox-core-asl-4.1.1.jar, stax2-api-3.1.1.jar, geronimo-stax-api_1.0_spec-1.0.1.jar, geronimo-annotation_1.0_spec-1.1.1.jar, neethi-3.0.1.jar, wsdl4j-1.6.2.jar, geronimo-activation_1.1_spec-1.1.jar, geronimo-javamail_1.4_spec-1.7.1.jar, aopalliance-1.0.jar, spring-asm-3.0.6.RELEASE.jar, commons-logging-1.1.1.jar, jetty-continuation-7.5.3.v20111011.jar, jetty-http-7.5.3.v20111011.jar, jetty-io-7.5.3.v20111011.jar, jetty-util-7.5.3.v20111011.jar, jetty-security-7.5.3.v20111011.jar, slf4j-api-1.6.2.jar, geronimo-servlet_2.5_spec-1.1.2.jar, log4j-1.2.16.jar, gson-1.7.1.jar, jaxb-impl-2.0.3.jar, jsr173_api-1.0.jar, testng-6.5.1.jar, junit-4.10.jar, hamcrest-core-1.1.jar, bsh-2.0b4.jar, jcommander-1.12.jar, snakeyaml-1.6.jar, spring-core-3.1.1.RELEASE.jar, spring-context-3.1.1.RELEASE.jar, spring-web-3.1.1.RELEASE.jar, spring-expression-3.1.1.RELEASE.jar, spring-beans-3.1.1.RELEASE.jar, spring-aop-3.1.1.RELEASE.jar, spring-context-support-3.1.1.RELEASE.jar, spring-tx-3.1.1.RELEASE.jar, spring-orm-3.1.1.RELEASE.jar, spring-jdbc-3.1.1.RELEASE.jar, spring-oxm-3.1.1.RELEASE.jar, commons-lang-2.5.jar, spring-test-3.1.1.RELEASE.jar, commons-httpclient-3.1.jar, commons-codec-1.2.jar, SharedshelfSchema-0.7.jar, xom-1.2.5.jar, xml-apis-1.3.03.jar, xercesImpl-2.8.0.jar, xalan-2.7.0.jar, json-lib-2.4-jdk15.jar, commons-beanutils-1.8.0.jar, commons-collections-3.2.1.jar, ezmorph-1.0.6.jar, VWWebServicesClient-1.0.jar, httpclient-4.2.1.jar, httpcore-4.2.1.jar, httpmime-4.0.1.jar, apache-mime4j-0.6.jar, json-20090211.jar, hibernate-entitymanager-3.5.6-Final.jar, hibernate-core-3.5.6-Final.jar, antlr-2.7.6.jar, dom4j-1.6.1.jar, jta-1.1.jar, hibernate-annotations-3.5.6-Final.jar, hibernate-commons-annotations-3.2.0.Final.jar, cglib-2.2.jar, javassist-3.9.0.GA.jar, hibernate-jpa-2.0-api-1.0.0.Final.jar, morphia-0.99.1-SNAPSHOT.jar, mongo-java-driver-2.10.0.jar, cglib-nodep-2.2.2.jar, jbehave-maven-plugin-4.0-beta-3.jar, jbehave-core-4.0-beta-3.jar, junit-dep-4.8.2.jar, hamcrest-library-1.1.jar, hamcrest-integration-1.1.jar, commons-io-1.4.jar, plexus-utils-2.0.5.jar, freemarker-2.3.16.jar, paranamer-2.4.jar, xstream-1.3.1.jar, xpp3_min-1.1.4c.jar, maven-plugin-api-2.0.11.jar, maven-artifact-2.0.11.jar, maven-project-2.0.11.jar, maven-settings-2.0.11.jar, maven-profile-2.0.11.jar, maven-model-2.0.11.jar, maven-artifact-manager-2.0.11.jar, maven-repository-metadata-2.0.11.jar, wagon-provider-api-1.0-beta-2.jar, maven-plugin-registry-2.0.11.jar, plexus-interpolation-1.1.jar, plexus-container-default-1.0-alpha-9-stable-1.jar, classworlds-1.1-alpha-2.jar, plexus-archiver-1.2.jar, plexus-io-1.0.1.jar, proxytoys-1.0.jar, tuprolog-extensions-2.1.1.jar, tuprolog-2.1.1.jar, xunit-1.9.jar, guice-2.0.1.jar, dtkit-metrics-model-0.8.jar, dtkit-metrics-util-0.8.jar, saxon-9.1.0.8.jar, saxon-9.1.0.8-s9api.jar, saxon-9.1.0.8-dom.jar, dtkit-metrics-hudson-api-0.8.jar, dtkit-junit-model-0.8.jar, dtkit-default-junit-hudson-0.9.jar, dtkit-default-junit-0.9.jar] ,parent=ClassRealm [plugin>org.jbehave:jbehave-maven-plugin:4.0-beta-2, parent: sun.misc.Launcher$AppClassLoader@5ab8df17] ] -> [Help 1] please tell me what to do to resolve this issue? .. I have this file 'org/art/abc/server/test/ABCStory.java' in my filesystem at exat position. My Pom.xml entry is <plugin> <groupId>org.jbehave</groupId> <artifactId>jbehave-maven-plugin</artifactId> <version>4.0-beta-2</version> <dependencies> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.16</version> </dependency> </dependencies> <executions> <execution> <id>run-stories-as-paths</id> <phase>integration-test</phase> <configuration> <Includes> <Include>**/ABCStory.java </Include> </Includes> <excludes> <exclude>* /.svn/ *</exclude> <exclude>**/ABCSteps.java </exclude> </excludes> <scope>test</scope> <ignoreFailureInStories>false</ignoreFailureInStories> <ignoreFailureInView>false</ignoreFailureInView> </configuration> <goals> <goal>run-stories-as-paths</goal> </goals> </execution> </executions> </plugin> and Story file looks like public class ABCStory extends JUnitStories { @Override public Configuration configuration() { return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(this.getClass().getClassLoader())) .useStoryReporterBuilder( new StoryReporterBuilder().withDefaultFormats() .withFormats(Format.CONSOLE, Format.HTML)); } @Override protected List<String> storyPaths() { return new StoryFinder().findPaths(CodeLocations.codeLocationFromClass(this.getClass()).getFile(), Arrays.asList("**/*.story","**/*story.*"),Arrays.asList("**/all-wcprops")); } // Here we specify the steps classes @Override public List<CandidateSteps> candidateSteps() { return new InstanceStepsFactory(configuration(), new ABCSteps()) .createCandidateSteps(); } @Override @Test public void run() { try { super.run(); } catch (Throwable e) { // TODO Auto-generated catch block e.printStackTrace(); } } } Please reply. All the help would be appreciated.
        Hide
        Mauro Talevi added a comment -

        You're looking for the wrong story. The story path needed is to the textual path, not the Java class that contains the configuration.

        You should consider an archetype to get you started:

        http://jbehave.org/reference/stable/archetypes.html

        In any case, please use the user mailing list to discuss issues:

        http://jbehave.org/mailing-lists.html

        Show
        Mauro Talevi added a comment - You're looking for the wrong story. The story path needed is to the textual path, not the Java class that contains the configuration. You should consider an archetype to get you started: http://jbehave.org/reference/stable/archetypes.html In any case, please use the user mailing list to discuss issues: http://jbehave.org/mailing-lists.html
        Mauro Talevi made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Not A Bug [ 6 ]
        Hide
        Sobia Ali added a comment -

        I also tried Abc.story instead of AbcStory.Java but got same error.

        Show
        Sobia Ali added a comment - I also tried Abc.story instead of AbcStory.Java but got same error.
        Hide
        Mauro Talevi added a comment -

        Have you tried the archetypes? They're meant precisely to help you get started correctly.

        If you can't get it working, please send a simple sample mvn project to the user list reproducing the problem.

        Show
        Mauro Talevi added a comment - Have you tried the archetypes? They're meant precisely to help you get started correctly. If you can't get it working, please send a simple sample mvn project to the user list reproducing the problem.

          People

          • Assignee:
            Unassigned
            Reporter:
            Sobia Ali
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: