Salesforce test suit failing in azure devops release pipeline - azure-devops

My azure release pipeline is working fine when I run individual salesforce test suit image 1 attached. But when I combine multiple salesforce test suit into under "variables" section in azure release pipeline, it getting failed image 2 attached
Logs image attached for the reference [Note - XXX is mentioned to hide the sensitive items) image 3 attached. Version are mentioned clearly in pom.xml so no issue there. Any help on this highly appreciable.
Log added here as requested by Dan in comments section.
2021-09-22T12:46:11.7887285Z Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
2021-09-22T12:46:11.7887560Z
2021-09-22T12:46:11.8032623Z [INFO] ------------------------------------------------------------------------
2021-09-22T12:46:11.8033084Z [INFO] Reactor Summary:
2021-09-22T12:46:11.8033498Z [INFO]
2021-09-22T12:46:11.8033912Z [INFO] xxxx.salesforce.regression 1.0 ..................... SUCCESS [ 1.050 s]
2021-09-22T12:46:11.8041862Z [INFO] xxxx.regression.core 0.0.1-SNAPSHOT ................ SUCCESS [ 1.425 s]
2021-09-22T12:46:11.8047350Z [INFO] xxxx.salesforce.regression.api 0.0.1-SNAPSHOT ...... SUCCESS [ 6.110 s]
2021-09-22T12:46:11.8049728Z [INFO] xxxx.salesforce.regression.framework 0.0.1-SNAPSHOT SUCCESS [ 17.345 s]
2021-09-22T12:46:11.8055798Z [INFO] xxxx.salesforce.regression.script 0.0.1-SNAPSHOT ... FAILURE [01:17 min]
2021-09-22T12:46:11.8060546Z [INFO] ------------------------------------------------------------------------
2021-09-22T12:46:11.8061249Z [INFO] BUILD FAILURE
2021-09-22T12:46:11.8068152Z [INFO] ------------------------------------------------------------------------
2021-09-22T12:46:11.8072043Z [INFO] Total time: 01:43 min
2021-09-22T12:46:11.8077042Z [INFO] Finished at: 2021-09-22T08:46:11-04:00
2021-09-22T12:46:11.8079514Z [INFO] ------------------------------------------------------------------------
2021-09-22T12:46:11.8121567Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project xxxx.salesforce.regression.script:
Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
2021-09-22T12:46:11.8123247Z [ERROR] java.lang.RuntimeException: Unable to load category: RegressionBrokerCommunityCensusScripts
2021-09-22T12:46:11.8132417Z [ERROR] at org.apache.maven.surefire.group.match.SingleGroupMatcher.loadGroupClasses(SingleGroupMatcher.java:139)
2021-09-22T12:46:11.8135200Z [ERROR] at org.apache.maven.surefire.group.match.JoinGroupMatcher.loadGroupClasses(JoinGroupMatcher.java:49)
2021-09-22T12:46:11.8139427Z [ERROR] at org.apache.maven.surefire.common.junit48.FilterFactory.createGroupFilter(FilterFactory.java:100)
2021-09-22T12:46:11.8144812Z [ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.createJUnit48Filter(JUnitCoreProvider.java:279)
2021-09-22T12:46:11.8169178Z [ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:130)
2021-09-22T12:46:11.8170407Z [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
2021-09-22T12:46:11.8171319Z [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
2021-09-22T12:46:11.8171999Z [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
2021-09-22T12:46:11.8176714Z [ERROR] Caused by: java.lang.ClassNotFoundException: RegressionBrokerCommunityCensusScripts
2021-09-22T12:46:11.8177403Z [ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
2021-09-22T12:46:11.8191357Z [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
2021-09-22T12:46:11.8191846Z [ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
2021-09-22T12:46:11.8210436Z [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
2021-09-22T12:46:11.8212191Z [ERROR] at org.apache.maven.surefire.group.match.SingleGroupMatcher.loadGroupClasses(SingleGroupMatcher.java:135)
2021-09-22T12:46:11.8212992Z [ERROR] ... 7 more
2021-09-22T12:46:11.8213257Z [ERROR]
2021-09-22T12:46:11.8213629Z [ERROR] -> [Help 1]
2021-09-22T12:46:11.8214006Z [ERROR]
2021-09-22T12:46:11.8214686Z [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
2021-09-22T12:46:11.8215594Z [ERROR] Re-run Maven using the -X switch to enable full debug logging.
2021-09-22T12:46:11.8216175Z [ERROR]
2021-09-22T12:46:11.8218205Z [ERROR] For more information about the errors and possible solutions, please read the following articles:
2021-09-22T12:46:11.8219550Z [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
2021-09-22T12:46:11.8220244Z [ERROR]
2021-09-22T12:46:11.8221416Z [ERROR] After correcting the problems, you can resume the build with the command
2021-09-22T12:46:11.8224889Z [ERROR] mvn <args> -rf :xxxx.salesforce.regression.script
2021-09-22T12:46:12.1235561Z The process 'D:\Tools\apache-maven-3.6.3\bin\mvn.cmd' failed with exit code 1
2021-09-22T12:46:12.1239927Z Could not retrieve code analysis results - Maven run failed.
2021-09-22T12:46:13.8305598Z No test result files matching D:\agents\A5\_wk\r4\a\**\surefire-reports\TEST-*.xml were found, so publishing JUnit test results is being skipped.
2021-09-22T12:46:13.8351432Z ##[error]Build failed.

Related

How to extract a standalone FPU module from Rocket-Chip Chisel code?

I am working on Rocket Chip Generator, which is a SoC written in Chisel.
My objective is to extract the Floating-Point Unit, in order to synthesize it and study its power consumption/area ...etc. separately from the rest of the SoC.
So I cloned the project and tried to create a dedicated TestHarness where I only instanciate an FPU. This is an example code of what I did (very similar to TestHarness
package freechips.rocketchip.system
import Chisel._
import freechips.rocketchip.config.Parameters
import freechips.rocketchip.devices.debug.Debug
import freechips.rocketchip.diplomacy.LazyModule
import freechips.rocketchip.rocket._
// importing FPU class
import freechips.rocketchip.tile._
class FPUTestHarness() (implicit p: Parameters) extends Module {
val io = new Bundle {
val dummyIn = Bool(INPUT)
val dummyOut = Bool(OUTPUT)
}
// The parameters of the FPU
val fpu_params = FPUParams(
fLen = 32 // default is 64
divSqrt = false // default is true
// sfmaLatency = 3, // default
// dfmaLatency = 4 // default
)
val fpu = Module(new FPU(fpu_params)(p))
}
The problem is that the implicit parameter p (of type Parameters) doesn't contain something called TileKey, which is needed I don't know where. Apparently the implicit parameter p, passed to FPUTestHarness doesn't contain that information. How can I resolve that? Is it possible to hardcode that somewhere for example?
rocket-chip-new/vsim$ make verilog
mkdir -p /home/mylab/rocket-chip/vsim/generated-src/
cd /home/mylab/rocket-chip && java -Xmx2G -Xss8M -XX:MaxPermSize=256M -jar /home/mylab/rocket-chip/sbt-launch.jar "runMain freechips.rocketchip.system.Generator /home/mylab/rocket-chip/vsim/generated-src freechips.rocketchip.system FPUTestHarness freechips.rocketchip.system DefaultConfig"
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
[info] Loading settings for project rocket-chip-new-build from plugins.sbt ...
[info] Loading project definition from /home/mylab/rocket-chip/project
[info] Loading settings for project rocketchip from build.sbt ...
[info] Loading settings for project hardfloat from build.sbt ...
[info] Loading settings for project chisel from build.sbt ...
Using addons:
[info] Set current project to rocketchip (in build file:/home/mylab/rocket-chip/)
[info] Compiling 1 Scala source to /home/mylab/rocket-chip/target/scala-2.12/classes ...
[warn] there were two feature warnings; re-run with -feature for details
[warn] one warning found
[info] Done compiling.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/home/aitsaidn/.sbt/boot/scala-2.12.7/org.scala-sbt/sbt/1.2.7/protobuf-java-3.3.1.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[warn] Multiple main classes detected. Run 'show discoveredMainClasses' to see the list
[info] Packaging /home/mylab/rocket-chip/target/scala-2.12/rocketchip_2.12-1.2-SNAPSHOT.jar ...
[info] Done packaging.
[info] Running freechips.rocketchip.system.Generator /home/mylab/rocket-chip/vsim/generated-src freechips.rocketchip.system FPUTestHarness freechips.rocketchip.system DefaultConfig
[info] [0.003] Elaborating design...
List(RocketTileParams(RocketCoreParams(0,true,false,true,true,false,true,false,0,1,false,8,0,true,false,true,0,Some(0),true,true,false,false,false,0,538447876,Some(MulDivParams(8,1,true,true,1)),Some(FPUParams(64,true,3,4))),Some(ICacheParams(64,4,64,32,0,None,None,None,false,64,2,4)),Some(DCacheParams(64,4,64,32,None,None,1,0,17,16,1,64,false,false,false,false,None)),Some(BTBParams(28,14,6,6,Some(BHTParams(512,1,8,3)),false)),0,Some(tile),0,None,None,false))
[error] (run-main-0) java.lang.reflect.InvocationTargetException
[error] java.lang.reflect.InvocationTargetException
[error] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[error] at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[error] at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
[error] at freechips.rocketchip.util.HasGeneratorUtilities.$anonfun$elaborate$1(GeneratorUtils.scala:54)
[error] at chisel3.core.Module$.do_apply(Module.scala:52)
[error] at chisel3.Driver$.$anonfun$elaborate$1(Driver.scala:95)
[error] at chisel3.internal.Builder$.$anonfun$build$2(Builder.scala:343)
[error] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
[error] at chisel3.internal.Builder$.$anonfun$build$1(Builder.scala:341)
[error] at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
[error] at chisel3.internal.Builder$.build(Builder.scala:341)
[error] at chisel3.Driver$.elaborate(Driver.scala:95)
[error] at freechips.rocketchip.util.HasGeneratorUtilities.elaborate(GeneratorUtils.scala:59)
[error] Caused by: java.lang.IllegalArgumentException: requirement failed: Key TileKey is not defined in Parameters
[error] at scala.Predef$.require(Predef.scala:277)
[error] at freechips.rocketchip.config.View.apply(Config.scala:15)
[error] at freechips.rocketchip.config.View.apply(Config.scala:12)
[error] at freechips.rocketchip.tile.HasNonDiplomaticTileParameters.tileParams(BaseTile.scala:37)
[error] at freechips.rocketchip.tile.HasNonDiplomaticTileParameters.tileParams$(BaseTile.scala:37)
[error] at freechips.rocketchip.tile.CoreModule.tileParams(Core.scala:90)
[error] at freechips.rocketchip.tile.HasCoreParameters.$init$(Core.scala:51)
[error] at freechips.rocketchip.tile.CoreModule.<init>(Core.scala:90)
[error] at freechips.rocketchip.tile.FPUModule.<init>(FPU.scala:378)
[error] at freechips.rocketchip.tile.FPU.<init>(FPU.scala:661)
[error] at freechips.rocketchip.system.FPUTestHarness.$anonfun$fpu$1(FPUTestHarness.scala:71)
[error] at chisel3.core.Module$.do_apply(Module.scala:52)
[error] at freechips.rocketchip.system.FPUTestHarness.<init>(FPUTestHarness.scala:71)
[error] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error] Nonzero exit code: 1
[error] (Compile / runMain) Nonzero exit code: 1
[error] Total time: 6 s, completed Jul 25, 2019, 7:59:01 PM
/home/mylab/rocket-chip/vsim/Makefrag-verilog:12: recipe for target '/home/mylab/rocket-chip/vsim/generated-src/freechips.rocketchip.system.DefaultConfig.fir' failed
make: *** [/home/mylab/rocket-chip/vsim/generated-src/freechips.rocketchip.system.DefaultConfig.fir] Error 1
It seems that you use the config as "DefaultConfig". Error log states that you did not specify TileKey parameter in this config. Adding TileKey parameter will resolve the issue. DefaultConfig is defined in rocket-chip/src/main/scala/system/Configs.scala

SBT ScalaTest not showing any error details

I am running test cases after change code in business logic. I run test case, but it failing by simply saying NullPoinerException. But it not showing any detais about the issue. It is that:
> it:testOnly com.company.project.Module.write.AlertModuleSpraySpec -F
[trace] Stack trace suppressed: run last project-Module-read/it:testOnly for the full output.
[error] Could not run test com.company.project.Module.write.AlertModuleSpraySpec: java.lang.NullPointerException
[info] Run completed in 1 second, 973 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[error] Error during tests:
[error] com.company.project.Module.write.AlertModuleSpraySpec
[error] (project-Module-read/it:testOnly) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 2 s, completed 28 Nov, 2016 2:04:45 PM

Serenity BDD Timeout Error

I am running Serenity Jbehave Scripts with example table with 19 rows of values but the script is executing only 7 rows which are present in the example table and giving exception as below when executing the 8th row
The Stack trace from console is :
Example: {workspaceName=admin, menuName=Admin, menuOption=Parameter Maintenance, portletTitle=Parameter Maintenance}
Given login to CMS as colinw and colinw
Then I Navigate to admin Workspace
When I Select Parameter Maintenance Option from Admin Menu
Then I Verify Portlet Parameter Maintenance is Displayed
Then I Close the Portlet Parameter Maintenance
Then logout from CMS
Example: {workspaceName=admin, menuName=Admin, menuOption=Product Maintenance, portletTitle=Product Type}
Story stories/smoke/ShakeDownScript.story duration of 301 seconds has exceeded timeout of 300 seconds
(AfterStories)
[pool-2-thread-1] INFO net.thucydides.core.webdriver.SystemPropertiesConfiguration - project.build.directory : null
[pool-2-thread-1] INFO net.thucydides.core.webdriver.SystemPropertiesConfiguration - project.reporting.OutputDirectory : null
[pool-2-thread-1] INFO net.thucydides.core.webdriver.SystemPropertiesConfiguration - OutputDirectory : C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
Given login to CMS as colinw and colinw
Then I Navigate to admin Workspace
Generating reports view to 'C:\WCG Automation\CMS\CMS_Automation\target\jbehave' using formats '[stats, console, html, xml, serenityreporter, junitscenarioreporter]' and view properties '{decorateNonHtml=true}'
Reports view generated with 0 stories (of which 0 pending) containing 0 scenarios (of which 0 pending)
Tests run: 47, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 313.246 sec <<< FAILURE! - in wcg.cms.CMSTestSuite
wcg.cms.CMSTestSuite Time elapsed: 3.651 sec <<< ERROR!
java.lang.RuntimeException:org.jbehave.core.embedder.Embedder$RunningStoriesFailed: Failures in running stories:
stories/smoke/ShakeDownScript.story: java.util.concurrent.CancellationException
at org.jbehave.core.embedder.Embedder$ThrowingRunningStoriesFailed.handleFailures(Embedder.java:553)
at org.jbehave.core.embedder.Embedder.handleFailures(Embedder.java:238)
at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:216)
at net.serenitybdd.jbehave.embedders.ExtendedEmbedder.runStoriesAsPaths(ExtendedEmbedder.java:60)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.run(SerenityReportingRunner.java:175)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
Results :
Tests in error:
JUnit4Provider.invoke:128->executeTestSet:153->executeWithRerun:173->execute:283 ยป Runtime
Tests run: 47, Failures: 0, Errors: 1, Skipped: 0
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO]
[INFO] --- serenity-maven-plugin:1.1.36:aggregate (serenity-reports) # CMS_Automation ---
[INFO] LOADING LOCAL PROPERTIES FROM C:\WCG Automation\CMS\CMS_Automation\serenity.properties
[INFO] LOADING LOCAL PROPERTIES FROM C:\WCG Automation\CMS\CMS_Automation\serenity.properties
[INFO] LOADING LOCAL PROPERTIES FROM C:\WCG Automation\CMS\CMS_Automation\serenity.properties
[INFO] webdriver.base.url=http://nssrvdfsdev01/calms2cms/
[INFO] serenity.project.name=Automation Testing
[INFO] webdriver.timeouts.implicitlywait=60000
[INFO] project.build.directory : C:\WCG Automation\CMS\CMS_Automation
[INFO] project.reporting.OutputDirectory : null
[INFO] OutputDirectory : C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
[INFO] current_project.base.dir: C:\WCG Automation\CMS\CMS_Automation
Generating HTML Story Reports from C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
Generating HTML Story Reports to C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
[INFO] project.build.directory : C:\WCG Automation\CMS\CMS_Automation
[INFO] project.reporting.OutputDirectory : null
[INFO] OutputDirectory : C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
Merging requirements = [Requirement{name='Smoke', type='feature' parent = 'null', cardNumber='null'}]
Merging requirements = []
Merged requirements set = [Requirement{name='Smoke', type='feature' parent = 'null', cardNumber='null'}]
[INFO] REPORTS GENERATED IN C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
[INFO] REPORT HOME PAGE: C:\WCG Automation\CMS\CMS_Automation\target\site\serenity\index.html
[INFO] Generating release reports for: []
GENERATE CUSTOM REPORTS
[INFO]
[INFO] --- maven-failsafe-plugin:2.18.1:verify (default) # CMS_Automation ---
[INFO] Failsafe report directory: C:\WCG Automation\CMS\CMS_Automation\target\failsafe-reports
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping Sample Serenity project using JBehave and WebDriver
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:25 min
[INFO] Finished at: 2016-08-22T17:26:18+05:30
[INFO] Final Memory: 37M/416M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.18.1:verify (default) on project CMS_Automation: There are test failures.
[ERROR]
[ERROR] Please refer to C:\WCG Automation\CMS\CMS_Automation\target\failsafe-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 switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
it appears that story execution is exceeding the timeout of 300 seconds . is there any way so that we can reset the 300 seconds to 600 seconds in the framework
The solution is quite simple.
I found a related question and answer here.
You can either run the tests with an extra argument like:
mvn clean verify -DstoryTimeoutInSecs=600
Or put a property in the serenity.properties file (which should be in the root of your project if you have it) like this:
story.timeout.in.secs=600

How can I fix evicted libraries and ambiguous reference error in Scala (Akka 2.4.0)?

I have code that uses the new Akka 2.4.0. Apparently I've got some libs that are compiled with earlier versions, so I get the warnings/errors shown.
Most problematic, I get an ambiguous reference problem shown below.
OK, so the compiler is warning me (I think) that it's bumped older Akka versions in favor of 2.4.0, then it's confused about akka.pattern.ask.
What should I do about it?
My output is below:
> test:compile
[info] Compiling 5 Scala sources to /Users/wmy965/git/hello/common/target/scala-2.11/test-classes...
[error] /Users/wmy965/git/hello/common/src/test/scala/common.test.service/FacilitiesTests.scala:16: ambiguous reference to overloaded definition,
[error] both method ask in trait AskSupport of type (actorSelection: akka.actor.ActorSelection, message: Any, sender: akka.actor.ActorRef)(implicit timeout: akka.util.Timeout)scala.concurrent.Future[Any]
[error] and method ask in trait AskSupport of type (actorSelection: akka.actor.ActorSelection, message: Any)(implicit timeout: akka.util.Timeout)scala.concurrent.Future[Any]
[error] match expected type ?
[error] import akka.pattern.ask._
[error] ^
[error] /Users/wmy965/git/hello/common/src/test/scala/common.test.service/FacilitiesTests.scala:43: value ? is not a member of akka.actor.ActorRef
[error] Error occurred in an application involving default arguments.
[error] val result = Misc.await(harness.facilities.mongoControl ? MongoAction({ mongo =>
[error] ^
[error] two errors found
[error] (common/test:compileIncremental) Compilation failed
[error] Total time: 1 s, completed Oct 23, 2015 5:57:17 PM
> evicted
[info] Updating {file:/Users/wmy965/git/hello/}hello...
[info] Updating {file:/Users/wmy965/git/hello/}common...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Resolving org.scala-lang.modules#scala-xml_2.11;1.0.4 ...
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * com.typesafe.akka:akka-actor_2.11:(2.3.12, 2.3.7) -> 2.4.0 (caller: com.cof:common_2.11:reactive2_a6d8f9, com.typesafe.akka:akka-stream-experimental_2.11:1.0, co.blocke:laterabbit_2.11:0.3, com.typesafe.akka:akka-slf4j_2.11:2.4.0, com.thenewmotion.akka:akka-rabbitmq_2.11:1.2.4)
[info] Here are other libraries that were evicted:
[info] * org.slf4j:slf4j-api:(1.7.7, 1.6.0) -> 1.7.12 (caller: com.bionicspirit:shade_2.11:1.7.Z, org.mongodb:casbah-core_2.11:2.8.2, org.mongodb:casbah-gridfs_2.11:2.8.2, org.slf4j:slf4j-simple:1.7.7, com.typesafe.akka:akka-slf4j_2.11:2.4.0, org.mongodb:casbah-commons_2.11:2.8.2, org.mongodb:casbah-query_2.11:2.8.2)
[info] * org.mongodb:casbah_2.11:2.8.0 -> 2.8.2 (caller: com.cof:common_2.11:reactive2_a6d8f9, co.blocke:scalajack_mongo_2.11:4.4.1)
[info] * org.scala-lang:scala-reflect:2.11.0 -> 2.11.7 (caller: co.blocke:scalajack_2.11:4.4.1, org.monifu:monifu-core_2.11:0.7.0)
[info] * org.joda:joda-convert:1.2 -> 1.7 (caller: com.github.nscala-time:nscala-time_2.11:1.0.0, co.blocke:scalajack_2.11:4.4.1)
[info] * org.scala-lang:scala-library:(2.11.0, 2.11.5, 2.11.4) -> 2.11.7 (caller: com.bionicspirit:shade_2.11:1.7.Z, com.github.nscala-time:nscala-time_2.11:1.0.0, com.typesafe.akka:akka-http-experimental_2.11:1.0, com.typesafe.akka:akka-stream-experimental_2.11:1.0, co.blocke:laterabbit_2.11:0.3, org.mongodb:casbah-gridfs_2.11:2.8.2, co.blocke:scalajack_2.11:4.4.1, com.typesafe.akka:akka-slf4j_2.11:2.4.0, org.monifu:monifu-core_2.11:0.7.0, org.mongodb:casbah-core_2.11:2.8.2, com.cof:common_2.11:reactive2_a6d8f9, com.typesafe.akka:akka-http-core-experimental_2.11:1.0, com.typesafe.akka:akka-actor_2.11:2.4.0, org.scala-lang:scala-reflect:2.11.7 (), org.mongodb:casbah_2.11:2.8.2, com.typesafe.akka:akka-parsing-experimental_2.11:1.0, org.mongodb:casbah-commons_2.11:2.8.2, org.mongodb:casbah-query_2.11:2.8.2, co.blocke:scalajack_mongo_2.11:4.4.1, com.thenewmotion.akka:akka-rabbitmq_2.11:1.2.4)
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[success] Total time: 1 s, completed Oct 23, 2015 5:57:30 PM
To avoid ambiguity, you can either add sender() or ActorRef.noSender - depends on the context. Or add a timeout mongoControl.ask(MongoAction({...}))(1.second)

Play framework, 2.x clean project, test fails - MAC OS

I think this should be due to some issues in my enviroment, I can't figure this out so I am posting a question.
I created a new play 2.1.3 project (scala 2.10.2).
When I run play for the first time (no file is edited at this stage) and run the test sbt command, I get the following error.
info] Updating {file:/private/tmp/myapp/}myapp...
[info] Done updating.
[info] Compiling 5 Scala sources and 1 Java source to /private/tmp/myapp/target/scala-2.10/classes...
[info] Compiling 2 Scala sources to /private/tmp/myapp/target/scala-2.10/test-classes...
log4j:WARN No appenders could be found for logger (play).
log4j:WARN Please initialize the log4j system properly.
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:224)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:299)
at java.util.logging.Logger.log(Logger.java:509)
at java.util.logging.Logger.doLog(Logger.java:531)
at java.util.logging.Logger.logp(Logger.java:647)
at org.jboss.netty.logging.JdkLogger.debug(JdkLogger.java:36)
at org.jboss.netty.logging.InternalLoggerFactory$1.debug(InternalLoggerFactory.java:80)
at org.jboss.netty.channel.socket.nio.SelectorUtil.<clinit>(SelectorUtil.java:57)
at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<init>(NioServerSocketChannelFactory.java:115)
at play.core.server.NettyServer.play$core$server$NettyServer$$newBootstrap(NettyServer.scala:40)
at play.core.server.NettyServer.<init>(NettyServer.scala:127)
at play.api.test.TestServer.start(Selenium.scala:124)
at play.api.test.Helpers$.running(Helpers.scala:71)
at test.IntegrationSpec$$anonfun$1$$anonfun$apply$1.apply(IntegrationSpec.scala:17)
at test.IntegrationSpec$$anonfun$1$$anonfun$apply$1.apply(IntegrationSpec.scala:17)
at org.specs2.mutable.SpecificationFeatures$$anon$1$$anonfun$asResult$1.apply(Specification.scala:34)
at org.specs2.mutable.SpecificationFeatures$$anon$1$$anonfun$asResult$1.apply(Specification.scala:34)
at org.specs2.execute.AsResult$$anon$10.asResult(Result.scala:230)
at org.specs2.execute.AsResult$.apply(Result.scala:238)
at org.specs2.specification.Contexts$$anon$4.apply(Contexts.scala:44)
at org.specs2.mutable.SpecificationFeatures$$anon$1.asResult(Specification.scala:34)
at org.specs2.execute.AsResult$.apply(Result.scala:238)
at org.specs2.specification.Example$$anonfun$apply$1.apply(Fragment.scala:141)
at org.specs2.specification.Example$$anonfun$apply$1.apply(Fragment.scala:141)
at org.specs2.specification.Example.execute(Fragment.scala:104)
at org.specs2.specification.FragmentExecution$$anonfun$1.apply(FragmentExecution.scala:52)
at org.specs2.specification.FragmentExecution$$anonfun$1.apply(FragmentExecution.scala:52)
at org.specs2.execute.ResultExecution$class.execute(ResultExecution.scala:22)
at org.specs2.execute.ResultExecution$.execute(ResultExecution.scala:76)
at org.specs2.specification.FragmentExecution$class.executeBody(FragmentExecution.scala:28)
at org.specs2.runner.TestInterfaceConsoleReporter.executeBody(TestInterfaceRunner.scala:125)
at org.specs2.specification.FragmentExecution$class.execute(FragmentExecution.scala:52)
at org.specs2.runner.TestInterfaceConsoleReporter.execute(TestInterfaceRunner.scala:125)
at org.specs2.specification.FragmentExecution$$anonfun$executeFragment$1$$anonfun$apply$1.apply(FragmentExecution.scala:35)
at org.specs2.specification.FragmentExecution$$anonfun$executeFragment$1$$anonfun$apply$1.apply(FragmentExecution.scala:35)
at org.specs2.control.Exceptions$class.catchAllOr(Exceptions.scala:54)
at org.specs2.control.Exceptions$.catchAllOr(Exceptions.scala:109)
at org.specs2.specification.FragmentExecution$$anonfun$executeFragment$1.apply(FragmentExecution.scala:35)
at org.specs2.specification.FragmentExecution$$anonfun$executeFragment$1.apply(FragmentExecution.scala:35)
at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$org$specs2$reporter$DefaultExecutionStrategy$$executeSequence$1.apply(ExecutionStrategy.scala:99)
at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$org$specs2$reporter$DefaultExecutionStrategy$$executeSequence$1.apply(ExecutionStrategy.scala:99)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.List.foreach(List.scala:309)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at org.specs2.reporter.DefaultExecutionStrategy$class.org$specs2$reporter$DefaultExecutionStrategy$$executeSequence(ExecutionStrategy.scala:99)
at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$execute$1$$anonfun$2.apply(ExecutionStrategy.scala:43)
at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$execute$1$$anonfun$2.apply(ExecutionStrategy.scala:41)
at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:144)
at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:144)
at scala.collection.GenTraversableViewLike$Mapped$$anonfun$foreach$2.apply(GenTraversableViewLike.scala:81)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1156)
at scala.collection.IterableViewLike$Transformed$class.foreach(IterableViewLike.scala:42)
at scala.collection.SeqViewLike$AbstractTransformed.foreach(SeqViewLike.scala:43)
at scala.collection.GenTraversableViewLike$Appended$class.foreach(GenTraversableViewLike.scala:99)
at scala.collection.SeqViewLike$$anon$2.foreach(SeqViewLike.scala:77)
at scala.collection.GenTraversableViewLike$Mapped$class.foreach(GenTraversableViewLike.scala:80)
at scala.collection.SeqViewLike$$anon$3.foreach(SeqViewLike.scala:78)
at scala.collection.TraversableOnce$class.foldLeft(TraversableOnce.scala:144)
at scala.collection.SeqViewLike$AbstractTransformed.foldLeft(SeqViewLike.scala:43)
at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$execute$1.apply(ExecutionStrategy.scala:41)
at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$execute$1.apply(ExecutionStrategy.scala:38)
at org.specs2.internal.scalaz.syntax.IdOps$class.$bar$greater(IdOps.scala:15)
at org.specs2.internal.scalaz.syntax.ToIdOps$$anon$1.$bar$greater(IdOps.scala:68)
at org.specs2.reporter.AllExporting$class.report(AllExporting.scala:15)
at org.specs2.runner.TestInterfaceConsoleReporter.report(TestInterfaceRunner.scala:125)
at org.specs2.runner.TestInterfaceRunner.runSpecification(TestInterfaceRunner.scala:61)
at org.specs2.runner.TestInterfaceRunner.run(TestInterfaceRunner.scala:54)
at sbt.ForkMain$Run.runTests(ForkMain.java:157)
at sbt.ForkMain$Run.run(ForkMain.java:169)
at sbt.ForkMain.main(ForkMain.java:84)
[info] IntegrationSpec
[info]
[info] Application should
[error] ! work from within a browser
[error] RuntimeException: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V (Helpers.scala:71)
[error] play.api.test.TestServer.start(Selenium.scala:128)
[error] play.api.test.Helpers$.running(Helpers.scala:71)
[error] test.IntegrationSpec$$anonfun$1$$anonfun$apply$1.apply(IntegrationSpec.scala:17)
[error] test.IntegrationSpec$$anonfun$1$$anonfun$apply$1.apply(IntegrationSpec.scala:17)
[error] org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:224)
[error] org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:299)
[error] org.jboss.netty.logging.JdkLogger.debug(JdkLogger.java:36)
[error] org.jboss.netty.logging.InternalLoggerFactory$1.debug(InternalLoggerFactory.java:80)
[error] org.jboss.netty.channel.socket.nio.SelectorUtil.<clinit>(SelectorUtil.java:57)
[error] org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<init>(NioServerSocketChannelFactory.java:115)
[error] play.core.server.NettyServer.play$core$server$NettyServer$$newBootstrap(NettyServer.scala:40)
[error] play.core.server.NettyServer.<init>(NettyServer.scala:127)
[error] play.api.test.TestServer.start(Selenium.scala:124)
[error] play.api.test.Helpers$.running(Helpers.scala:71)
[error] test.IntegrationSpec$$anonfun$1$$anonfun$apply$1.apply(IntegrationSpec.scala:17)
[error] test.IntegrationSpec$$anonfun$1$$anonfun$apply$1.apply(IntegrationSpec.scala:17)
[error] org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
[error] org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:224)
[error] org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:299)
[error] org.jboss.netty.logging.JdkLogger.debug(JdkLogger.java:36)
[error] org.jboss.netty.logging.InternalLoggerFactory$1.debug(InternalLoggerFactory.java:80)
[error] org.jboss.netty.channel.socket.nio.SelectorUtil.<clinit>(SelectorUtil.java:57)
[error] org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<init>(NioServerSocketChannelFactory.java:115)
[error] play.core.server.NettyServer.play$core$server$NettyServer$$newBootstrap(NettyServer.scala:40)
[error] play.core.server.NettyServer.<init>(NettyServer.scala:127)
[error] play.api.test.TestServer.start(Selenium.scala:124)
[error] play.api.test.Helpers$.running(Helpers.scala:71)
[error] test.IntegrationSpec$$anonfun$1$$anonfun$apply$1.apply(IntegrationSpec.scala:17)
[error] test.IntegrationSpec$$anonfun$1$$anonfun$apply$1.apply(IntegrationSpec.scala:17)
UPDATE - Problem Fixed
These files somehow managed to get into classpath,
rm /Library/Java/Extensions/log4j-1.2.15.jar
rm /Library/Java/Extensions/slf4j-api-1.5.8.jar
rm /Library/Java/Extentions/slf4j-log4j12-1.5.8.jar
I don't know which program placed these files.
Play logger will be called by default even if you don't use it. Check your application.conf
it contains something like:
# Root logger:
logger=ERROR
# Logger used by the framework:
logger.play=INFO
# Logger provided to your application:
logger.application=DEBUG
and Play.logger uses log4j and slf4j both as you can see above . So you need to configure them properly .
Check this question for setting up slf4 and log4j How to get SLF4J "Hello World" working with log4j?