Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "main" java.lang.ExceptionInInitializerError ....Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class #3

Open
tyebilth opened this issue May 13, 2021 · 0 comments

Comments

@tyebilth
Copy link

Hi All
Hope you can assist. I've been stuck on this for 2 days.
I'm getting the above error on the caffeinate-me assignment (Module 2) when running the order a coffee feature. Did some google search and tried proposed solutions but still not luck

Most solution advise adding this in the POM file -> --add-opens java.base/java.lang.reflect=ALL-UNNAMED (which I added in the maven-surefire-plugin plugin

"C:\Program Files\Java\jdk-16.0.1\bin\java.exe" -Dorg.jetbrains.run.directory=C:\Users\tyebi\IdeaProjects\caffeinate-me\src\test\resources\features "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1\lib\idea_rt.jar=57681:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\tyebi\IdeaProjects\caffeinate-me\target\test-classes;C:\Users\tyebi\IdeaProjects\caffeinate-me\target\classes;C:\Users\tyebi.m2\repository\net\serenity-bdd\serenity-core\1.8.2\serenity-core-1.8.2.jar;C:\Users\tyebi.m2\repository\com\google\guava\guava\23.0\guava-23.0.jar;C:\Users\tyebi.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\tyebi.m2\repository\com\google\errorprone\error_prone_annotations\2.0.18\error_prone_annotations-2.0.18.jar;C:\Users\tyebi.m2\repository\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;C:\Users\tyebi.m2\repository\org\codehaus\mojo\animal-sniffer-annotations\1.14\animal-sniffer-annotations-1.14.jar;C:\Users\tyebi.m2\repository\com\google\inject\guice\4.1.0\guice-4.1.0.jar;C:\Users\tyebi.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\tyebi.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\tyebi.m2\repository\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\Users\tyebi.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\tyebi.m2\repository\org\objenesis\objenesis\2.6\objenesis-2.6.jar;C:\Users\tyebi.m2\repository\org\slf4j\slf4j-api\1.7.21\slf4j-api-1.7.21.jar;C:\Users\tyebi.m2\repository\xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar;C:\Users\tyebi.m2\repository\io\cucumber\cucumber-core\2.1.0\cucumber-core-2.1.0.jar;C:\Users\tyebi.m2\repository\info\cukes\cucumber-html\0.2.6\cucumber-html-0.2.6.jar;C:\Users\tyebi.m2\repository\io\cucumber\cucumber-jvm-deps\1.0.6\cucumber-jvm-deps-1.0.6.jar;C:\Users\tyebi.m2\repository\io\cucumber\gherkin\5.0.0\gherkin-5.0.0.jar;C:\Users\tyebi.m2\repository\io\cucumber\tag-expressions\1.0.1\tag-expressions-1.0.1.jar;C:\Users\tyebi.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\tyebi.m2\repository\org\mockito\mockito-core\1.10.19\mockito-core-1.10.19.jar;C:\Users\tyebi.m2\repository\net\bytebuddy\byte-buddy\1.7.5\byte-buddy-1.7.5.jar;C:\Users\tyebi.m2\repository\io\vavr\vavr\0.9.0\vavr-0.9.0.jar;C:\Users\tyebi.m2\repository\io\vavr\vavr-match\0.9.0\vavr-match-0.9.0.jar;C:\Users\tyebi.m2\repository\net\serenity-bdd\serenity-report-resources\1.8.2\serenity-report-resources-1.8.2.jar;C:\Users\tyebi.m2\repository\com\google\code\gson\gson\2.8.0\gson-2.8.0.jar;C:\Users\tyebi.m2\repository\commons-io\commons-io\2.5\commons-io-2.5.jar;C:\Users\tyebi.m2\repository\com\opera\operadriver\1.5\operadriver-1.5.jar;C:\Users\tyebi.m2\repository\com\opera\operalaunchers\1.1\operalaunchers-1.1.jar;C:\Users\tyebi.m2\repository\com\google\protobuf\protobuf-java\2.4.1\protobuf-java-2.4.1.jar;C:\Users\tyebi.m2\repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;C:\Users\tyebi.m2\repository\org\ini4j\ini4j\0.5.2\ini4j-0.5.2.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-server\3.7.1\selenium-server-3.7.1.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\3.7.1\selenium-firefox-driver-3.7.1.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\3.7.1\selenium-ie-driver-3.7.1.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-opera-driver\3.7.1\selenium-opera-driver-3.7.1.jar;C:\Users\tyebi.m2\repository\com\beust\jcommander\1.48\jcommander-1.48.jar;C:\Users\tyebi.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\tyebi.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar;C:\Users\tyebi.m2\repository\net\sourceforge\cssparser\cssparser\0.9.23\cssparser-0.9.23.jar;C:\Users\tyebi.m2\repository\net\sourceforge\htmlunit\htmlunit-core-js\2.27\htmlunit-core-js-2.27.jar;C:\Users\tyebi.m2\repository\net\sourceforge\htmlunit\neko-htmlunit\2.27\neko-htmlunit-2.27.jar;C:\Users\tyebi.m2\repository\org\apache\httpcomponents\httpcore\4.4.6\httpcore-4.4.6.jar;C:\Users\tyebi.m2\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\jetty-repacked\9.4.5.v20170502\jetty-repacked-9.4.5.v20170502.jar;C:\Users\tyebi.m2\repository\org\eclipse\jetty\jetty-client\9.4.5.v20170502\jetty-client-9.4.5.v20170502.jar;C:\Users\tyebi.m2\repository\org\eclipse\jetty\jetty-http\9.4.5.v20170502\jetty-http-9.4.5.v20170502.jar;C:\Users\tyebi.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\Users\tyebi.m2\repository\org\eclipse\jetty\websocket\websocket-api\9.4.5.v20170502\websocket-api-9.4.5.v20170502.jar;C:\Users\tyebi.m2\repository\org\eclipse\jetty\websocket\websocket-client\9.4.5.v20170502\websocket-client-9.4.5.v20170502.jar;C:\Users\tyebi.m2\repository\org\eclipse\jetty\websocket\websocket-common\9.4.5.v20170502\websocket-common-9.4.5.v20170502.jar;C:\Users\tyebi.m2\repository\xerces\xercesImpl\2.11.0\xercesImpl-2.11.0.jar;C:\Users\tyebi.m2\repository\org\yaml\snakeyaml\1.15\snakeyaml-1.15.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-java\3.7.1\selenium-java-3.7.1.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-api\3.7.1\selenium-api-3.7.1.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\3.7.1\selenium-chrome-driver-3.7.1.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\3.7.1\selenium-edge-driver-3.7.1.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\3.7.1\selenium-remote-driver-3.7.1.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\3.7.1\selenium-safari-driver-3.7.1.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\selenium-support\3.7.1\selenium-support-3.7.1.jar;C:\Users\tyebi.m2\repository\com\codeborne\phantomjsdriver\1.4.3\phantomjsdriver-1.4.3.jar;C:\Users\tyebi.m2\repository\org\eclipse\jetty\jetty-util\9.4.5.v20170502\jetty-util-9.4.5.v20170502.jar;C:\Users\tyebi.m2\repository\org\eclipse\jetty\jetty-io\9.4.5.v20170502\jetty-io-9.4.5.v20170502.jar;C:\Users\tyebi.m2\repository\org\seleniumhq\selenium\htmlunit-driver\2.27\htmlunit-driver-2.27.jar;C:\Users\tyebi.m2\repository\io\appium\java-client\5.0.4\java-client-5.0.4.jar;C:\Users\tyebi.m2\repository\commons-validator\commons-validator\1.6\commons-validator-1.6.jar;C:\Users\tyebi.m2\repository\commons-beanutils\commons-beanutils\1.9.2\commons-beanutils-1.9.2.jar;C:\Users\tyebi.m2\repository\commons-digester\commons-digester\1.8.1\commons-digester-1.8.1.jar;C:\Users\tyebi.m2\repository\org\springframework\spring-context\5.0.0.RELEASE\spring-context-5.0.0.RELEASE.jar;C:\Users\tyebi.m2\repository\org\springframework\spring-aop\5.0.0.RELEASE\spring-aop-5.0.0.RELEASE.jar;C:\Users\tyebi.m2\repository\org\springframework\spring-beans\5.0.0.RELEASE\spring-beans-5.0.0.RELEASE.jar;C:\Users\tyebi.m2\repository\org\springframework\spring-core\5.0.0.RELEASE\spring-core-5.0.0.RELEASE.jar;C:\Users\tyebi.m2\repository\org\springframework\spring-jcl\5.0.0.RELEASE\spring-jcl-5.0.0.RELEASE.jar;C:\Users\tyebi.m2\repository\org\springframework\spring-expression\5.0.0.RELEASE\spring-expression-5.0.0.RELEASE.jar;C:\Users\tyebi.m2\repository\org\aspectj\aspectjweaver\1.8.11\aspectjweaver-1.8.11.jar;C:\Users\tyebi.m2\repository\org\openpnp\opencv\3.2.0-1\opencv-3.2.0-1.jar;C:\Users\tyebi.m2\repository\org\codehaus\groovy\groovy\2.4.12\groovy-2.4.12.jar;C:\Users\tyebi.m2\repository\net\sf\opencsv\opencsv\2.0\opencsv-2.0.jar;C:\Users\tyebi.m2\repository\commons-beanutils\commons-beanutils-core\1.8.3\commons-beanutils-core-1.8.3.jar;C:\Users\tyebi.m2\repository\joda-time\joda-time\2.7\joda-time-2.7.jar;C:\Users\tyebi.m2\repository\com\thoughtworks\xstream\xstream\1.4.9\xstream-1.4.9.jar;C:\Users\tyebi.m2\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;C:\Users\tyebi.m2\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;C:\Users\tyebi.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;C:\Users\tyebi.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\tyebi.m2\repository\org\freemarker\freemarker\2.3.23\freemarker-2.3.23.jar;C:\Users\tyebi.m2\repository\net\sourceforge\jexcelapi\jxl\2.6.12\jxl-2.6.12.jar;C:\Users\tyebi.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\tyebi.m2\repository\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar;C:\Users\tyebi.m2\repository\net\sourceforge\htmlunit\htmlunit\2.27\htmlunit-2.27.jar;C:\Users\tyebi.m2\repository\org\apache\httpcomponents\httpclient\4.5.3\httpclient-4.5.3.jar;C:\Users\tyebi.m2\repository\org\apache\httpcomponents\httpmime\4.5.3\httpmime-4.5.3.jar;C:\Users\tyebi.m2\repository\org\fluentlenium\fluentlenium-core\0.10.2\fluentlenium-core-0.10.2.jar;C:\Users\tyebi.m2\repository\com\jhlabs\filters\2.0.235\filters-2.0.235.jar;C:\Users\tyebi.m2\repository\org\asciidoctor\asciidoctor-java-integration\0.1.4\asciidoctor-java-integration-0.1.4.jar;C:\Users\tyebi.m2\repository\org\jruby\jruby-complete\1.7.4\jruby-complete-1.7.4.jar;C:\Users\tyebi.m2\repository\org\imgscalr\imgscalr-lib\4.2\imgscalr-lib-4.2.jar;C:\Users\tyebi.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\tyebi.m2\repository\org\hibernate\hibernate-validator\5.1.1.Final\hibernate-validator-5.1.1.Final.jar;C:\Users\tyebi.m2\repository\org\jboss\logging\jboss-logging\3.1.3.GA\jboss-logging-3.1.3.GA.jar;C:\Users\tyebi.m2\repository\com\fasterxml\classmate\1.0.0\classmate-1.0.0.jar;C:\Users\tyebi.m2\repository\javax\el\javax.el-api\2.2.4\javax.el-api-2.2.4.jar;C:\Users\tyebi.m2\repository\org\glassfish\web\javax.el\2.2.4\javax.el-2.2.4.jar;C:\Users\tyebi.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar;C:\Users\tyebi.m2\repository\xalan\serializer\2.7.2\serializer-2.7.2.jar;C:\Users\tyebi.m2\repository\org\awaitility\awaitility\3.0.0\awaitility-3.0.0.jar;C:\Users\tyebi.m2\repository\com\typesafe\config\1.3.1\config-1.3.1.jar;C:\Users\tyebi.m2\repository\org\jsoup\jsoup\1.10.3\jsoup-1.10.3.jar;C:\Users\tyebi.m2\repository\com\google\jimfs\jimfs\1.1\jimfs-1.1.jar;C:\Users\tyebi.m2\repository\es\nitaur\markdown\txtmark\0.16\txtmark-0.16.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-all\0.26.4\flexmark-all-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark\0.26.4\flexmark-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-abbreviation\0.26.4\flexmark-ext-abbreviation-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-anchorlink\0.26.4\flexmark-ext-anchorlink-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-aside\0.26.4\flexmark-ext-aside-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-autolink\0.26.4\flexmark-ext-autolink-0.26.4.jar;C:\Users\tyebi.m2\repository\org\nibor\autolink\autolink\0.6.0\autolink-0.6.0.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-definition\0.26.4\flexmark-ext-definition-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-emoji\0.26.4\flexmark-ext-emoji-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-escaped-character\0.26.4\flexmark-ext-escaped-character-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-footnotes\0.26.4\flexmark-ext-footnotes-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-gfm-issues\0.26.4\flexmark-ext-gfm-issues-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-gfm-strikethrough\0.26.4\flexmark-ext-gfm-strikethrough-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-gfm-tables\0.26.4\flexmark-ext-gfm-tables-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-gfm-tasklist\0.26.4\flexmark-ext-gfm-tasklist-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-gfm-users\0.26.4\flexmark-ext-gfm-users-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-jekyll-front-matter\0.26.4\flexmark-ext-jekyll-front-matter-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-jekyll-tag\0.26.4\flexmark-ext-jekyll-tag-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-ins\0.26.4\flexmark-ext-ins-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-xwiki-macros\0.26.4\flexmark-ext-xwiki-macros-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-superscript\0.26.4\flexmark-ext-superscript-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-tables\0.26.4\flexmark-ext-tables-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-toc\0.26.4\flexmark-ext-toc-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-typographic\0.26.4\flexmark-ext-typographic-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-wikilink\0.26.4\flexmark-ext-wikilink-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-ext-yaml-front-matter\0.26.4\flexmark-ext-yaml-front-matter-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-formatter\0.26.4\flexmark-formatter-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-html-parser\0.26.4\flexmark-html-parser-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-jira-converter\0.26.4\flexmark-jira-converter-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-pdf-converter\0.26.4\flexmark-pdf-converter-0.26.4.jar;C:\Users\tyebi.m2\repository\com\openhtmltopdf\openhtmltopdf-core\0.0.1-RC9\openhtmltopdf-core-0.0.1-RC9.jar;C:\Users\tyebi.m2\repository\com\openhtmltopdf\openhtmltopdf-pdfbox\0.0.1-RC9\openhtmltopdf-pdfbox-0.0.1-RC9.jar;C:\Users\tyebi.m2\repository\org\apache\pdfbox\pdfbox\2.0.4\pdfbox-2.0.4.jar;C:\Users\tyebi.m2\repository\org\apache\pdfbox\fontbox\2.0.4\fontbox-2.0.4.jar;C:\Users\tyebi.m2\repository\com\openhtmltopdf\openhtmltopdf-rtl-support\0.0.1-RC9\openhtmltopdf-rtl-support-0.0.1-RC9.jar;C:\Users\tyebi.m2\repository\com\ibm\icu\icu4j\58.1\icu4j-58.1.jar;C:\Users\tyebi.m2\repository\com\openhtmltopdf\openhtmltopdf-jsoup-dom-converter\0.0.1-RC9\openhtmltopdf-jsoup-dom-converter-0.0.1-RC9.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-profile-pegdown\0.26.4\flexmark-profile-pegdown-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-util\0.26.4\flexmark-util-0.26.4.jar;C:\Users\tyebi.m2\repository\com\vladsch\flexmark\flexmark-youtrack-converter\0.26.4\flexmark-youtrack-converter-0.26.4.jar;C:\Users\tyebi.m2\repository\net\serenity-bdd\serenity-junit\1.8.2\serenity-junit-1.8.2.jar;C:\Users\tyebi.m2\repository\cglib\cglib\3.2.5\cglib-3.2.5.jar;C:\Users\tyebi.m2\repository\org\apache\ant\ant\1.9.6\ant-1.9.6.jar;C:\Users\tyebi.m2\repository\org\apache\ant\ant-launcher\1.9.6\ant-launcher-1.9.6.jar;C:\Users\tyebi.m2\repository\org\projectlombok\lombok\1.18.20\lombok-1.18.20.jar;C:\Users\tyebi.m2\repository\net\serenity-bdd\serenity-screenplay\1.8.2\serenity-screenplay-1.8.2.jar;C:\Users\tyebi.m2\repository\net\serenity-bdd\serenity-screenplay-webdriver\1.8.2\serenity-screenplay-webdriver-1.8.2.jar;C:\Users\tyebi.m2\repository\net\serenity-bdd\serenity-cucumber\1.6.5\serenity-cucumber-1.6.5.jar;C:\Users\tyebi.m2\repository\io\cucumber\cucumber-java\2.1.0\cucumber-java-2.1.0.jar;C:\Users\tyebi.m2\repository\io\cucumber\cucumber-junit\2.1.0\cucumber-junit-2.1.0.jar;C:\Users\tyebi.m2\repository\org\slf4j\slf4j-simple\1.7.7\slf4j-simple-1.7.7.jar;C:\Users\tyebi.m2\repository\junit\junit\4.12\junit-4.12.jar;C:\Users\tyebi.m2\repository\org\assertj\assertj-core\3.6.2\assertj-core-3.6.2.jar;C:\Users\tyebi.m2\repository\org\hamcrest\hamcrest-all\1.3\hamcrest-all-1.3.jar;C:\Users\tyebi.m2\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar;C:\Users\tyebi.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1\plugins\junit\lib\junit-rt.jar;C:\Users\tyebi\AppData\Roaming\JetBrains\IdeaIC2021.1\plugins\cucumber-java\lib\cucumber-jvmFormatter.jar" net.serenitybdd.cucumber.cli.Main --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter --monochrome --glue caffeinateme C:/Users/tyebi/IdeaProjects/caffeinate-me/src/test/resources/features/order_a_coffee.feature
Testing started at 8:03 AM ...
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.google.inject.internal.cglib.reflect.$FastClass$Generator.getProtectionDomain(FastClass.java:73)
at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:206)
at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:65)
at com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:252)
at com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:203)
at com.google.inject.internal.ProviderMethod.create(ProviderMethod.java:69)
at com.google.inject.internal.ProviderMethodsModule.createProviderMethod(ProviderMethodsModule.java:275)
at com.google.inject.internal.ProviderMethodsModule.getProviderMethods(ProviderMethodsModule.java:144)
at com.google.inject.internal.ProviderMethodsModule.configure(ProviderMethodsModule.java:123)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:349)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.Guice.createInjector(Guice.java:99)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at net.thucydides.core.guice.Injectors.getInjector(Injectors.java:16)
at net.serenitybdd.cucumber.CucumberWithSerenityRuntime.using(CucumberWithSerenityRuntime.java:22)
at net.serenitybdd.cucumber.cli.Main.run(Main.java:27)
at net.serenitybdd.cucumber.cli.Main.main(Main.java:18)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @277c0f21
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
at com.google.inject.internal.cglib.core.$ReflectUtils$1.run(ReflectUtils.java:52)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at com.google.inject.internal.cglib.core.$ReflectUtils.(ReflectUtils.java:42)
... 21 more

