java.lang.NullPointerException: at utilities2.ExcelUtility.findCells(ExcelUtility.java:70) - maven

I am trying to run my test cases from command Line using maven command.
Below is the error message I am getting. I was able to run the test case when I right click on my XML file and run it with TestNG suites without a problem.
The problem I have is that I can't execute the test cases that are inside my pom.xml. This problem only occurs whenever I am using excel for data-driven.I am suspecting my poi might not be compatible with the maven version or the chrome gecko might not be compatible with the maven version. I am just guessing and that is why I need your help.
C:\
Blockquote
mvn test -PClientAlert
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cehproject 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # cehproject
---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\akinrins\workspace\cehprojec
t\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # cehproject ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # ce
hproject ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\akinrins\workspace\cehprojec
t\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # cehproj
ect ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # cehproject ---
[INFO] Surefire report directory: C:\Users\akinrins\workspace\cehproject\target\
surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Starting ChromeDriver 2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41) on
port 8611
Only local connections are allowed.
Jan 16, 2018 2:37:04 PM org.openqa.selenium.remote.ProtocolHandshake createSessi
on
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the rem
ote end
log4j:WARN No appenders could be found for logger (org.apache.http.client.protoc
ol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more in
fo.
Jan 16, 2018 2:37:06 PM org.openqa.selenium.remote.ProtocolHandshake createSessi
on
INFO: Detected dialect: OSS
java.lang.NullPointerException
at utilities2.ExcelUtility.findCells(ExcelUtility.java:70)
at utilities2.ExcelUtility.getTestData(ExcelUtility.java:40)
at AlertTesting.ClientAlertTest.dataProvider(ClientAlertTest.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocat
ionHelper.java:108)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocat
ionHelper.java:55)
at org.testng.internal.MethodInvocationHelper.invokeMethodNoCheckedExcep
tion(MethodInvocationHelper.java:45)
at org.testng.internal.MethodInvocationHelper.invokeDataProvider(MethodI
nvocationHelper.java:115)
at org.testng.internal.Parameters.handleParameters(Parameters.java:509)
at org.testng.internal.Invoker.handleParameters(Invoker.java:1308)
at org.testng.internal.Invoker.createParameters(Invoker.java:1036)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1126)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWork
er.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.ja
va:295)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXml
TestSuite.java:84)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider
.java:90)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameCla
ssLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(Fork
edBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
103)
[Utils] [ERROR] [Error] org.testng.TestNGException:
Data Provider public java.lang.Object[][] AlertTesting.ClientAlertTest.dataProvi
der() must return either Object[][] or Iterator<Object>[], not class [[Lja
va.lang.Object;
at org.testng.internal.MethodInvocationHelper.invokeDataProvider(MethodI
nvocationHelper.java:137)
at org.testng.internal.Parameters.handleParameters(Parameters.java:509)
at org.testng.internal.Invoker.handleParameters(Invoker.java:1308)
at org.testng.internal.Invoker.createParameters(Invoker.java:1036)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1126)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWork
er.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.ja
va:295)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXml
TestSuite.java:84)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider
.java:90)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameCla
ssLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(Fork
edBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
103)
Tests run: 6, Failures: 2, Errors: 0, Skipped: 4, Time elapsed: 9.846 sec <<< FA
ILURE! - in TestSuite
ClientAlertOne(AlertTesting.ClientAlertTest) Time elapsed: 9.712 sec <<< FAILU
RE!
java.lang.NoSuchMethodError: org.apache.poi.util.POILogger.log(ILjava/lang/Objec
t;)V
at org.apache.poi.openxml4j.opc.PackageRelationshipCollection.parseRelat
ionshipsPart(PackageRelationshipCollection.java:304)
at org.apache.poi.openxml4j.opc.PackageRelationshipCollection.<init>(Pac
kageRelationshipCollection.java:156)
at org.apache.poi.openxml4j.opc.PackageRelationshipCollection.<init>(Pac
kageRelationshipCollection.java:124)
at org.apache.poi.openxml4j.opc.PackagePart.loadRelationships(PackagePar
t.java:559)
at org.apache.poi.openxml4j.opc.PackagePart.<init>(PackagePart.java:112)
at org.apache.poi.openxml4j.opc.PackagePart.<init>(PackagePart.java:83)
at org.apache.poi.openxml4j.opc.PackagePart.<init>(PackagePart.java:128)
at org.apache.poi.openxml4j.opc.ZipPackagePart.<init>(ZipPackagePart.jav
a:78)
at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:
218)
at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:662)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:269)
at org.apache.poi.util.PackageHelper.open(PackageHelper.java:39)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:2
04)
at utilities2.ExcelUtility.setExcelFile(ExcelUtility.java:27)
at AlertTesting.ClientAlertTest.ClientAlertOne(ClientAlertTest.java:63)
TC_ClientAlertTest(AlertTesting.ClientAlertTest) Time elapsed: 9.743 sec <<< F
AILURE!
org.testng.TestNGException:
Data Provider public java.lang.Object[][] AlertTesting.ClientAlertTest.dataProvi
der() must return either Object[][] or Iterator<Object>[], not class [[Ljava.lan
g.Object;
at org.testng.internal.MethodInvocationHelper.invokeDataProvider(MethodI
nvocationHelper.java:137)
at org.testng.internal.Parameters.handleParameters(Parameters.java:509)
at org.testng.internal.Invoker.handleParameters(Invoker.java:1308)
at org.testng.internal.Invoker.createParameters(Invoker.java:1036)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1126)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWork
er.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.ja
va:295)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXml
TestSuite.java:84)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider
.java:90)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameCla
ssLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(Fork
edBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
103)
Results :
Failed tests:
ClientAlertTest.ClientAlertOne:63 » NoSuchMethod org.apache.poi.util.POILogger
...
ClientAlertTest.TC_ClientAlertTest » TestNG
Data Provider public java.lang.Ob...
Tests run: 6, Failures: 2, Errors: 0, Skipped: 4
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.268 s
[INFO] Finished at: 2018-01-16T14:37:13-05:00
[INFO] Final Memory: 13M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
18.1:test (default-test) on project cehproject: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\akinrins\workspace\cehproject\target\surefire-r
eports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
`enter code here`ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption

