Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-3708

tika-server-standard does not load configuration file from the command line

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Bug
    • 2.1.0, 2.2.1, 2.3.0, 2.4.0
    • None
    • cli, tika-server
    • None

    Description

      Echoing dataminer.accolade's report in TIKA-3581, there are continued problems with using tika-server-standard from the command line with a configuration file. I'm not sure if this is a configuration error, e.g. I have a malformed config.xml, or if there are underlying issues with tika and parsing the config file.

      Notes:

      1. I know that 2.1.0 and 2.2.1 are old, but wanted to include them for the sake of thoroughness.
      2. tika-server-standard-2.4.0-SNAPSHOT.jar is built from d6aa60f
      3. I'll include my config.xml in this description.
      4. All of these were tested using OpenJDK8:
      ) /usr/local/openjdk8/bin/java -version
      openjdk version "1.8.0_322"
      OpenJDK Runtime Environment (build 1.8.0_322-b06)
      OpenJDK 64-Bit Server VM (build 25.322-b06, mixed mode)

      using an ugly little shell script:

      ) for TIKA_SERVER in tika-server-standard*; \
      do echo ${TIKA_SERVER}; \
      /usr/local/openjdk8/bin/java -jar \
      ${TIKA_SERVER} --config tika-server-config.xml >> TIKA_SERVER_ERRORS; \ done
      1. TIKA_SERVER_ERRORS:
      ) for TIKA_SERVER in tika-server-standard*; do echo ${TIKA_SERVER}; /usr/local/openjdk8/bin/java -jar ${TIKA_SERVER} --config tika-server-config.xml >> TIKA_SERVER_ERRORS; done
      tika-server-standard-2.1.0.jar
      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.
      org.apache.tika.exception.TikaConfigException: Couldn't find setter: setId for object class org.apache.tika.server.core.TikaServerConfig
              at org.apache.tika.config.ConfigBase.tryToSet(ConfigBase.java:414)
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:248)
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:190)
              at org.apache.tika.config.ConfigBase.configure(ConfigBase.java:457)
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:190)
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:177)
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:134)
              at org.apache.tika.server.core.TikaServerCli.execute(TikaServerCli.java:83)
              at org.apache.tika.server.core.TikaServerCli.main(TikaServerCli.java:66)
      tika-server-standard-2.2.1.jar
      org.apache.tika.exception.TikaConfigException: Couldn't find setter: setIncludeStack for object class org.apache.tika.server.core.TikaServerConfig
              at org.apache.tika.config.ConfigBase.tryToSet(ConfigBase.java:433)
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:267)
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:209)
              at org.apache.tika.config.ConfigBase.configure(ConfigBase.java:476)
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:202)
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:189)
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:146)
              at org.apache.tika.server.core.TikaServerCli.execute(TikaServerCli.java:83)
              at org.apache.tika.server.core.TikaServerCli.main(TikaServerCli.java:66)
      ERROR [main] 11:51:49,753 org.apache.tika.server.core.TikaServerCli Can't start: 
      org.apache.tika.exception.TikaConfigException: Couldn't find setter: setIncludeStack for object class org.apache.tika.server.core.TikaServerConfig
              at org.apache.tika.config.ConfigBase.tryToSet(ConfigBase.java:433) ~[tika-server-standard-2.2.1.jar:2.2.1]
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:267) ~[tika-server-standard-2.2.1.jar:2.2.1]
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:209) ~[tika-server-standard-2.2.1.jar:2.2.1]
              at org.apache.tika.config.ConfigBase.configure(ConfigBase.java:476) ~[tika-server-standard-2.2.1.jar:2.2.1]
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:202) ~[tika-server-standard-2.2.1.jar:2.2.1]
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:189) ~[tika-server-standard-2.2.1.jar:2.2.1]
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:146) ~[tika-server-standard-2.2.1.jar:2.2.1]
              at org.apache.tika.server.core.TikaServerCli.execute(TikaServerCli.java:83) ~[tika-server-standard-2.2.1.jar:2.2.1]
              at org.apache.tika.server.core.TikaServerCli.main(TikaServerCli.java:66) [tika-server-standard-2.2.1.jar:2.2.1]
      tika-server-standard-2.3.0.jar
      org.apache.tika.exception.TikaConfigException: Couldn't find setter: setIncludeStack for object class org.apache.tika.server.core.TikaServerConfig
              at org.apache.tika.config.ConfigBase.tryToSet(ConfigBase.java:433)
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:267)
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:209)
              at org.apache.tika.config.ConfigBase.configure(ConfigBase.java:476)
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:202)
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:189)
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:146)
              at org.apache.tika.server.core.TikaServerCli.execute(TikaServerCli.java:83)
              at org.apache.tika.server.core.TikaServerCli.main(TikaServerCli.java:66)
      ERROR [main] 11:51:51,056 org.apache.tika.server.core.TikaServerCli Can't start: 
      org.apache.tika.exception.TikaConfigException: Couldn't find setter: setIncludeStack for object class org.apache.tika.server.core.TikaServerConfig
              at org.apache.tika.config.ConfigBase.tryToSet(ConfigBase.java:433) ~[tika-server-standard-2.3.0.jar:2.3.0]
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:267) ~[tika-server-standard-2.3.0.jar:2.3.0]
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:209) ~[tika-server-standard-2.3.0.jar:2.3.0]
              at org.apache.tika.config.ConfigBase.configure(ConfigBase.java:476) ~[tika-server-standard-2.3.0.jar:2.3.0]
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:202) ~[tika-server-standard-2.3.0.jar:2.3.0]
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:189) ~[tika-server-standard-2.3.0.jar:2.3.0]
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:146) ~[tika-server-standard-2.3.0.jar:2.3.0]
              at org.apache.tika.server.core.TikaServerCli.execute(TikaServerCli.java:83) ~[tika-server-standard-2.3.0.jar:2.3.0]
              at org.apache.tika.server.core.TikaServerCli.main(TikaServerCli.java:66) [tika-server-standard-2.3.0.jar:2.3.0]
      tika-server-standard-2.4.0-SNAPSHOT.jar
      ERROR [main] 11:51:52,394 org.apache.tika.server.core.TikaServerCli Can't start: 
      org.apache.tika.exception.TikaConfigException: Couldn't find setter: setIncludeStack for object class org.apache.tika.server.core.TikaServerConfig
              at org.apache.tika.config.ConfigBase.tryToSet(ConfigBase.java:433) ~[tika-server-standard-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:267) ~[tika-server-standard-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
              at org.apache.tika.config.ConfigBase.setParams(ConfigBase.java:209) ~[tika-server-standard-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
              at org.apache.tika.config.ConfigBase.configure(ConfigBase.java:476) ~[tika-server-standard-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:202) ~[tika-server-standard-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:189) ~[tika-server-standard-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
              at org.apache.tika.server.core.TikaServerConfig.load(TikaServerConfig.java:146) ~[tika-server-standard-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
              at org.apache.tika.server.core.TikaServerCli.execute(TikaServerCli.java:82) ~[tika-server-standard-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]
              at org.apache.tika.server.core.TikaServerCli.main(TikaServerCli.java:66) ~[tika-server-standard-2.4.0-SNAPSHOT.jar:2.4.0-SNAPSHOT]

      6. tika-server-config.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <properties>
         <server>
            <params>
               <port>9990</port>
               <host>localhost</host>
               <id/>
               <cors>NONE</cors>
               <digest>sha256</digest>
               <digestMarkLimit>1000000</digestMarkLimit>
               <logLevel>debug</logLevel>
               <includeStack>false</includeStack>
               <nofork>false</nofork>
               <taskTimeoutMillis>600000</taskTimeoutMillis>
               <taskPulseMillis>10000</taskPulseMillis>
               <pingTimeoutMillis>60000</pingTimeoutMillis>
               <pingPulseMillis>10000</pingPulseMillis>
               <maxForkedStartupMillis>120000</maxForkedStartupMillis>
               <maxRestarts>2</maxRestarts>
               <maxFiles>100000</maxFiles>
               <javaHome/>
               <forkedJvmArgs>
                  <arg>-Xms2g</arg>
                  <arg>-Xmx2g</arg>
                  <arg>-Dlog4j.configurationFile=my-forked-log4j2.xml</arg>
               </forkedJvmArgs>
               <enableUnsecureFeatures>true</enableUnsecureFeatures>
               <endpoints>
                  <endpoint>status</endpoint>
                  <endpoint>rmeta</endpoint>
               </endpoints>
            </params>
         </server>
      </properties>

      Apologies for the lengthy report!

      Attachments

        1. TIKA_SERVER_ERRORS
          6 kB
          Bridger Dyson-Smith
        2. tika-server-sans-config.xml
          1 kB
          Bridger Dyson-Smith

        Activity

          People

            Unassigned Unassigned
            CanOfBees Bridger Dyson-Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: