Maven build failed for Carbon Api Management in WS02 - api

Hi I am trying to customize wso2 and the latest source code giving me duplicate class error. The code generated is generating extra classes which is leading to compilation error. I want to build API Manager, in which the prerequisite is to build carbon api management which is what failing now. Please help.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
8.1:compile (default-compile) on project org.wso2.carbon.apimgt.rest.api.store.v
1: Compilation failure: Compilation failure:
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1
/impl/ApisApiServiceImpl.java:[63,8] duplicate class: org.wso2.carbon.apimgt.res
t.api.store.v1.impl.ApisApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/imp
l/v1/TagsApiServiceImpl.java:[20,8] duplicate class: org.wso2.carbon.apimgt.rest
.api.store.v1.impl.TagsApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/imp
l/v1/ApiProductsApiServiceImpl.java:[28,8] duplicate class: org.wso2.carbon.apim
gt.rest.api.store.v1.impl.ApiProductsApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1
/impl/SearchApiServiceImpl.java:[46,8] duplicate class: org.wso2.carbon.apimgt.r
est.api.store.v1.impl.SearchApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/imp
l/v1/SubscriptionsApiServiceImpl.java:[23,8] duplicate class: org.wso2.carbon.ap
imgt.rest.api.store.v1.impl.SubscriptionsApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/imp
l/v1/SettingsApiServiceImpl.java:[21,8] duplicate class: org.wso2.carbon.apimgt.
rest.api.store.v1.impl.SettingsApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/imp
l/v1/ApplicationsApiServiceImpl.java:[30,8] duplicate class: org.wso2.carbon.api
mgt.rest.api.store.v1.impl.ApplicationsApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/imp
l/v1/ImportApiServiceImpl.java:[21,8] duplicate class: org.wso2.carbon.apimgt.re
st.api.store.v1.impl.ImportApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/imp
l/v1/ExportApiServiceImpl.java:[20,8] duplicate class: org.wso2.carbon.apimgt.re
st.api.store.v1.impl.ExportApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1
/impl/ThrottlingPoliciesApiServiceImpl.java:[30,8] duplicate class: org.wso2.car
bon.apimgt.rest.api.store.v1.impl.ThrottlingPoliciesApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/imp
l/v1/SelfSignupApiServiceImpl.java:[21,8] duplicate class: org.wso2.carbon.apimg
t.rest.api.store.v1.impl.SelfSignupApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/imp
l/v1/TenantsApiServiceImpl.java:[19,8] duplicate class: org.wso2.carbon.apimgt.r
est.api.store.v1.impl.TenantsApiServiceImpl
[ERROR] /D:/projects/wso2/carbon-apimgt-master/components/apimgt/org.wso2.carbon
.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1
/impl/SdkGenApiServiceImpl.java:[34,8] duplicate class: org.wso2.carbon.apimgt.r
est.api.store.v1.impl.SdkGenApiServiceImpl

Related

Upgrading to JUnit 5.8.0 in combation with Maven Surefire plugin 3.0.0-M5 gives NoSuchMethodError

