Article - CS321777

"java.io.IOException: error trying to initialize Platform storage" is seen after setting the ThingworxStorage directory to be located on a network share for ThingWorx Platform

Modified: 01-Jul-2025   


Applies To

  • ThingWorx Platform 8.1 to 9.6

Description

  • Cannot access ThingWorx Composer
  • Composer shows:
    • HTTP Status 404 – Not Found
      Type Status Report
      Message /Thingworx/####
      Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
  • Apache Tomcat service starts but ThingWorx is not accessible
  • Recently modified setenv.sh (Linux) or setenv.bat (Windows) in <Apache Tomcat>\bin and now ThingWorx will not start
  • Cannot use custom ThingworxPlatform location when starting Apache Tomcat
  • Apache Tomcat is not finding the correct THINGWORX_PLATFORM_SETTINGS directory and thus trying to start in at the default location (C:\ThingworxPlatform, /ThingworxPlatform)
  • Configuring ThingWorx High Availability which requires ThingworxStorage to be located on a network share but Apache is not starting
  • Trying to set ThingworxStorage to a network location and Apache Tomcat fails to start due to this change
  • Updated the BasicSettings > Storage key-value in platform-settings.json to have ThingworxStorage located on a network drive and Tomcat fails to stay running
  • Configured necessary permissions and mapped network drive to a drive letter on the Windows based ThingWorx Platform host but Apache Tomcat will not run after updating the ThingworxStorage location in platform-settings.json
  • ThingWorx unable to start post OS upgrade and displaying an error code 4
  • Executing service <Tomcat Service Name> status on Linux shows the following:
    • <Date Time> <Hostname> startup.sh[]: <Apache Tomcat>/bin/setenv.sh: line 3: $'\r': command not found
      <Date Time> <Hostname> startup.sh[]: <Apache Tomcat>/bin/setenv.sh: line 8: syntax error: unexpected end of file
  • Seeing the following error within the thingworx-foundation-stdout.log or tomcat9-stdout.log file located in <Apache Tomcat>\logs:
    • -ERROR in ch.qos.logback.core.joran.spi.Interpreter@3:88 - RuntimeException in Action for tag [contextListener] com.thingworx.exceptions.ConfigurationException: java.io.IOException: error trying to initialize Platform storage [setting: <ThingworxStorage location>\####]
          at com.thingworx.exceptions.ConfigurationException: java.io.IOException: error trying to initialize Platform storage [setting: <ThingworxStorage location>\####]
          at     at com.thingworx.system.configuration.PlatformSettings.getInstance(PlatformSettings.java:3390)
          at     at com.thingworx.logging.LogbackUtilities.loadLogbackConfiguration(LogbackUtilities.java:54)
          ...
      Caused by: java.io.IOException: error trying to initialize Platform storage [setting: <ThingworxStorage location>\####]
          at     at com.thingworx.system.configuration.PlatformSettings.prepareLocation(PlatformSettings.java:3299)
          at     at com.thingworx.system.configuration.PlatformSettings.setStorageRoot(PlatformSettings.java:3075)
          at     at com.thingworx.system.configuration.PlatformSettings.<init>(PlatformSettings.java:2235)
          ...
      Caused by: java.io.IOException: THINGWORX WARNING: could not create directory: <ThingworxStorage location>\####
          at     at com.thingworx.common.utils.DefaultPathUtility.createPath(DefaultPathUtility.java:39)
          at     at com.thingworx.system.configuration.PlatformSettings.prepareLocation(PlatformSettings.java:3296)
          at     ... 65 common frames omitted
      16:59:03,496 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
      16:59:03,497 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@67502e7f - Registering current configuration as safe fallback point
      
      >>>>>>>> TERMINATING JVM <<<<<<<<<<
      >>>>>>>> CALLING SYSTEM EXIT <<<<<<<<<<

       
This is a printer-friendly version of Article 321777 and may be out of date. For the latest version click CS321777