Process finished with exit code 1

Running Java 16

POM File


4.0.0
net.serenitydojo
caffeinate-me
1.0.0-SNAPSHOT
jar

<name>Caffeinate Me Application</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <serenity.version>1.8.2</serenity.version>
    <serenity.maven.version>1.8.2</serenity.maven.version>
    <serenity.cucumber.version>1.6.5</serenity.cucumber.version>
    <encoding>UTF-8</encoding>
    <tags></tags>
    <parallel.tests>4</parallel.tests>
    <webdriver.base.url></webdriver.base.url>
</properties>

<repositories>
    <repository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>bintray</name>
        <url>http://jcenter.bintray.com</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>bintray-plugins</name>
        <url>http://jcenter.bintray.com</url>
    </pluginRepository>
</pluginRepositories>

<dependencies>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        <version>${serenity.version}</version>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-junit</artifactId>
        <version>${serenity.version}</version>
    </dependency>
    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>3.2.5</version>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <optional>true</optional>
        <version>1.18.20</version>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay</artifactId>
        <version>${serenity.version}</version>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-screenplay-webdriver</artifactId>
        <version>${serenity.version}</version>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-cucumber</artifactId>
        <version>${serenity.cucumber.version}</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.7</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.6.2</version>
    </dependency>
    <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
    </dependency>
    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.3.1</version>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.20</version>
            <configuration>
                <argLine>
                -ea
                --add-opens java.base/java.util=ALL-UNNAMED
                --add-opens java.base/java.lang.reflect=ALL-UNNAMED
                --add-opens java.base/java.text=ALL-UNNAMED
                --add-opens java.desktop/java.awt.font=ALL-UNNAMED
                --add-opens java.base/java.lang=ALL-UNNAMED
                    -Dillegal-access=permit</argLine>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.20</version>
            <configuration>
                <includes>
                    <include>**/*Test.java</include>
                    <include>**/Test*.java</include>
                    <include>**/*TestSuite.java</include>
                    <include>**/When*.java</include>
                </includes>
                <systemPropertyVariables>
                    <webdriver.base.url>${webdriver.base.url}</webdriver.base.url>
                </systemPropertyVariables>
                <parallel>classes</parallel>
                <threadCount>${parallel.tests}</threadCount>
                <forkCount>${parallel.tests}</forkCount>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.2</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>net.serenity-bdd.maven.plugins</groupId>
            <artifactId>serenity-maven-plugin</artifactId>
            <version>${serenity.maven.version}</version>
            <configuration>
              <tags>${tags}</tags>
            </configuration>
            <executions>
                <execution>
                    <id>serenity-reports</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>aggregate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant