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
Related
I have created a java micronaut application in Eclipse IDE. The microservice is able to build and run successfully via commandline but I'd like to know if there is a way to add breakpoints in the application for debugging just the way we debug any normal java application?
I did try the solution mentioned here Debug java micronaut microservice in visual studio code.
I added run.jvmArgs('-Dmicronaut.environments=dev','-noverify', '-XX:TieredStopAtLevel=1', '-Xdebug',"-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n", '-Dcom.sun.management.jmxremote') configuration
to build.gradle.
When I build and run the project again, I see
> Task :run
Listening for transport dt_socket at address: 8000
12:53:51.084 [main] INFO i.m.context.env.DefaultEnvironment - Established active environments: [dev]
12:53:53.809 [main] INFO io.micronaut.runtime.Micronaut - Startup completed in 3102ms. Server Running: http://localhost:6030
So how do I add breakpoints and debug the microservice now?
In this setup, the JVM is listening on a socket for a debugger to attach. In Eclipse, you can create a remote debug configuration for this:
Run -> Debug Configurations
Make new Launch configuration under Remote Java Application
Ensure the right project is selected. Under Connection Properties, let it connect to localhost on port 8000 (which happens to be the default)
Click Debug
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'm new to grails and am trying to compile and run an app from the source code that a vendor provided to us. I'm doing this in IntelliJ, but am just trying to run it within the terminal. I was able to compile the app successfully at the command line. Now when I try grails run-app, it runs through a series of outputs, and then stops at:
Configuring Spring Security Core ...
... finished configuring Spring Security Core
And then it stops and the prompt returns. Here's the entire output:
C:\Users\xxx.xxx\Documents\Repositories\xe_repo\banner_student_ssb_app>grails
run-app --verbose --stacktrace Java HotSpot(TM) 64-Bit Server VM
warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
PermSize=256m; support was removed in 8.0 Picked up _JAVA_OPTIONS:
-Xmx768M -Xms768M -XX:MaxPermSize=256m -XX:PermSize=256m Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
MaxPermSize=256m; support was removed in 8.0 Java HotSpot(TM) 64-Bit
Server VM warning: ignoring option PermSize=256m; support was removed
in 8.0 Base Directory:
C:\Users\xxx.xxx\Documents\Repositories\xe_repo\banner_student_ssb_app
| Packaging Grails application extraSrcDirs =
C:\Users\xxx.xxx\Documents\Repositories\xe_repo\banner_student_ssb_app/src/installer/groovy
extraSrcDirs =
C:\Users\xxx.xxx\Documents\Repositories\xe_repo\banner_student_ssb_app/src/installer/i18n
extraSrcDirs =
C:\Users\xxx.xxx\Documents\Repositories\xe_repo\banner_student_ssb_app/src/installer/spring
[copy] Warning: C:\Users\xxx.xxx\Documents\Repositories\xe_repo\banner_student_ssb_app\src\installer\groovy
does not exist.
[copy] Warning: C:\Users\xxx.xxx\Documents\Repositories\xe_repo\banner_student_ssb_app\src\installer\i18n
does not exist.
[copy] Warning: C:\Users\xxx.xxx\Documents\Repositories\xe_repo\banner_student_ssb_app\src\installer\spring
does not exist. | Compiling 2 source files | Compiling 2
source files | Compiling 2 source files..... configuration:
file:C:\Users\xxx.xxx/.grails/banner_configuration.groovy
configuration:
file:C:\Users\xxx.xxx/.grails/StudentSSB_configuration.groovy
configuration: classpath:WebAppExtensibilityConfig.class 2016-11-10
16:37:38,714 [main] INFO configuration.ApplicationConfigurationUtils
- Using configuration file '$HOME/.grails/banner_configuration.groovy' 2016-11-10 16:37:38,716 [main] INFO
configuration.ApplicationConfigurationUtils - Using configuration
file '$HOME/.grails/StudentSSB_configuration.groovy' 2016-11-10
16:37:38,719 [main] INFO configuration.ApplicationConfigurationUtils
- Using configuration file WebAppExtensibilityConfig.class from the classpath (e.g., from within the war file) configuration:
file:C:\Users\xxx.xxx/.grails/banner_configuration.groovy
configuration:
file:C:\Users\xxx.xxx/.grails/StudentSSB_configuration.groovy
configuration: classpath:WebAppExtensibilityConfig.class | Running
Grails application 2016-11-10 16:37:47,779 [localhost-startStop-1]
INFO configuration.ApplicationConfigurationUtils - Using
configuration file '$HOME/.grails/banner_configuration.groovy'
2016-11-10 16:37:47,782 [localhost-startStop-1] INFO
configuration.ApplicationConfigurationUtils - Using configuration
file '$HOME/.grails/StudentSSB_configuration.groovy' 2016-11-10
16:37:47,790 [localhost-startStop-1] INFO
configuration.ApplicationConfigurationUtils - Using configuration
file WebAppExtensibilityConfig.class from the classpath (e.g., from
within the war file) configuration:
file:C:\Users\xxx.xxx/.grails/banner_configuration.groovy
configuration:
file:C:\Users\xxx.xxx/.grails/StudentSSB_configuration.groovy
configuration: classpath:WebAppExtensibilityConfig.class 2016-11-10
16:37:54,007 [localhost-startStop-1] INFO
configuration.ApplicationConfigurationUtils - Using configuration
file '$HOME/.grails/banner_configuration.groovy' 2016-11-10
16:37:54,008 [localhost-startStop-1] INFO
configuration.ApplicationConfigurationUtils - Using configuration
file '$HOME/.grails/StudentSSB_configuration.groovy' 2016-11-10
16:37:54,010 [localhost-startStop-1] INFO
configuration.ApplicationConfigurationUtils - Using configuration
file WebAppExtensibilityConfig.class from the classpath (e.g., from
within the war file) configuration:
file:C:\Users\xxx.xxx/.grails/banner_configuration.groovy
configuration:
file:C:\Users\xxx.xxx/.grails/StudentSSB_configuration.groovy
configuration: classpath:WebAppExtensibilityConfig.class
Configuring Spring Security Core ... ... finished configuring Spring
Security Core
I've tried running it as "grails run-app --verbose --stacktrace" and I get the same exact thing.
How am I supposed to troubleshoot if there are no errors? (I'm also new to IntelliJ, and Spring, btw). Thanks in advance.
Figured it out - It was in target/stracktrace.log and target/logs/xxxxxxxxxx.log. This was define in an app configuration .groovy file.
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.
Is there a way to solve this? I am also new to both tapestry, jetty, and openejb. I am having out of ideas =(
Configuration: Jetty 6.1.26 + OpenEJB 4.5.1 running Jumpstart for Tapestry 6.8
All compiles well, runs Ant collapser successfully, and deployed well. Jetty and OpenEJB are prestine from the binary zip. Just that OpenEjb have hsqldb-2.8 rather than hsqldb-2.9 which is instructed from the tapestry-jumpstart install manual.
But at some point when running in Eclipse Juno or IntelliJ IDEA (doesnt matter) I get this following log:
INFO - Deployed Application(path=E:\Workspace\IdeaProjects\tapestry\jumpstart-6.8.0\classpath.ear)
WARN [main] (Slf4jLog.java:76) - Config error at <New id="wiggle" class="org.mortbay.jetty.plus.naming.EnvEntry"><Arg><Ref id="wac"/></Arg><Arg>wiggle</Arg><Arg type="java.lang.Double">100</Arg><Arg type="boolean">true</Arg></New>
WARN [main] (Slf4jLog.java:89) - EXCEPTION
java.lang.reflect.InvocationTargetException
...
caused by: javax.naming.NamingException: Unknown JNDI name prefix 'org.mortbay.jetty.webapp.WebAppContext#40ad55ac{_test-jndi,c:'
at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:130)
...
WARN [main] (Slf4jLog.java:76) - ContextDeployer$Scanner failed on 'C:\Server\jetty-6.1.26\contexts\test-jndi.xml
INFO [main] (Slf4jLog.java:67) - NO JSP Support for /jumpstart, did not find org.apache.jasper.servlet.JspServlet
INFO [main] (RegistryBuilder.java:129) - Adding module definition for class org.apache.tapestry5.ioc.services.TapestryIOCModule
Can someone tell me what went wrong with this? and what should I do?
Thanks much.