Related

Surefire Tries Running TestNG tests when there are none

I'm migrating unit and integration tests in a project, from TestNG to JUnit 5.
I've removed all possible mentions to TestNG that existed before, and converted my tests to JUnit 5.
I've removed any TestNG dependencies from my POM file.
Still, when I run my tests through Maven, it first runs tests with a JUnit runner, then Surefire (3.0.0-M5) seems to run tests with a TestNG runner, even though are tests are using JUnit 5 annotations and configuration. And it fails because I've excluded TestNG from my dependencies.
What am I missing here? Why Surefire looks for a TestNG class when there are not TestNG tests to be run and no dependency in my POM?
Here's the Maven log:
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) # encourage-zqm-connector-service ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running GroupUnmarshallTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.356 s - in GroupUnmarshallTest
[INFO] Running ExternalDataIdTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.097 s - in ExternalDataIdTest
[INFO] Running ExternalDataTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.79 s - in ExternalDataTest
[INFO] Running ConversationConverterTest
[INFO] Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.971 s - in ConversationConverterTest
[INFO] Running LabelConverterTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.036 s - in LabelConverterTest
[INFO] Running ImportSpeechTagsRouteBuilderTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 38.506 s - in ImportSpeechTagsRouteBuilderTest
[INFO] Running CoupleServiceTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.384 s - in CoupleServiceTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 35, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
[ERROR] org/testng/TestNG
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Encourage ZQM Connector 20.2.24-SNAPSHOT:
[INFO]
[INFO] Connector ............................ SUCCESS [ 1.256 s]
[INFO] Connector - Service .................. FAILURE [02:58 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:00 min
[INFO] Finished at: 2023-01-18T00:12:48+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project connector-service: There are test failures.
[ERROR]
[ERROR] Please refer to /mnt/c/Users/guita/git/connector/service/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] There was an error in the forked process
[ERROR] org/testng/TestNG
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] org/testng/TestNG
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:733)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:370)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:351)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:171)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:163)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:298)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:960)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