After upgrading JUnit from 5.7.2 to 5.8.0, it seems not to work anymore in combination with the Maven Surefire plugin.
Initially, the following error pops up:
[ERROR] Please refer to /some/directory/app/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] TestEngine with ID 'junit-jupiter' failed to discover tests
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] TestEngine with ID 'junit-jupiter' failed to discover tests
[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.execute(MojoExecutor.java:210)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[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:305)
[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:957)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[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)
After looking at the dump, the following errors are given:
org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:111)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:85)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:92)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:67)
at org.apache.maven.surefire.junitplatform.TestPlanScannerFilter.accept(TestPlanScannerFilter.java:56)
at org.apache.maven.surefire.api.util.DefaultScanResult.applyFilter(DefaultScanResult.java:102)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.scanClasspath(JUnitPlatformProvider.java:147)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'some.test.class'] resolution failed
at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:102)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:82)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
at org.junit.jupiter.engine.discovery.DiscoverySelectorResolver.resolveSelectors(DiscoverySelectorResolver.java:46)
at org.junit.jupiter.engine.JupiterTestEngine.discover(JupiterTestEngine.java:69)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:103)
... 11 more
Caused by: java.lang.NoSuchMethodError: 'java.util.Optional org.junit.platform.commons.util.AnnotationUtils.findAnnotation(java.lang.Class, java.lang.Class, boolean)'
at org.junit.jupiter.engine.descriptor.DisplayNameUtils.getDisplayNameGenerator(DisplayNameUtils.java:110)
at org.junit.jupiter.engine.descriptor.DisplayNameUtils.lambda$createDisplayNameSupplierForClass$2(DisplayNameUtils.java:98)
at org.junit.jupiter.engine.descriptor.DisplayNameUtils.determineDisplayName(DisplayNameUtils.java:88)
at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.<init>(JupiterTestDescriptor.java:69)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.<init>(ClassBasedTestDescriptor.java:96)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.<init>(ClassTestDescriptor.java:51)
at org.junit.jupiter.engine.discovery.ClassSelectorResolver.newClassTestDescriptor(ClassSelectorResolver.java:119)
at org.junit.jupiter.engine.discovery.ClassSelectorResolver.lambda$resolve$0(ClassSelectorResolver.java:71)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution$DefaultContext.createAndAdd(EngineDiscoveryRequestResolution.java:246)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution$DefaultContext.addToParent(EngineDiscoveryRequestResolution.java:209)
at org.junit.jupiter.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:71)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:134)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1632)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91)
... 16 more
Does anyone have the same problem while updating? I'm kind of stuck :(
Updating the Maven Surefire Plugin was the first thing that came to my mind, but it seems we already use the latest version (3.0.0-M5).
Edit 1: As requested, the POM:
<properties>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
<sonarqube-plugin.version>3.2.0</sonarqube-plugin.version>
<compas.core.version>0.4.0</compas.core.version>
<jakarta-bind-api.version>2.3.3</jakarta-bind-api.version>
<jaxb-impl.version>2.3.5</jaxb-impl.version>
<jakarta-cdi-api.version>2.0.2</jakarta-cdi-api.version>
<microprofile-config-api.version>2.0</microprofile-config-api.version>
<slf4j.version>1.7.32</slf4j.version>
<!-- Test -->
<basex.version>9.2.4</basex.version>
<junit-jupiter.version>5.8.0</junit-jupiter.version>
<mockito-junit-jupiter.version>3.12.4</mockito-junit-jupiter.version>
<openpojo.version>0.9.1</openpojo.version>
</properties>
I just had a similar problem and it appears that it was an issue of the version of junit-platform-commons. Setting this to 1.8.0 solved it.
Or just add a single junit dependency to junit-bom -- this will ensure that the versions of all junit components are consistent, and fix the issue.

Appcelerator Titanium (Alloy) | How to find a error? or exception?

