I downloaded this test project to learn screenplay with serenity and cucumber
https://github.com/serenity-bdd/screenplay-pattern-todomvc
I can do clean verify with different profiles on command line as the readme suggests
If I load the same project in intellij and try to run one feature , it results in to NPE
Is there any intellij setting I am missing to run these?
C:\Apps\Java\jdk8\bin\java -Dorg.jetbrains.run.directory=C:\share\_11\__Serenity\screenplay-pattern-todomvc-master\src\test\resources\features\record_todos -Didea.launcher.port=7534 -Didea.launcher.bin.path=C:\Apps\IntelliJIDEA20162\bin -Dfile.encoding=UTF-8 -classpath C:\Apps\Java\jdk8\jre\lib\charsets.jar;C:\Apps\Java\jdk8\jre\lib\deploy.jar;C:\Apps\Java\jdk8\jre\lib\ext\access-bridge-64.jar;C:\Apps\Java\jdk8\jre\lib\ext\cldrdata.jar;C:\Apps\Java\jdk8\jre\lib\ext\dnsns.jar;C:\Apps\Java\jdk8\jre\lib\ext\jaccess.jar;C:\Apps\Java\jdk8\jre\lib\ext\jfxrt.jar;C:\Apps\Java\jdk8\jre\lib\ext\localedata.jar;C:\Apps\Java\jdk8\jre\lib\ext\nashorn.jar;C:\Apps\Java\jdk8\jre\lib\ext\sunec.jar;C:\Apps\Java\jdk8\jre\lib\ext\sunjce_provider.jar;C:\Apps\Java\jdk8\jre\lib\ext\sunmscapi.jar;C:\Apps\Java\jdk8\jre\lib\ext\sunpkcs11.jar;C:\Apps\Java\jdk8\jre\lib\ext\zipfs.jar;C:\Apps\Java\jdk8\jre\lib\javaws.jar;C:\Apps\Java\jdk8\jre\lib\jce.jar;C:\Apps\Java\jdk8\jre\lib\jfr.jar;C:\Apps\Java\jdk8\jre\lib\jfxswt.jar;C:\Apps\Java\jdk8\jre\lib\jsse.jar;C:\Apps\Java\jdk8\jre\lib\management-agent.jar;C:\Apps\Java\jdk8\jre\lib\plugin.jar;C:\Apps\Java\jdk8\jre\lib\resources.jar;C:\Apps\Java\jdk8\jre\lib\rt.jar;C:\share\_11\__Serenity\screenplay-pattern-todomvc-master\target\test-classes;C:\share\_11\__Serenity\screenplay-pattern-todomvc-master\target\classes;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-core\1.1.42\serenity-core-1.1.42.jar;C:\Users\RZHHHN\.m2\repository\com\google\guava\guava\19.0\guava-19.0.jar;C:\Users\RZHHHN\.m2\repository\com\google\code\findbugs\jsr305\3.0.1\jsr305-3.0.1.jar;C:\Users\RZHHHN\.m2\repository\com\google\inject\guice\3.0\guice-3.0.jar;C:\Users\RZHHHN\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\RZHHHN\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\RZHHHN\.m2\repository\cglib\cglib\3.1\cglib-3.1.jar;C:\Users\RZHHHN\.m2\repository\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\Users\RZHHHN\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\RZHHHN\.m2\repository\org\objenesis\objenesis\2.1\objenesis-2.1.jar;C:\Users\RZHHHN\.m2\repository\org\slf4j\slf4j-api\1.7.21\slf4j-api-1.7.21.jar;C:\Users\RZHHHN\.m2\repository\xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\cucumber-core\1.2.4\cucumber-core-1.2.4.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\cucumber-html\0.2.3\cucumber-html-0.2.3.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\cucumber-jvm-deps\1.0.5\cucumber-jvm-deps-1.0.5.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\gherkin\2.12.2\gherkin-2.12.2.jar;C:\Users\RZHHHN\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\RZHHHN\.m2\repository\org\mockito\mockito-core\1.10.19\mockito-core-1.10.19.jar;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-report-resources\1.1.42\serenity-report-resources-1.1.42.jar;C:\Users\RZHHHN\.m2\repository\com\google\code\gson\gson\2.6.1\gson-2.6.1.jar;C:\Users\RZHHHN\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\RZHHHN\.m2\repository\com\opera\operadriver\1.5\operadriver-1.5.jar;C:\Users\RZHHHN\.m2\repository\com\opera\operalaunchers\1.1\operalaunchers-1.1.jar;C:\Users\RZHHHN\.m2\repository\com\google\protobuf\protobuf-java\2.4.1\protobuf-java-2.4.1.jar;C:\Users\RZHHHN\.m2\repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;C:\Users\RZHHHN\.m2\repository\org\ini4j\ini4j\0.5.2\ini4j-0.5.2.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-server\2.53.1\selenium-server-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\com\beust\jcommander\1.48\jcommander-1.48.jar;C:\Users\RZHHHN\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.48\bcprov-jdk15on-1.48.jar;C:\Users\RZHHHN\.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.48\bcpkix-jdk15on-1.48.jar;C:\Users\RZHHHN\.m2\repository\mx4j\mx4j-tools\3.0.1\mx4j-tools-3.0.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\jetty-repacked\9.2.13.v20150730\jetty-repacked-9.2.13.v20150730.jar;C:\Users\RZHHHN\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\jetty-rc-repacked\5\jetty-rc-repacked-5.jar;C:\Users\RZHHHN\.m2\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-java\2.53.1\selenium-java-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\2.53.1\selenium-chrome-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\2.53.1\selenium-remote-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-api\2.53.1\selenium-api-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\2.53.1\selenium-edge-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\2.53.1\selenium-firefox-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\2.53.1\selenium-ie-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\net\java\dev\jna\jna\4.1.0\jna-4.1.0.jar;C:\Users\RZHHHN\.m2\repository\net\java\dev\jna\jna-platform\4.1.0\jna-platform-4.1.0.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\2.53.1\selenium-safari-driver-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\io\netty\netty\3.5.7.Final\netty-3.5.7.Final.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-support\2.53.1\selenium-support-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\selenium-leg-rc\2.53.1\selenium-leg-rc-2.53.1.jar;C:\Users\RZHHHN\.m2\repository\org\yaml\snakeyaml\1.8\snakeyaml-1.8.jar;C:\Users\RZHHHN\.m2\repository\com\codeborne\phantomjsdriver\1.2.1\phantomjsdriver-1.2.1.jar;C:\Users\RZHHHN\.m2\repository\org\seleniumhq\selenium\htmlunit-driver\2.21\htmlunit-driver-2.21.jar;C:\Users\RZHHHN\.m2\repository\io\appium\java-client\4.0.0\java-client-4.0.0.jar;C:\Users\RZHHHN\.m2\repository\commons-validator\commons-validator\1.5.0\commons-validator-1.5.0.jar;C:\Users\RZHHHN\.m2\repository\commons-beanutils\commons-beanutils\1.9.2\commons-beanutils-1.9.2.jar;C:\Users\RZHHHN\.m2\repository\commons-digester\commons-digester\1.8.1\commons-digester-1.8.1.jar;C:\Users\RZHHHN\.m2\repository\org\codehaus\groovy\groovy\2.4.4\groovy-2.4.4.jar;C:\Users\RZHHHN\.m2\repository\net\sf\opencsv\opencsv\2.0\opencsv-2.0.jar;C:\Users\RZHHHN\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.3\commons-beanutils-core-1.8.3.jar;C:\Users\RZHHHN\.m2\repository\joda-time\joda-time\2.7\joda-time-2.7.jar;C:\Users\RZHHHN\.m2\repository\com\thoughtworks\xstream\xstream\1.4.9\xstream-1.4.9.jar;C:\Users\RZHHHN\.m2\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;C:\Users\RZHHHN\.m2\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;C:\Users\RZHHHN\.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;C:\Users\RZHHHN\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\RZHHHN\.m2\repository\org\freemarker\freemarker\2.3.23\freemarker-2.3.23.jar;C:\Users\RZHHHN\.m2\repository\net\sourceforge\jexcelapi\jxl\2.6.12\jxl-2.6.12.jar;C:\Users\RZHHHN\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\RZHHHN\.m2\repository\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar;C:\Users\RZHHHN\.m2\repository\net\sourceforge\htmlunit\htmlunit\2.21\htmlunit-2.21.jar;C:\Users\RZHHHN\.m2\repository\net\sourceforge\htmlunit\htmlunit-core-js\2.17\htmlunit-core-js-2.17.jar;C:\Users\RZHHHN\.m2\repository\net\sourceforge\htmlunit\neko-htmlunit\2.21\neko-htmlunit-2.21.jar;C:\Users\RZHHHN\.m2\repository\xerces\xercesImpl\2.11.0\xercesImpl-2.11.0.jar;C:\Users\RZHHHN\.m2\repository\net\sourceforge\cssparser\cssparser\0.9.18\cssparser-0.9.18.jar;C:\Users\RZHHHN\.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar;C:\Users\RZHHHN\.m2\repository\org\eclipse\jetty\websocket\websocket-client\9.2.15.v20160210\websocket-client-9.2.15.v20160210.jar;C:\Users\RZHHHN\.m2\repository\org\eclipse\jetty\jetty-util\9.2.15.v20160210\jetty-util-9.2.15.v20160210.jar;C:\Users\RZHHHN\.m2\repository\org\eclipse\jetty\jetty-io\9.2.15.v20160210\jetty-io-9.2.15.v20160210.jar;C:\Users\RZHHHN\.m2\repository\org\eclipse\jetty\websocket\websocket-common\9.2.15.v20160210\websocket-common-9.2.15.v20160210.jar;C:\Users\RZHHHN\.m2\repository\org\eclipse\jetty\websocket\websocket-api\9.2.15.v20160210\websocket-api-9.2.15.v20160210.jar;C:\Users\RZHHHN\.m2\repository\org\apache\httpcomponents\httpclient\4.5.2\httpclient-4.5.2.jar;C:\Users\RZHHHN\.m2\repository\org\apache\httpcomponents\httpcore\4.4.4\httpcore-4.4.4.jar;C:\Users\RZHHHN\.m2\repository\org\apache\httpcomponents\httpmime\4.5.2\httpmime-4.5.2.jar;C:\Users\RZHHHN\.m2\repository\org\fluentlenium\fluentlenium-core\0.10.2\fluentlenium-core-0.10.2.jar;C:\Users\RZHHHN\.m2\repository\com\jhlabs\filters\2.0.235\filters-2.0.235.jar;C:\Users\RZHHHN\.m2\repository\org\asciidoctor\asciidoctor-java-integration\0.1.4\asciidoctor-java-integration-0.1.4.jar;C:\Users\RZHHHN\.m2\repository\org\jruby\jruby-complete\1.7.4\jruby-complete-1.7.4.jar;C:\Users\RZHHHN\.m2\repository\org\imgscalr\imgscalr-lib\4.2\imgscalr-lib-4.2.jar;C:\Users\RZHHHN\.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\RZHHHN\.m2\repository\org\hibernate\hibernate-validator\5.1.1.Final\hibernate-validator-5.1.1.Final.jar;C:\Users\RZHHHN\.m2\repository\org\jboss\logging\jboss-logging\3.1.3.GA\jboss-logging-3.1.3.GA.jar;C:\Users\RZHHHN\.m2\repository\com\fasterxml\classmate\1.0.0\classmate-1.0.0.jar;C:\Users\RZHHHN\.m2\repository\javax\el\javax.el-api\2.2.4\javax.el-api-2.2.4.jar;C:\Users\RZHHHN\.m2\repository\org\glassfish\web\javax.el\2.2.4\javax.el-2.2.4.jar;C:\Users\RZHHHN\.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar;C:\Users\RZHHHN\.m2\repository\xalan\serializer\2.7.2\serializer-2.7.2.jar;C:\Users\RZHHHN\.m2\repository\com\jayway\awaitility\awaitility\1.6.3\awaitility-1.6.3.jar;C:\Users\RZHHHN\.m2\repository\com\typesafe\config\1.2.1\config-1.2.1.jar;C:\Users\RZHHHN\.m2\repository\org\jsoup\jsoup\1.8.3\jsoup-1.8.3.jar;C:\Users\RZHHHN\.m2\repository\com\google\jimfs\jimfs\1.0\jimfs-1.0.jar;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-junit\1.1.42\serenity-junit-1.1.42.jar;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-screenplay\1.1.42\serenity-screenplay-1.1.42.jar;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-screenplay-webdriver\1.1.42\serenity-screenplay-webdriver-1.1.42.jar;C:\Users\RZHHHN\.m2\repository\net\serenity-bdd\serenity-cucumber\1.1.10\serenity-cucumber-1.1.10.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\cucumber-java\1.2.4\cucumber-java-1.2.4.jar;C:\Users\RZHHHN\.m2\repository\info\cukes\cucumber-junit\1.2.4\cucumber-junit-1.2.4.jar;C:\Users\RZHHHN\.m2\repository\org\slf4j\slf4j-simple\1.7.7\slf4j-simple-1.7.7.jar;C:\Users\RZHHHN\.m2\repository\junit\junit\4.12\junit-4.12.jar;C:\Users\RZHHHN\.m2\repository\org\assertj\assertj-core\1.7.0\assertj-core-1.7.0.jar;C:\Users\RZHHHN\.m2\repository\com\googlecode\lambdaj\lambdaj\2.3.3\lambdaj-2.3.3.jar;C:\Users\RZHHHN\.m2\repository\cglib\cglib-nodep\2.2\cglib-nodep-2.2.jar;C:\Users\RZHHHN\.m2\repository\org\hamcrest\hamcrest-all\1.3\hamcrest-all-1.3.jar;C:\Apps\IntelliJIDEA20162\plugins\cucumber-java\lib\cucumber-jvm-formatter.jar;C:\Apps\IntelliJIDEA20162\lib\idea_rt.jar com.intellij.rt.execution.application.AppMain cucumber.api.cli.Main --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter --monochrome --glue net.serenitybdd.demos.todos.cucumber.steps --glue net.serenitybdd.cucumber.actors C:/share/_11/__Serenity/screenplay-pattern-todomvc-master/src/test/resources/features/record_todos/add_new_items_to_the_todo_list.feature
Testing started at 4:07 PM ...
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.project.name=Demo Project using Serenity and Cucumber
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.linked.tags=issue
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - webdriver.driver=chrome
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - webdriver.base.url=http://todomvc.com/examples/angularjs/#/
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.test.root=net.serenitybdd.demos.todos.features
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.take.screenshots=BEFORE_AND_AFTER_EACH_STEP
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.tag.failures=true
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.browser.width=1280
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - serenity.browser.height=1024
[main] INFO net.thucydides.core.util.PropertiesFileLocalPreferences - webdriver.wait.for.timeout=20000
Starting ChromeDriver 2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf) on port 24696
Only local connections are allowed.
java.lang.NullPointerException
at net.thucydides.core.steps.StepEventBus.updateOverallResults(StepEventBus.java:645)
at net.serenitybdd.screenplay.EventBusInterface.updateOverallResult(EventBusInterface.java:29)
at net.serenitybdd.screenplay.Actor.perform(Actor.java:109)
at net.serenitybdd.screenplay.Actor.attemptsTo(Actor.java:80)
at net.serenitybdd.screenplay.Actor.wasAbleTo(Actor.java:74)
at net.serenitybdd.demos.todos.cucumber.steps.TodoUserSteps.that_James_has_an_empty_todo_list(TodoUserSteps.java:33)
at ✽.Given that James has an empty todo list(C:/share/_11/__Serenity/screenplay-pattern-todomvc-master/src/test/resources/features/record_todos/add_new_items_to_the_todo_list.feature:9)
Skipped step
Is there anyway to run serenity test in debug mode, so that I can collect more info and open a bug report?
This link should help, do not forget to give your definitions in glue section of the configuration.
https://johnfergusonsmart.com/running-cucumber-serenity-feature-files-directly-intellij/
I did some tests with my own project and asked on this bug report for serenity. Running the feature files from IntelliJ directly will cause the Cucumber Plugin to set and load the classes. The Plugin did not take into account the needed CucumberWithSerenity runner class and this causes the problems. However you can run them from the IDE by adding an AllRunner class directly in the src/main/java folder:
#RunWith(CucumberWithSerenity.class)
public class AllStories {}
Then the tests can be executed directly from the IDE. You can configure which tests to use which is documented at the_scenario_runner. By changing serenity.test.root like done in the maven profiles you can specify if you want to use the screenplay versions or the page objects.
Related
I am working on a project using Intellij IDEA Community, so I am using Jetty Runner to deploy my web application in localhost, everything is working ok, but I want to configure logs regarding Jetty, at server startup I see this kind of log :
14:50:20.516 [main] DEBUG o.eclipse.jetty.webapp.WebAppContext - isSystemResource==false org.springframework.expression.spel.ast.OpDec jar:file:/C:/Mario/development/spring/spring5/workspace/springsecurity/chapter02/chapter02.00-calendar/build/exploded/WEB-INF/lib/spring-expression-4.3.11.RELEASE.jar!/org/springframework/expression/spel/ast/OpDec.class
14:50:20.516 [main] DEBUG o.e.jetty.webapp.WebAppClassLoader - WAP webapp loaded class org.springframework.expression.spel.ast.OpDec
14:50:20.516 [main] DEBUG o.eclipse.jetty.webapp.WebAppContext - isSystemResource==false org.springframework.expression.spel.ast.OperatorNot jar:file:/C:/Mario/development/spring/spring5/workspace/springsecurity/chapter02/chapter02.00-calendar/build/exploded/WEB-INF/lib/spring-expression-4.3.11.RELEASE.jar!/org/springframework/expression/spel/ast/OperatorNot.class
14:50:20.517 [main] DEBUG o.e.jetty.webapp.WebAppClassLoader - WAP webapp loaded class org.springframework.expression.spel.ast.OperatorNot
1
I want to change the granularity from DEBUG to info regarding jetty server.
Put a jetty-logging.properties file in your resources folder and configure the logging there:
# Configure for System.err output
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
# Configure StdErrLog to log all jetty namespace at default of WARN or above
org.eclipse.jetty.LEVEL=INFO
More info here: https://www.eclipse.org/jetty/documentation/9.4.x/configuring-logging.html
For multiple projects, I use wildfly-swarm to avoid installing a webserver. The swarm jar file is generated and I can successfully launch it through "java -jar mypackage-swarm.jar".
However, to debug it easily, I would like to launch it via my IDE (eclipse). Either by directly launching my main class or using fakerplace, I have the following exception :
Fakereplace is running.
Dependencies not bundled, will resolve from local M2REPO
2017-01-17 08:31:41,806 org.wildfly.swarm.internal.SwarmMessages [main] DEBUG Logging Provider: org.jboss.logging.Log4jLoggerProvider
2017-01-17 08:31:41,811 org.wildfly.swarm.Swarm [main] DEBUG WFSWARM0020: Stage Config found in swarm.project.stage.file system property at location: null
2017-01-17 08:31:41,862 INFO [org.wildfly.swarm] (main) WFSWARM0018: Installed fraction: Logging - STABLE org.wildfly.swarm:logging:2016.12.1
2017-01-17 08:31:41,865 INFO [org.wildfly.swarm] (main) WFSWARM0018: Installed fraction: Undertow - STABLE org.wildfly.swarm:undertow:2016.12.1
2017-01-17 08:31:41,865 INFO [org.wildfly.swarm] (main) WFSWARM0018: Installed fraction: Spring WebMVC - STABLE org.wildfly.swarm:spring:2016.12.1
org.jboss.modules.ModuleLoadException: Error loading module from modules/org/apache/xerces/main/module.xml
...
Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to resolve artifact 'xerces:xercesImpl:2.11.0.SP5' (position: END_TAG seen ...<resources>\n <artifact name="xerces:xercesImpl:2.11.0.SP5"/>... #5:52)
I've found similar exceptions on internet, but I cannot find a solution.
Has anyone any idea on this ?
Why don't you just run it as jar application ?
I'm not sure how to do that in eclipse below is example in intellj but for eclipse you can find your solution here:
eclipse: how to debug a Java program as a .jar file?
I want to run Nutch 1.9 in Eclipse on Windows. I followed the tutorial from http://wiki.apache.org/nutch/RunNutchInEclipse and opened the project in Eclipse.
But when I run Nutch, I get the following error:
2014-09-19 17:45:48,039 INFO crawl.Injector (Injector.java:inject(283)) - Injector: starting at 2014-09-19 17:45:48
2014-09-19 17:45:48,043 INFO crawl.Injector (Injector.java:inject(284)) - Injector: crawlDb: K:/kumar/Nutch/apache-nutch-1.9/crawlresult
2014-09-19 17:45:48,043 INFO crawl.Injector (Injector.java:inject(285)) - Injector: urlDir: K:/kumar/Nutch/apache-nutch-1.9/urls
2014-09-19 17:45:48,043 INFO crawl.Injector (Injector.java:inject(294)) - Injector: Converting injected urls to crawl db entries.
2014-09-19 17:45:48,207 INFO jvm.JvmMetrics (JvmMetrics.java:init(71)) - Initializing JVM Metrics with processName=JobTracker, sessionId=
2014-09-19 17:45:48,252 WARN mapred.JobClient (JobClient.java:configureCommandLineOptions(661)) - No job jar file set. User classes may not be found. See JobConf(Class) or JobConf#setJar(String).
2014-09-19 17:45:48,268 INFO mapred.FileInputFormat (FileInputFormat.java:listStatus(192)) - Total input paths to process : 1
2014-09-19 17:45:48,485 INFO mapred.JobClient (JobClient.java:monitorAndPrintJob(1275)) - Running job: job_local_0001
2014-09-19 17:45:48,487 INFO mapred.FileInputFormat (FileInputFormat.java:listStatus(192)) - Total input paths to process : 1
2014-09-19 17:45:48,526 INFO mapred.MapTask (MapTask.java:runOldMapper(347)) - numReduceTasks: 0
2014-09-19 17:45:48,565 INFO plugin.PluginRepository (PluginManifestParser.java:parsePluginFolder(87)) - Plugins: looking in: K:\Nutch\apache-nutch-1.9\plugins
2014-09-19 17:45:48,566 WARN plugin.PluginRepository (PluginManifestParser.java:parsePluginFolder(101)) - java.io.FileNotFoundException: K:\Nutch\apache-nutch-1.9\plugins\creativecommons\plugin.xml (The system cannot find the file specified)
It seems that Hadoop is the causing error. I don't know how to solve this problem. I know Nutch requires Unix environment. But, I want to run Nutch in Eclipse on Windows.
Can anybody help me to solve this?
Download cygwin, then add that to your path of the environment variables. I think your problem is caused by the fact that windows can't invoke a unix native command. That is what I did however as soon as i got past that problem, I encountered other problems.
After configure the sonar tools (SonarQube, MySql database and Sonar-runner) I perform an analysis over an Android project without any problem. But after install the Android Plugin for sonar and repeat the analysis, this one fails getting the next error:
INFO - Preview mode
Load batch settings
User cache: /home/user/.sonar/cache
INFO - Install plugins
INFO - Exclude plugins: devcockpit, jira, pdfreport, views, report, buildstability, scmactivity, buildbreaker
INFO - Create JDBC datasource for jdbc:h2:/home/user/workspace/myAndroidProject/.sonar/.sonartmp/preview1394469024394-0
INFO - Initializing Hibernate
INFO - Load project settings
INFO - Apply project exclusions
INFO - ------------- Scan myAndroidProject
INFO - Load module settings
INFO - Language is forced to java
INFO - Loading technical debt model...
INFO - Loading technical debt model done: 424 ms
INFO - Configure Maven plugins
INFO - Base dir: /home/user/workspace/myAndroidProject
INFO - Working dir: /home/user/workspace/myAndroidProject/.sonar
INFO - Source dirs: /home/user/workspace/myAdnroidProject/src
INFO - Source encoding: UTF-8, default locale: en_EN
INFO - Index files
INFO - Included sources:
INFO - src/**
INFO - 116 files indexed
WARN - Accessing the filesystem before the Sensor phase is deprecated and will not be supported in the future. Please update your plugin.
INFO - Index files
INFO - Included sources:
INFO - src/**
INFO - 116 files indexed
WARN - Accessing the filesystem before the Sensor phase is deprecated and will not be supported in the future. Please update your plugin.
INFO - Index files
INFO - Included sources:
INFO - src/**
INFO - 116 files indexed
INFO - Quality profile for java: Sonar way
INFO - Sensor JavaSourceImporter...
INFO - Sensor JavaSourceImporter done: 49 ms
INFO - Sensor JavaSquidSensor...
INFO - Java AST scan...
INFO - 116 source files to be analyzed
INFO - 116/116 source files analyzed
INFO - Java AST scan done: 6693 ms
WARN - Java bytecode has not been made available to the analyzer. The Depth of Inheritance Tree (DIT) metric, Response for Class (RFC) metric, Number of Children (NOC) metric, Lack of Cohesion (LCOM4) metric, deperecated dependencies metrics, UnusedPrivateMethod rule, RedundantThrowsDeclarationCheck rule, S1160 rule, S1217 rule are disabled.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 18.440s
Final Memory: 12M/357M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: org.sonar.api.resources.Directory cannot be cast to org.sonar.api.resources.JavaPackage
My sonar-project.properties file is the enxt:
#Required metadata
sonar.projectKey=mKey
sonar.projectName=myAndroidProject
sonar.projectVersion=1.0
# Paths to source directories.
# Paths are relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# Do not put the "sonar-project.properties" file in the same directory with the source code.
# (i.e. never set the "sonar.sources" property to ".")
sonar.sources=src
# The value of the property must be the key of the language.
sonar.language=java
# Encoding of the source code
sonar.sourceEncoding=UTF-8
# Analysis mode
sonar.analysis.mode=preview
#Enables the Lint profile to analyze the code using the Lint rules.
#sonar.profile=Android Lint
I'm using the next environment:
SonarQube 4.2 RC1
Sonar-runner 2.3
Database: MySQL
Ubuntu 12.04 LTS
Java 1.7
I tryed uninstalling the Android plugin but the problem persists. The unique way that I've found to solve it is deleting the database and the user and create them again.
As stated on http://docs.codehaus.org/pages/viewpage.action?pageId=236224987, the Android plugin is not yet compatible with SonarQube 4.2-RC1. See also http://jira.codehaus.org/browse/SONARPLUGINS-3483.
You need to provide the binaries (bytecode .class files) to the sonar executor.
Add the following line to your sonar-project.properties
# Path to the class files
sonar.binaries=build\\classes\\main
If the above line doesn't work , then check your binaries actual path and place it in sonar.binaries property
I'm having an issue running the Selenium standalone server -- it just hangs partway through loading. I've tried several different versions of the standalone server but the same issue arises. From the command line I run...
java -jar selenium-server-standalone-2.25.0.jar
And get back...
Oct 16, 2012 8:29:34 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
20:29:40.190 INFO - Java: Apple Inc. 20.10-b01-428
20:29:40.193 INFO - OS: Mac OS X 10.7.4 x86_64
20:29:40.202 INFO - v2.25.0, with Core v2.25.0. Built from revision 17137
20:29:40.322 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
20:29:40.324 INFO - Version Jetty/5.1.x
20:29:40.324 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
20:29:40.326 INFO - Started HttpContext[/selenium-server,/selenium-server]
20:29:40.326 INFO - Started HttpContext[/,/]
20:29:40.376 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#1f8b81e3
20:29:40.377 INFO - Started HttpContext[/wd,/wd]
20:29:40.382 INFO - Started SocketListener on 0.0.0.0:4444
20:29:40.383 INFO - Started org.openqa.jetty.jetty.Server#4ee1d5ea
If the comment does not help, try changing start command to
java -jar lib/selenium-server-standalone-2.25.0.jar -role hub
(It is command for starting Selenium Grid, so it might be wrong for you, but I dont know what are you trying to achieve)
And as mentioned above, after the command is run
DO NOT CLOSE COMMAND LINE
Open browser and load http://127.0.0.1:4444/
You should see something like this:
You are using grid 2.25.0
Find help on the official selenium wiki : more help here
default monitoring page : console