Project build failed while testing project with maven and jvmdump file is created which shows nullpointerexception which is in Freemarker

java.lang.NullPointerException
at freemarker.template.TemplateException.getFTLInstructionStack(TemplateException.java:233)
at freemarker.template.TemplateException.printStackTrace(TemplateException.java:363)
at freemarker.template.TemplateException.printStackTrace(TemplateException.java:339)
at freemarker.template.TemplateException.printStackTrace(TemplateException.java:327)
at org.testng.internal.Utils.buildStackTrace(Utils.java:535)
at org.testng.internal.Utils.longStackTrace(Utils.java:519)
at org.testng.reporters.TestHTMLReporter.generateTable(TestHTMLReporter.java:155)
at org.testng.reporters.TestHTMLReporter.generateLog(TestHTMLReporter.java:311)
at org.testng.reporters.TestHTMLReporter.onFinish(TestHTMLReporter.java:40)
at org.testng.TestRunner.fireEvent(TestRunner.java:772)
at org.testng.TestRunner.afterRun(TestRunner.java:741)
at org.testng.TestRunner.run(TestRunner.java:509)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
at org.testng.SuiteRunner.run(SuiteRunner.java:364)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
at org.testng.TestNG.runSuites(TestNG.java:1049)
at org.testng.TestNG.run(TestNG.java:1017)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:135)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:193)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:94)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:146)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143)
This error comes while i run test by maven, but when i run test individually, its fine. Error is dumped in target/surefire-reports and the dump file is 2019-07-18T15-47-53_893-jvmRun1.dump. This error comes up when i try to catch exception in unit test that is passed. I have Freemerker Dependency in my project and this exception is of freemarker. here is the unit test.
#Test(expectedExceptions = TemplateException.class)
public void getTemplate_Unsuccessfull_TemplateException() throws IOException, TemplateException {
//GIVEN
//WHEN
Mockito.when(configuration.getTemplate("someFile.ftl")).thenReturn(template);
Mockito.doThrow(TemplateException.class).when(template).process(Mockito.any(Map.class),Mockito.any(Writer.class));
//THEN
TemplateService.getTemplate("abcd#gmail.com","123456");
}
And this is console output
Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.743 s
[INFO] Finished at: 2019-07-18T16:42:41+05:30
[INFO] Final Memory: 47M/382M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20:test (default-test) on project ***: There are test failures.
[ERROR]
[ERROR] Please refer to F:\*****\Project\****\branches\Authentication_20190508\Service\***\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] There was an error in the forked process
[ERROR] null
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] null
I expect to successfully run all tests by maven.

Maven Error Building MILO OPC-UA

