Set up on Mac OS X - play framework2 - macos

I'm tried to set up playframe work on OSX and bumped into some troubles.
Download Typesafe Activator and set up as this procedure. https://www.playframework.com/documentation/2.4.x/
"activator new test" -> "cd test" -> "activator run"
Access localhost:9000 with Safari to get a message Failed to open page
Some error messages are there as below.
Is there any idea to solve the problem?
% activator run +[master]
[info] Loading project definition from /Users/w256/Library/Mobile Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/project
[info] Updating {file:/Users/w256/Library/Mobile%20Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/project/}scala-getting-started-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to play-getting-started (in build file:/Users/w256/Library/Mobile%20Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/)
[info] Updating {file:/Users/w256/Library/Mobile%20Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/}root...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * io.netty:netty:3.10.1.Final -> 3.10.4.Final
[warn] Run 'evicted' to see detailed eviction warnings
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
[error] p.c.s.n.PlayDefaultUpstreamHandler - Exception caught in Netty
java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:320) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:90) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na]
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:455) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.5.7.Final.jar:na]
[error] p.c.s.n.PlayDefaultUpstreamHandler - Exception caught in Netty
java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:320) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:90) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na]
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:455) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.5.7.Final.jar:na]
[error] p.c.s.n.PlayDefaultUpstreamHandler - Exception caught in Netty
java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:320) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:90) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na]
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:455) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.5.7.Final.jar:na]
"activator ui" makes similar errors as below.
% activator ui +[master]
Found previous process id: 9525
Local repository: activator-launcher-local # file:/usr/local/Cellar/typesafe-activator/1.3.6/libexec/repository
Local repository: activator-local # file:/Users/w256/Downloads/activator-dist-1.3.7/repository
Play server process ID is 12608
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /127.0.0.1:8888
[error] p.nettyException - Exception caught in Netty
java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:366) ~[play_2.11-2.3.9.jar:2.3.9]
at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:87) ~[play_2.11-2.3.9.jar:2.3.9]
at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining-1.1.2.jar:na]
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
build.sbt is here.
name := """play-getting-started"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
jdbc,
cache,
"org.postgresql" % "postgresql" % "9.4-1201-jdbc41",
"org.jscience" % "jscience" % "4.3.1",
ws,
"com.typesafe.play" % "play-netty-server_2.11" % "2.4.3" force(),
"io.netty" % "netty" % "3.10.4.Final" force(),
"com.typesafe.netty" % "netty-http-pipelining" % "1.1.4" force()
)
libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ )

Related

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.

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

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

Ebean and H2 configuration issue with Play framework 2.5

I am trying to develop with Play Framework version 2.5, and I cannot get the database connection right. I am using H2 database with Ebean plugin 3.0.2 as an ORM. I tried several options for the entries in application.conf, based on the information found on Play Framework website and many of your posts. Please find below the entries to my configuration files and the error trace and help me :
**Application.conf**
play.db {
# The combination of these two settings results in "db.default" as the
#default JDBC pool:
config = "db"
default = "default"
prototype {
# Sets a fixed JDBC connection pool size of 50
#hikaricp.minimumIdle = 50
#hikaricp.maximumPoolSize = 50
}
}
db {
default.hikaricp.dataSourceClassName = org.h2.jdbcx.JdbcDataSource
default.driver = org.h2.Driver
default.url = "jdbc:h2:mem:play"
default.username = sa
default.password = ""
ebean.default = ["models.*"]
#play.ebean.default.dataSource = default
default.logSql=true
}
**Plugins.sbt**
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.10")
// Web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.8")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0")
addSbtPlugin("org.irundaia.sbt" % "sbt-sassify" % "1.4.6")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")
enablePlugins(PlayEbean).
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.2")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" %
"5.0.1")
**Build.sbt**
name := """Institut"""
version := "1.0-SNAPSHOT"
lazy val Institut = (project in
file(".")).enablePlugins(PlayJava,PlayEbean)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
javaJdbc,
cache,
javaWs,
evolutions
)
**Console output**
[info] application - Creating Pool for datasource 'ebean'
[error] c.z.h.HikariConfig - HikariPool-1 - dataSource or
dataSourceClassName
or jdbcUrl is required.
[info] application - Creating Pool for datasource 'ebean'
[error] c.z.h.HikariConfig - HikariPool-2 - dataSource or
dataSourceClassName
or jdbcUrl is required.
[info] application - Creating Pool for datasource 'ebean'
[error] c.z.h.HikariConfig - HikariPool-3 - dataSource or
dataSourceClassName
or jdbcUrl is required.
[info] application - Creating Pool for datasource 'ebean'
[error] c.z.h.HikariConfig - HikariPool-4 - dataSource or
dataSourceClassName
or jdbcUrl is required.
[error] application -
! #736eodoo7 - Internal server error, for (GET) [/] ->
play.api.Configuration$$anon$1: Configuration error[Cannot connect to
database [ebean]]
at play.api.Configuration$.configError(Configuration.scala:154)
at play.api.Configuration.reportError(Configuration.scala:806)
at
play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
at playi.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
at scala.collection.immutable.List.foreach(List.scala:381)
at play.api.db.DefaultDBApi.connect(DefaultDBApi.scala:42)
at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:72)
at play.api.db.DBApiProvider.get(DBModule.scala:62)
at play.api.db.DBApiProvider.get(DBModule.scala:58)
at
Caused by: play.api.Configuration$$anon$1: Configuration
error[dataSource or
dataSourceClassName or jdbcUrl is required.]
at play.api.Configuration$.configError(Configuration.scala:154)
at play.api.PlayConfig.reportError(Configuration.scala:996)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:70)
at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
at
play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:123)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:121)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:142)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:138)
at
play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
at
play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
Caused by: java.lang.IllegalArgumentException: dataSource or
dataSourceClassName or jdbcUrl is required.
at com.zaxxer.hikari.HikariConfig.validate(HikariConfig.java:786)
at play.api.db.HikariCPConfig.toHikariConfig(HikariCPModule.scala:141)
at
at scala.util.Try$.apply(Try.scala:192)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:54)
at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
at
play.api.db.DefaultDatabase.dataSource$lazycompute(Databases.scala:123)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:121)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:142)
I had the same error message with H2 configuration , which was resolved be adding the dataSourceClassName, however I have tried to use default as datasource for Ebean without success.
Thank you !
ebean.default = ["models.*"] is not a member of the key db.default you have to place it outside of db.
According to your log ebean thinks that this key is another database
play.api.Configuration$$anon$1: Configuration error[Cannot connect to
database [ebean]]
More info here:
https://www.playframework.com/documentation/2.5.x/JavaDatabase#H2-database-engine-connection-properties

Play 2.3.3 heroku deployment error

i'm trying to deploy a play! framework 2.3.3 application to heroku this is the response from deployment window
Initializing repository, done.
Counting objects: 814, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (786/786), done.
Writing objects: 100% (814/814), 5.80 MiB | 10.00 KiB/s, done.
Total 814 (delta 316), reused 0 (delta 0)
-----> Play 2.x - Java app detected
-----> Installing OpenJDK 1.8...done
-----> Downloading SBT...done
-----> Priming Ivy cache (Scala-2.11, Play-2.3)... done
-----> Running: sbt update
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; suppo
rt was removed in 8.0
[info] Loading project definition from /tmp/scala_buildpack_build_dir/pro
ject
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:3: object Proj
ect is not a member of package play
[error] import play.Project._
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:14: not found:
value filters
[error] filters,
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:20: not found:
value javaCore
[error] javaCore,
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:21: not found:
value javaJdbc
[error] javaJdbc,
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:22: not found:
value javaEbean
[error] javaEbean,
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:23: not found:
value cache
[error] cache
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:28: object Pro
ject is not a member of package play
[error] val main = play.Project(appName, appVersion, appDependencies)
.settings(
[error] ^
[error] 7 errors found
[error] (compile:compile) Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? ! Fail
ed to run sbt task: update
! Push rejected, failed to compile Play 2.x - Java app
To git#heroku.com:obscure-scrubland-1026.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:obscure-scrubland-1026.git'
this is a what build.sbt looks like
import play.PlayJava
name := "schoolapp"
scalaVersion := "2.11.1"
version := "1.0-SNAPSHOT"
val appDependencies = Seq(
"be.objectify" %% "deadbolt-java" % "2.3.0-RC1",
// Comment the next line for local development of the Play Authentication core:
"com.feth" %% "play-authenticate" % "0.6.5-SNAPSHOT",
"postgresql" % "postgresql" % "9.1-901-1.jdbc4",
javaCore,
cache,
javaWs,
javaJdbc,
javaEbean
)
resolvers ++= Seq(
"Apache" at "http://repo1.maven.org/maven2/",
"jBCrypt Repository" at "http://repo1.maven.org/maven2/org/",
"play-easymail (release)" at "http://joscha.github.io/play-easymail/repo/releases/",
"play-easymail (snapshot)" at "http://joscha.github.io/play-easymail/repo/snapshots/",
Resolver.url("Objectify Play Repository", url("http://schaloner.github.io/releases/"))(Resolver.ivyStylePatterns),
"play-authenticate (release)" at "http://joscha.github.io/play-authenticate/repo/releases/",
"play-authenticate (snapshot)" at "http://joscha.github.io/play-authenticate/repo/snapshots/"
)
// Uncomment the next line for local development of the Play Authenticate core:
//lazy val playAuthenticate = project.in(file("modules/play-authenticate")).enablePlugins(PlayJava)
lazy val root = project.in(file("."))
.enablePlugins(PlayJava)
.settings(
libraryDependencies ++= appDependencies
)
// Uncomment the next lines for local development of the Play Authenticate core:
//.dependsOn(playAuthenticate)
//.aggregate(playAuthenticate)
i'm using the play authenticate module. what could be the problem?
Try to remove import play.Project._ and add import play.PlayImport._ in your project/Build.scala file.

gDebugger not working

I downloaded the last version of gDebugger (currently 5.8.1). But I can't make it works. I try to run the provided examples, but nothing happen.
I try to load the teapot example, but when I run it (F5), I just see a command line prompt which disappear immediately. (I also try to make the same actions as "Timothy Smith" described in http://devgurus.amd.com/thread/158943 in its first post, but the result was the same)
I'm on Win7 64 bits, with a GTX 470.
Edit: This is the error I get in the log:
[20:10:36] [2495245290] [ERROR] [4448] [gaAPIToSpyConnector::initialize] [src\gaAPIToSpyConnector.cpp] [217] [Assertion failure (rcAPISocket)]
## [20:10:36] [2495245327] [ERROR] [4448] [gaLaunchDebuggedProcess] [src\gaGRApiFunctions.cpp] [388] [Assertion failure (rcAPIConnection)]
## [20:10:36] [2495821910] [ERROR] [4448] [osPipeSocket::close] [src\win32\osPipeSocket.cpp] [124] [Cannot close pipe (pipe type: osPipeSocketServer)]
## [20:10:36] [2495822046] [ERROR] [4448] [osPipeSocket::close] [src\win32\osPipeSocket.cpp] [137] [Cannot close pipe (pipe type: osPipeSocketServer)]
## [20:10:36] [2495822236] [ERROR] [4448] [osPipeSocketServer::open] [src\win32\osPipeSocketServer.cpp] [76] [Assertion failure (_incomingPipe != ((HANDLE)(LONG_PTR)-1))]
## [20:10:36] [2495822377] [ERROR] [4448] [osPipeSocketServer::open] [src\win32\osPipeSocketServer.cpp] [97] [Assertion failure (_outgoingPipe != ((HANDLE)(LONG_PTR)-1))]
## [20:10:36] [2495822453] [ERROR] [4448] [gaAPIToSpyConnector::initialize] [src\gaAPIToSpyConnector.cpp] [217] [Assertion failure (rcAPISocket)]
## [20:10:36] [2495822520] [ERROR] [4448] [gaLaunchDebuggedProcess] [src\gaGRApiFunctions.cpp] [388] [Assertion failure (rcAPIConnection)]
gDebugger is now an AMD product and all the new versions are available on their developer site. Current version is 6.2.
Edit:
The tool is now called CodeXL and available here

Resources