I am working on a project, and everything was working fine. However, suddenly I am getting below error
[ERROR] :
[ERROR] : (C:\Users\user.name.appcelerator\install\5.0.2\package\node_modules\appc-cli-titanium\node_modules\alloy\node_modules\uglify-js\lib\parse.js:189:18)
[ERROR] : (C:\Users\abdul.aleem.appcelerator\install\5.0.2\package\node_modules\appc-cli-titanium\node_modules\alloy\node_modules\uglify-js\lib\parse.js:197:11)
[ERROR] : (C:\Users\abdul.aleem.appcelerator\install\5.0.2\package\node_modules\appc-cli-titanium\node_modules\alloy\node_modules\uglify-js\lib\parse.js:664:9)
[ERROR] : Alloy compiler failed
TRACE | titanium exited with exit code 1
[ERROR] Application Installer abnormal process termination. Process exit value was 1
I know I had mistakenly written something on JS file or XML file, and now I am unable to find the exact cause of the error. The studio is throwing to a general exception.
How to find the exact location or cause of the error?
I cannot reproduce this with the same 5.0.2 version:
[ERROR] : Error generating AST for "/Users/fokkezb/dev/studio/TestAlloy/app/controllers/index.js"
[ERROR] : Unexpected token punc «{», expected punc «(»
[ERROR] : line 1, column 17, position 17
[ERROR] : Alloy compiler failed
TRACE | titanium exited with exit code 1
If you figure out the cause, could you create a JIRA ticket with a reproducible test case and steps so we ca fix this?

error while building apache spark

i get the following error while building apache spark on open suse. any pointers?
test:/siva/spark-1.1.0 # sbt/sbt assembly
[info] Loading project definition from /siva/spark-1.1.0/project/project
[info] Loading project definition from /root/.sbt/0.13/staging/ec3aa8f39111944cc5f2/sbt-pom-reader/project
[warn] Multiple resolvers having different access mechanism configured with same name 'sbt-plugin-releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[info] Loading project definition from /siva/spark-1.1.0/project
org.apache.maven.model.building.ModelBuildingException: 1 problem was encountered while building the effective model for org.apache.spark:spark-parent:1.1.0
[FATAL] Non-resolvable parent POM: Could not transfer artifact org.apache:apache:pom:14 from/to central ( http://repo.maven.apache.org/maven2): Error transferring file: repo.maven.apache.org from http://repo.maven.apache.org/maven2/org/apache/apache/14/apache-14.pom and 'parent.relativePath' points at wrong local POM # line 21, column 11
at org.apache.maven.model.building.DefaultModelProblemCollector.newModelBuildingException(DefaultModelProblemCollector.java:195)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:841)
....
at xsbt.boot.Boot.main(Boot.scala)
[error] org.apache.maven.model.building.ModelBuildingException: 1 problem was encountered while building the effective model for org.apache.spark:spark-parent:1.1.0
[error] [FATAL] Non-resolvable parent POM: Could not transfer artifact org.apache:apache:pom:14 from/to central ( http://repo.maven.apache.org/maven2): Error transferring file: repo.maven.apache.org from http://repo.maven.apache.org/maven2/org/apache/apache/14/apache-14.pom and 'parent.relativePath' points at wrong local POM # line 21, column 11
[error] Use 'last' for the full log.
[INFO] Unable to bind key for unsupported operation: backward-delete-word
[INFO] Unable to bind key for unsupported operation: backward-delete-word
[INFO] Unable to bind key for unsupported operation: down-history
[INFO] Unable to bind key for unsupported operation: up-history
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
building the spark did not throw such error in ubuntu and redhat.

Binary incompatibility in plugins detected in Play 2.1.3 project after upgrading to IDEA 13.1?

After updating IntelliJ IDEA to 13.1 last night I can't use Run/Debug config anymore. It happens in a project I've been working on in IDEA 13.0.x for the past couple of months -- now it shows me the message and I have no idea how I can solve this.
[info] Loading project definition from /www/play20apps/cnproject/project
[error] sbt.IncompatiblePluginsException: Binary incompatibility in plugins detected.
[error] Note that conflicts were resolved for some dependencies:
[error] asm:asm
[error] asm:asm-tree
[error] asm:asm-util
[error] org.avaje.ebeanorm:avaje-ebeanorm-agent
[error] jline:jline
[error] junit:junit
[error] com.jcraft:jsch
[error] commons-logging:commons-logging
[error] commons-codec:commons-codec
[error] Use 'last' for the full log.
[error] java.lang.ExceptionInInitializerError
[error] Use 'last' for the full log.
[error] Not a valid command: run
[error] run
[error] ^
Process finished with exit code 1
I didn't change Play version since yesterday of course and running application with common command line works as expected.
Also tried to create new run config after plugins' update with no luck.
Please advise.
Adding -Djline.terminal= to JVM Options should fix it.
last log reports this.
The relevant part:
Caused by: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: none
at jline.Terminal.setupTerminal(Terminal.java:65)
at jline.Terminal.getTerminal(Terminal.java:26)
at sbt.JLine$.sbt$JLine$$terminal(LineReader.scala:65)
where none is probably passed via -Djline.terminal=none.

play framework 2.1.x test conflict with slf4j-api

i've got a Play Framework 2.1.0 application, and even the simplest unit test will not run due to a system problem i'm struggling to track down. given this route:
POST /foo/bar controllers.FooBar.test()
...i've got a simple test to verify that the route exists:
#Test
public void fooBarRouteExists() {
running(fakeApplication(fakeGlobal()), new Runnable() {
#Override
public void run() {
final Result result = route(fakeRequest(POST, "/foo/bar"));
assertThat(result).isNotNull();
}
});
}
...which when run, produces the following Exception:
hsl [323]> play test
[info] Loading project definition from /Users/hsl/Documents/workspace/test_project/project
[info] Set current project to test_project (in build file:/Users/hsl/Documents/workspace/test_project/)
[info] Compiling 1 Java source to /Users/hsl/Documents/workspace/test_project/target/scala-2.10/test-classes...
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [file:/Users/hsl/Documents/workspace/test_project/target/scala-2.10/classes/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/play-2.1.0/repository/local/ch.qos.logback/logback-classic/1.0.7/jars/logback-classic.> jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/play-2.1.0/repository/cache/org.apache.activemq/activemq-all/jars/activemq-all-5.9.0.> jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[error] Test controllers.FooBar.test failed: null
[error] at org.slf4j.LoggerFactory.bind(slf4j:LoggerFactory.java):128)
[error] at org.slf4j.LoggerFactory.performInitialization(slf4j:LoggerFactory.java):107)
[error] at org.slf4j.LoggerFactory.getILoggerFactory(slf4j:LoggerFactory.java):295)
[error] at org.slf4j.LoggerFactory.getLogger(slf4j:LoggerFactory.java):269)
[error] at play.api.Logger$.<init>(Logger.scala:179)
[error] at play.api.Logger$.<clinit>(Logger.scala)
[error] at play.api.Application$class.$init$(Application.scala:266)
[error] at play.api.test.FakeApplication.<init>(Fakes.scala:187)
[error] at play.test.FakeApplication.<init>(FakeApplication.java:28)
[error] at play.test.Helpers.fakeApplication(Helpers.java:97)
[error] at controllers.FooBar.test(FooBar.java:20)
[error] ...
[error] Caused by: java.lang.UnsupportedOperationException: This code should have never made it into slf4j-api.jar
[error] at org.slf4j.impl.StaticLoggerBinder.<init>(impl:StaticLoggerBinder.java):63)
[error] at org.slf4j.impl.StaticLoggerBinder.<clinit>(impl:StaticLoggerBinder.java):44)
[error] ... 42 more
[error] Failed: : Total 1, Failed 1, Errors 0, Passed 0, Skipped 0
[error] Failed tests:
[error] controllers.FooBar
java.lang.RuntimeException: Tests unsuccessful
at scala.sys.package$.error(package.scala:27)
at scala.Predef$.error(Predef.scala:123)
at sbt.Tests$.showResults(Tests.scala:192)
at sbt.Defaults$$anonfun$testTasks$6.apply(Defaults.scala:296)
at sbt.Defaults$$anonfun$testTasks$6.apply(Defaults.scala:294)
at sbt.Scoped$$anonfun$hf4$1.apply(Structure.scala:580)
at sbt.Scoped$$anonfun$hf4$1.apply(Structure.scala:580)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.coped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
at sbt.std.Transform$$anon$5.work(System.scala:71)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:238)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
[error] (test:test) Tests unsuccessful>
can someone help me figure out what the problem is?
The key error message is at the top:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [file:/Users/hsl/Documents/workspace/test_project/target/scala-2.10/classes/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/play-2.1.0/repository/local/ch.qos.logback/logback-classic/1.0.7/jars/logback-classic.> jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/play-2.1.0/repository/cache/org.apache.activemq/activemq-all/jars/activemq-all-5.9.0.> jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
That's interesting, it looks like you have put (some of) the source code for sl4j in your test project, so that Play is compiling it. This causes the problem you are experiencing.
Remove the source code for slf4j from your test project, and it should work.
By the way, you can still have the source accessible for reference - e.g. if you are using Eclipse you can attach corresponding source to a jar in your project. play "eclipse with-sources" will do that automatically, for dependencies that have correctly published their source jars to their Maven or Ivy repository.