Uploaded image for project: 'Stanbol (Retired)'
  1. Stanbol (Retired)
  2. STANBOL-569

Integration Tests not working if executed in a {path} that requires escaping (e.g. includes a ' ')

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • commons-0.11.0
    • Commons
    • None

    Description

      The integration-tests use "org.apache.stanbol.commons.testing.jarexec.JarExecutor" to start the Stanbol Full launcher in an own JVM. This instance is than used to test the RESTful interface of Apache Stanbol

      The JarExecutor uses Apache Commons Exec to build and execute the command required to start the Stanbol Full launcher. if the path to the JAR file contains an char that need to be escaped, than Commons Exec automatically quotes it. In principle this is perfectly OK however the "java" executable does not interpret quotation marks. Because of that is directly evaluates the parsed path including the quotes. This results in the following log messages

      Unable to access jarfile "/Users/ale/Documents/text mining/stanbol/stanbol/stanbol/integration-tests/target/dependency/org.apache.stanbol.launchers.full-0.9.0-incubating-SNAPSHOT.jar"
      867 [Thread-1] ERROR org.apache.stanbol.commons.testing.jarexec.JarExecutor - Process execution failed:org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
      org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
      at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)
      at org.apache.commons.exec.DefaultExecutor.access$200(DefaultExecutor.java:46)
      at org.apache.commons.exec.DefaultExecutor$1.run(DefaultExecutor.java:188)

      Note the "text mining" folder.

      Workaround:
      ==========

      Do not use paths that include spaces and/or quotes to checkout/compile/test Apache Stanbol.

      More information can be found in this Mail: http://markmail.org/message/xbcseasols7ae2mc

      Attachments

        Activity

          People

            Unassigned Unassigned
            rwesten Rupert Westenthaler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: