Dear all,
I have already installed xwiki-commons, xwiki-platform, xwiki-enterprise
successfully.
When I run the test case under the folder of xwiki-enterprise-test-rest,
I got this error.
###########################
T E S T S
-------------------------------------------------------
Running org.xwiki.test.rest.AllTests
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/home/junhan/.m2/repository/org/slf4j/slf4j-log4j12/1.4.3/slf4j-log4j12-1.4.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/home/junhan/.m2/repository/ch/qos/logback/logback-classic/0.9.28/logback-classic-0.9.28.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See
http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.
SLF4J: Your binding is version 1.5.5 or earlier.
SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.427
sec <<< FAILURE!
org.xwiki.test.rest.AllTests Time elapsed: 0 sec <<< ERROR!
java.lang.NoSuchMethodError:
org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
at
org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
Results :
Tests in error:
org.xwiki.test.rest.AllTests:
org.slf4j.impl.StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
###########################
I take a look at pom.xml in test-rest folder, there is a dependency on
slf4j v1.4.3.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.4.3</version>
<scope>test</scope>
</dependency>
After changing the version from 1.4.3 to 1.6.1, there is no more
slf4j-related errors.
Another error is missing javax.servlet.*, which will also cause the test
case to fail.
Adding this dependency will fix it, and a "mvn install" will report
Tests run 60, Failure 0.
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
Best regards
Jun Han