I am trying to build Milo to run the standalone examples. From the project root I run mvn clean install but maven complaints about all org.opcfoundation.* dependencies both in bsd-parser-core and bsd-parser-gson.
Error message:
[INFO] 45 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Eclipse Milo Build Tools ........................... SUCCESS [ 1.134 s]
[INFO] Eclipse Milo - OPC-UA (IEC 62541) .................. SUCCESS [ 1.420 s]
[INFO] opc-ua-stack ....................................... SUCCESS [ 1.026 s]
[INFO] stack-core ......................................... SUCCESS [ 13.145 s]
[INFO] stack-client ....................................... SUCCESS [ 1.195 s]
[INFO] opc-ua-sdk ......................................... SUCCESS [ 0.985 s]
[INFO] sdk-core ........................................... SUCCESS [ 1.842 s]
[INFO] bsd-parser ......................................... SUCCESS [ 0.240 s]
[INFO] bsd-parser-core .................................... FAILURE [ 1.274 s]
[INFO] sdk-client ......................................... SKIPPED
[INFO] stack-server ....................................... SKIPPED
[INFO] sdk-server ......................................... SKIPPED
[INFO] milo-examples ...................................... SKIPPED
[INFO] server-examples .................................... SKIPPED
[INFO] client-examples .................................... SKIPPED
[INFO] standalone-examples ................................ SKIPPED
[INFO] bsd-parser-gson .................................... SKIPPED
[INFO] stack-examples ..................................... SKIPPED
[INFO] stack-tests ........................................ SKIPPED
[INFO] sdk-tests .......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.517 s
[INFO] Finished at: 2018-03-16T15:16:34+00:00
[INFO] Final Memory: 43M/575M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (java-compile) on project bsd-parser-core: Compilation failure: Compilation failure:
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[50,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[51,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[52,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[169,19] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[171,29] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[352,29] cannot find symbol
[ERROR] symbol: class FieldType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[374,36] cannot find symbol
[ERROR] symbol: class FieldType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[398,68] cannot find symbol
[ERROR] symbol: class SwitchOperand
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[419,42] cannot find symbol
[ERROR] symbol: class FieldType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericStructCodec.java:[23,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericStructCodec.java:[27,31] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.GenericStructCodec
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericEnumCodec.java:[21,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericEnumCodec.java:[25,19] cannot find symbol
[ERROR] symbol: class EnumeratedType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.GenericEnumCodec
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericEnumCodec.java:[27,29] cannot find symbol
[ERROR] symbol: class EnumeratedType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.GenericEnumCodec
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[22,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[23,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[24,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[25,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[78,65] cannot find symbol
[ERROR] symbol: class EnumeratedType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[86,67] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericBsdParser.java:[18,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericBsdParser.java:[19,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericBsdParser.java:[24,56] cannot find symbol
[ERROR] symbol: class EnumeratedType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.GenericBsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericBsdParser.java:[29,58] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.GenericBsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[182,25] cannot find symbol
[ERROR] symbol: class FieldType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[186,13] cannot find symbol
[ERROR] symbol: class FieldType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[259,25] cannot find symbol
[ERROR] symbol: class FieldType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[263,13] cannot find symbol
[ERROR] symbol: class FieldType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[391,13] cannot find symbol
[ERROR] symbol: class SwitchOperand
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[392,44] cannot find symbol
[ERROR] symbol: variable SwitchOperand
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[400,18] cannot find symbol
[ERROR] symbol: variable EQUALS
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[402,18] cannot find symbol
[ERROR] symbol: variable NOT_EQUAL
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[404,18] cannot find symbol
[ERROR] symbol: variable GREATER_THAN
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[406,18] cannot find symbol
[ERROR] symbol: variable GREATER_THAN_OR_EQUAL
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[408,18] cannot find symbol
[ERROR] symbol: variable LESS_THAN
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[410,18] cannot find symbol
[ERROR] symbol: variable LESS_THAN_OR_EQUAL
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[43,55] cannot find symbol
[ERROR] symbol: class ObjectFactory
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[45,9] cannot find symbol
[ERROR] symbol: class TypeDictionary
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[45,42] cannot find symbol
[ERROR] symbol: class TypeDictionary
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[48,67] cannot find symbol
[ERROR] symbol: class EnumeratedType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[50,17] cannot find symbol
[ERROR] symbol: class EnumeratedType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[50,50] cannot find symbol
[ERROR] symbol: class EnumeratedType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[59,67] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[61,17] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/parser/BsdParser.java:[61,50] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.parser.BsdParser
Do I need to fetch something from additional repositories?
I am using Maven 3.3.9 and Java JDK version: 1.8.0_111, from Oracle Corporation.
EDIT 1
After execute git pull the project built run nicely, as show below:
Results :
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-failsafe-plugin:2.19.1:verify (default) # sdk-tests ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # sdk-tests ---
[INFO] Installing D:\PRODUTECH\Workspace\milo\opc-ua-sdk\sdk-tests\target\sdk-tests-0.2.2-SNAPSHOT.jar to C:\Users\User\.m2\repository\org\eclipse\milo\sdk-tests\0.2.2-SNAPSHOT\sdk-tests-0.2.2-SNAPSHOT.jar
[INFO] Installing D:\PRODUTECH\Workspace\milo\opc-ua-sdk\sdk-tests\pom.xml to C:\Users\User\.m2\repository\org\eclipse\milo\sdk-tests\0.2.2-SNAPSHOT\sdk-tests-0.2.2-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Eclipse Milo Build Tools ........................... SUCCESS [ 1.207 s]
[INFO] Eclipse Milo - OPC-UA (IEC 62541) .................. SUCCESS [ 1.337 s]
[INFO] opc-ua-stack ....................................... SUCCESS [ 1.146 s]
[INFO] stack-core ......................................... SUCCESS [ 19.878 s]
[INFO] stack-client ....................................... SUCCESS [ 1.471 s]
[INFO] opc-ua-sdk ......................................... SUCCESS [ 1.037 s]
[INFO] sdk-core ........................................... SUCCESS [ 2.381 s]
[INFO] bsd-parser ......................................... SUCCESS [ 0.227 s]
[INFO] bsd-parser-core .................................... SUCCESS [ 3.927 s]
[INFO] sdk-client ......................................... SUCCESS [ 8.032 s]
[INFO] stack-server ....................................... SUCCESS [ 1.538 s]
[INFO] sdk-server ......................................... SUCCESS [ 13.693 s]
[INFO] milo-examples ...................................... SUCCESS [ 0.203 s]
[INFO] server-examples .................................... SUCCESS [ 3.474 s]
[INFO] client-examples .................................... SUCCESS [ 1.059 s]
[INFO] standalone-examples ................................ SUCCESS [ 0.756 s]
[INFO] bsd-parser-gson .................................... SUCCESS [ 2.253 s]
[INFO] stack-examples ..................................... SUCCESS [ 1.168 s]
[INFO] stack-tests ........................................ SUCCESS [01:40 min]
[INFO] sdk-tests .......................................... SUCCESS [ 20.385 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:06 min
[INFO] Finished at: 2018-03-20T15:03:53+00:00
[INFO] Final Memory: 88M/2061M
[INFO] ------------------------------------------------------------------------
However, when I try to build the standalone examples, running mvn package -P standalone from the project root, the previous error shows up again, as shown below:
[INFO] 45 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Eclipse Milo Build Tools ........................... SUCCESS [ 1.034 s]
[INFO] Eclipse Milo - OPC-UA (IEC 62541) .................. SUCCESS [ 1.414 s]
[INFO] opc-ua-stack ....................................... SUCCESS [ 0.948 s]
[INFO] stack-core ......................................... SUCCESS [ 14.015 s]
[INFO] stack-client ....................................... SUCCESS [ 0.972 s]
[INFO] opc-ua-sdk ......................................... SUCCESS [ 0.935 s]
[INFO] sdk-core ........................................... SUCCESS [ 1.679 s]
[INFO] bsd-parser ......................................... SUCCESS [ 0.187 s]
[INFO] bsd-parser-core .................................... FAILURE [ 1.222 s]
[INFO] sdk-client ......................................... SKIPPED
[INFO] stack-server ....................................... SKIPPED
[INFO] sdk-server ......................................... SKIPPED
[INFO] milo-examples ...................................... SKIPPED
[INFO] server-examples .................................... SKIPPED
[INFO] client-examples .................................... SKIPPED
[INFO] standalone-examples ................................ SKIPPED
[INFO] bsd-parser-gson .................................... SKIPPED
[INFO] stack-examples ..................................... SKIPPED
[INFO] stack-tests ........................................ SKIPPED
[INFO] sdk-tests .......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.650 s
[INFO] Finished at: 2018-03-20T15:06:43+00:00
[INFO] Final Memory: 44M/1294M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (java-compile) on project bsd-parser-core: Compilation failure: Compilation failure:
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[50,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[51,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[52,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[169,19] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[171,29] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[352,29] cannot find symbol
[ERROR] symbol: class FieldType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[374,36] cannot find symbol
[ERROR] symbol: class FieldType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[398,68] cannot find symbol
[ERROR] symbol: class SwitchOperand
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/AbstractCodec.java:[419,42] cannot find symbol
[ERROR] symbol: class FieldType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.AbstractCodec<StructureT,MemberT>
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericStructCodec.java:[23,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericStructCodec.java:[27,31] cannot find symbol
[ERROR] symbol: class StructuredType
[ERROR] location: class org.eclipse.milo.opcua.binaryschema.GenericStructCodec
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericEnumCodec.java:[21,44] package org.opcfoundation.opcua.binaryschema does not exist
[ERROR] /D:/PRODUTECH/Workspace/milo/opc-ua-stack/bsd-parser/bsd-parser-core/src/main/java/org/eclipse/milo/opcua/binaryschema/GenericEnumCodec.java:[25,19] cannot find symbol
...
The org.opcfoundation.* sources are generated during the 'generate-sources' phase and placed in ../target/generated-sources. In Eclipse, you have to add this folder to the build-path.
Open the properties dialog for bsd-parser-core, open the build path folder and add the source folder.
Have you fetched/updated recently? There were some issues with version numbers that broke the build recently: https://github.com/eclipse/milo/issues/230
They have been fixed on HEAD

How to resolve missing class org.slf4j.helpers.MarkerIgnoringBase when building Kuali Student

When building Kuali Student from https://github.com/kuali-student/ks-development using the command mvn -skipTests=true -Dmaven.failsafe.skip=true clean install I recieve the following error:
[INFO] Reactor Summary:
[INFO]
[INFO] KS DB .............................................. SUCCESS [ 7.816 s]
[INFO] KS DB Validation ................................... SUCCESS [ 0.573 s]
[INFO] KS Impex ........................................... SUCCESS [ 0.080 s]
[INFO] KS LUM Rice ........................................ SUCCESS [ 6.436 s]
[INFO] KS LUM UI Common ................................... SUCCESS [ 1.885 s]
[INFO] KS LUM Program ..................................... SUCCESS [ 1.785 s]
[INFO] KS LUM UI .......................................... SUCCESS [ 2.505 s]
[INFO] KS Enroll UI ....................................... FAILURE [ 0.502 s]
[INFO] KS CM KRAD ......................................... SKIPPED
[INFO] KS Security ........................................ SKIPPED
[INFO] KS Standard Security ............................... SKIPPED
[INFO] KS Security Token Service .......................... SKIPPED
[INFO] KS Common Kitchen Sink ............................. SKIPPED
[INFO] KS Common Web ...................................... SKIPPED
[INFO] KS Curriculum Management Deployment Resources ...... SKIPPED
[INFO] KS Enroll Deployment Resources ..................... SKIPPED
[INFO] KS Enroll Rice ..................................... SKIPPED
[INFO] KS Web ............................................. SKIPPED
[INFO] KS with Rice Bundled ............................... SKIPPED
[INFO] KS with Rice Embedded .............................. SKIPPED
[INFO] KS Rice Standalone ................................. SKIPPED
[INFO] KS Metro ........................................... SKIPPED
[INFO] KS Eclipselink Pom ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.640 s
[INFO] Finished at: 2015-11-04T08:15:37-10:00
[INFO] Final Memory: 148M/850M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.16:install-node-and-npm (install node and npm) on project ks-enroll-ui: Execution install node and npm of goal com.github.eirslett:frontend-maven-plugin:0.0.16:install-node-and-npm failed: A required class was missing while executing com.github.eirslett:frontend-maven-plugin:0.0.16:install-node-and-npm: org/slf4j/helpers/MarkerIgnoringBase
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.github.eirslett:frontend-maven-plugin:0.0.16
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/j/m2/ks-development/com/github/eirslett/frontend-maven-plugin/0.0.16/frontend-maven-plugin-0.0.16.jar
[ERROR] urls[1] = file:/j/m2/ks-development/com/github/eirslett/frontend-plugin-core/0.0.16/frontend-plugin-core-0.0.16.jar
[ERROR] urls[2] = file:/j/m2/ks-development/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar
[ERROR] urls[3] = file:/j/m2/ks-development/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar
[ERROR] urls[4] = file:/j/m2/ks-development/org/apache/commons/commons-compress/1.5/commons-compress-1.5.jar
[ERROR] urls[5] = file:/j/m2/ks-development/org/tukaani/xz/1.2/xz-1.2.jar
[ERROR] urls[6] = file:/j/m2/ks-development/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar
[ERROR] urls[7] = file:/j/m2/ks-development/org/apache/httpcomponents/httpclient/4.3.1/httpclient-4.3.1.jar
[ERROR] urls[8] = file:/j/m2/ks-development/org/apache/httpcomponents/httpcore/4.3/httpcore-4.3.jar
[ERROR] urls[9] = file:/j/m2/ks-development/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
[ERROR] urls[10] = file:/j/m2/ks-development/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
[ERROR] urls[11] = file:/j/m2/ks-development/org/codehaus/plexus/plexus-utils/3.0.10/plexus-utils-3.0.10.jar
[ERROR] urls[12] = file:/j/m2/ks-development/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[13] = file:/j/m2/ks-development/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
[ERROR] urls[14] = file:/j/m2/ks-development/com/google/guava/guava/10.0.1/guava-10.0.1.jar
[ERROR] urls[15] = file:/j/m2/ks-development/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
[ERROR] urls[16] = file:/j/m2/ks-development/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
[ERROR] urls[17] = file:/j/m2/ks-development/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[18] = file:/j/m2/ks-development/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M2a/org.eclipse.sisu.inject-0.0.0.M2a.jar
[ERROR] urls[19] = file:/j/m2/ks-development/asm/asm/3.3.1/asm-3.3.1.jar
[ERROR] urls[20] = file:/j/m2/ks-development/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[21] = file:/j/m2/ks-development/org/apache/maven/plugin-tools/maven-plugin-annotations/3.2/maven-plugin-annotations-3.2.jar
[ERROR] urls[22] = file:/j/m2/ks-development/com/googlecode/slf4j-maven-plugin-log/slf4j-maven-plugin-log/1.0.0/slf4j-maven-plugin-log-1.0.0.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>org.kuali.student:student:2.1.1-FR2-M1-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------: org.slf4j.helpers.MarkerIgnoringBase
...
Appears to be related to https://issues.apache.org/jira/browse/MNG-5787 which has been fixed for Maven 3.3.8 (not yet released at the time of this writting). One of the comments suggests using Maven 3.2.5 as a work around which resolved this error for me.

How do I configure maven to print JUnit assertion failure message to console

I'm using the surefire maven plugin to run unit tests. My test class looks like this:
public class Test1 {
#org.junit.Test
public void testThatFails(){
Assert.assertTrue("false is never true", false);
}
}
When a test fails I expect to see the message "false is never true" that was associated with the AssertionError, but it's not printed to the console. Instead I'm instructed to dig around in the surefire report directory and find it (which sucks).
Running com.example.Test1
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.799 sec <<< FAILURE!
Running com.example.Test2
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running com.example.Test3
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.122 sec
Results :
Failed tests:
testThatFails(com.example.Test1)
Tests run: 12, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
Please refer to /<path-to-pom.xml>/target/surefire-reports for the individual test results.
After browsing to above directory I find the .txt file which contains the error message from my JUnit test, including the stack trace. I would like to see that same message and stack trace printed to the console during build (if it also gets added to a report file that would be great). Any ideas?
There is a surefire configuration which will specify whether to write the test reports to a file or to the console: useFile. This defaults to true.
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#useFile
With Maven, you can configure it to be false by including the following section in your pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<configuration>
<useFile>false</useFile>
</configuration>
</plugin>
</plugins>
</build>
This will generate output like:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.example.MyTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.055 sec <<< FA
ILURE!
foo(com.example.MyTest) Time elapsed: 0.017 sec <<< FAILURE!
java.lang.AssertionError: false is never true
at org.junit.Assert.fail(Assert.java:91)
at org.junit.Assert.assertTrue(Assert.java:43)
at com.example.MyTest.foo(MyTest.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framework
Method.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCal
lable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMe
thod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMet
hod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4Cla
ssRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun
ner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRun
ner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4
Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider
.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(
ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke
(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(Suref
ireStarter.java:172)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWh
enForked(SurefireStarter.java:104)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
70)
Results :
Failed tests: foo(com.example.MyTest): false is never true
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.675s
[INFO] Finished at: Wed Aug 10 13:15:46 CST 2011
[INFO] Final Memory: 7M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
9:test (default-test) on project test-output: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Code\experiments\test-output\target\surefire-reports
for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
NOTE:
Using this configuration setting may break the reporting mechanisms of CI servers which show test failures. CI servers like TeamCity and Jenkins use the surefire-reports.txt files to show detailed test failure information and it looks like this setting makes these reports not get generated. Unfortunately, I couldn't find a way to make the report show in both console and get written to a file.

Resources