Search code examples
javaapachemavennlprdf

Build and run your Apache Stanbol instance - fails


Following the instructions on: stanbol build and run stanbol instance

We always get the following error while executing:

% mvn clean install

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project org.apache.stanbol.commons.owl: There are test failures.

We assume that it has something to do with this:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

The full log can be found: here

As we do not know what exactly went wrong we hope someone can give us some hints to find a solution.

If the tests are skipped with -DskipTests

When then lauchning the server following error appears:

16.07.2014 12:30:10.136 *ERROR* [FelixStartLevel] ERROR: Error starting 

Full server log can be accessed here

The result I get when using stanbol 0.12 here is still an error but most of the tests succeed...the version on github has a similar error here

And launching after skipping the tests throws this Errors showed here


Solution

  • I can not say much about the first issue with the failing tests of the org.apache.stanbol.commons.owl module, but I will try to provide some help with the follow up issues.

    regarding the error of the 0.12 build:

    org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.stanbol.commons.web.base.jersey [71]: Unable to resolve 71.0: missing requirement [71.0] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.http)(version>=1.2.1)(!(version>=2.0.0)))
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3962)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2025)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1279)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
        at java.lang.Thread.run(Thread.java:744)
    

    In my local build the org.apache.stanbol.commons.web.base.jersey module depends on org.osgi.service.http;version="[1.2.0,2)" (according to the MANIFEST.MF of the bundle) and org.apache.felix:org.apache.felix.http.api:jar:2.3.0 (used since STANBOL-1356) exports version 1.2.0 of this package.

    So the question to solve is why in your local build the org.apache.stanbol.commons.web.base.jersey module depends on version 1.2.1 instead.

    regarding the error in the github 0.12 build

    java.lang.UnsupportedClassVersionError: org/apache/marmotta/ldpath/api/backend/RDFBackend : Unsupported major.minor version 51.0
    

    Starting with Stanbol 0.12.1-SNAPSHOT and 1.0.0-SNAPSHOT Java 7 is required. This is because the dependency to Apache Marmotta LDPath.

    regarding the errors in the last linked log file

    ERROR: Bundle org.apache.felix.http.jetty [72]: Error starting slinginstall:org.apache.felix.http.jetty-2.3.0.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.felix.http.jetty [72]: Unable to resolve 72.0: missing requirement [72.0] package; (&(package=javax.servlet)(version>=3.0.0)(!(version>=4.0.0)))) org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.felix.http.jetty [72]: Unable to resolve 72.0: missing requirement [72.0] package; (&(package=javax.servlet)(version>=3.0.0)(!(version>=4.0.0)))
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3443)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1727)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:744)
    

    and following ...This is caused by STANBOL-1356. In fact the log contains the exact error as mentioned by the Issue. So this indicated that the pom.xml file of the launcher is missing the required updates to the <jarWebSupport></jarWebSupport> element. See the first comment to this issue for details.