9 Replies Latest reply on May 23, 2017 6:57 AM by mzablocki-2 RSS
    jmaasland Explorer

    Unable to load DLL 'twApi.dll'

    We are trying to set up a OPC DA connection. After installing and configuring the extension from the installation manual, we get the below error messages when starting the OPC client service? The error repeats every 15 seconds.

     

    2016-06-12 23:19:02.085Z [L: Information] [T: 1] [U: SYSTEM] [O: com.thingworx.services.HostService] Initializing Service...

    2016-06-12 23:19:03.205Z [L: Information] [T: 1] [U: SYSTEM] [O: com.thingworx.services.HostService] Initialization complete.

    2016-06-12 23:19:03.327Z [L: Information] [T: 4] [U: SYSTEM] [O: com.thingworx.services.HostService] Starting Service...

    2016-06-12 23:19:03.422Z [L: Information] [T: 4] [U: SYSTEM] [O: com.thingworx.services.HostService] Service started.

    2016-06-12 23:19:04.052Z [L: Error] [T: 5] [U: SYSTEM] [O: com.thingworx.communications.client.TwApiWrapper] Error initializing the .NET SDK. : System.DllNotFoundException: Unable to load DLL 'twApi.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)     at com.thingworx.communications.client.TwApiWrapper.twW_SetLoggerProperties(TwApiLogLevel level, Byte isVerboseEnabled, TwLogMessageDelegate onLogMessage)     at com.thingworx.communications.client.TwApiWrapper.ConfigureTwApiLogger()     at com.thingworx.communications.client.TwApiWrapper.Initialize(ClientConfigurator config)

    2016-06-12 23:19:19.083Z [L: Error] [T: 5] [U: SYSTEM] [O: com.thingworx.communications.client.TwApiWrapper] Error initializing the .NET SDK. : System.DllNotFoundException: Unable to load DLL 'twApi.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)     at com.thingworx.communications.client.TwApiWrapper.twW_SetLoggerProperties(TwApiLogLevel level, Byte isVerboseEnabled, TwLogMessageDelegate onLogMessage)     at com.thingworx.communications.client.TwApiWrapper.ConfigureTwApiLogger()     at com.thingworx.communications.client.TwApiWrapper.Initialize(ClientConfigurator config)

     

    What have we forgotten?

     

    Regards, Jan

      • Re: Unable to load DLL 'twApi.dll'
        horia.raducioiu Apprentice

        Jan, can you try Riaan's answer marked as correct from the following thread 43992 ?

        Let me know if this helps.

        • Re: Unable to load DLL 'twApi.dll'
          aanjan Heavyweight Champ

          Jan, what version of the OpcDA client are you running? Can you open/ edit 'ThingWorxOPCService.exe' and scroll down to the <switches> flag and change the value from Information to Verbose. Please post the new set of logs as well.

            • Re: Unable to load DLL 'twApi.dll'
              jmaasland Explorer

              The version is 5.6.1.1100.

               

              How can I change the logging switch? It is an executable.

                • Re: Unable to load DLL 'twApi.dll'
                  jmaasland Explorer

                  I have found the switch. It is in the config file of the executable.

                   

                  I don't think it makes any change in the logging.

                   

                  2016-06-13 17:31:27.439Z [L: Information] [T: 1] [U: SYSTEM] [O: com.thingworx.services.HostService] Initialization complete.

                  2016-06-13 17:31:27.454Z [L: Information] [T: 4] [U: SYSTEM] [O: com.thingworx.services.HostService] Starting Service...

                  2016-06-13 17:31:27.517Z [L: Verbose] [T: 5] [U: SYSTEM] [O: com.thingworx.services.HostService] Using Platform uri: wss://192.168.11.105:8443/Thingworx/WS

                  2016-06-13 17:31:27.579Z [L: Error] [T: 5] [U: SYSTEM] [O: com.thingworx.communications.client.TwApiWrapper] Error initializing the .NET SDK. : System.DllNotFoundException: Unable to load DLL 'twApi.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)     at com.thingworx.communications.client.TwApiWrapper.twW_SetLoggerProperties(TwApiLogLevel level, Byte isVerboseEnabled, TwLogMessageDelegate onLogMessage)     at com.thingworx.communications.client.TwApiWrapper.ConfigureTwApiLogger()     at com.thingworx.communications.client.TwApiWrapper.Initialize(ClientConfigurator config)

                  2016-06-13 17:31:27.579Z [L: Information] [T: 4] [U: SYSTEM] [O: com.thingworx.services.HostService] Service started.

                  2016-06-13 17:31:42.600Z [L: Error] [T: 5] [U: SYSTEM] [O: com.thingworx.communications.client.TwApiWrapper] Error initializing the .NET SDK. : System.DllNotFoundException: Unable to load DLL 'twApi.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)     at com.thingworx.communications.client.TwApiWrapper.twW_SetLoggerProperties(TwApiLogLevel level, Byte isVerboseEnabled, TwLogMessageDelegate onLogMessage)     at com.thingworx.communications.client.TwApiWrapper.ConfigureTwApiLogger()     at com.thingworx.communications.client.TwApiWrapper.Initialize(ClientConfigurator config)

                  2016-06-13 17:31:57.608Z [L: Error] [T: 5] [U: SYSTEM] [O: com.thingworx.communications.client.TwApiWrapper] Error initializing the .NET SDK. : System.DllNotFoundException: Unable to load DLL 'twApi.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)     at com.thingworx.communications.client.TwApiWrapper.twW_SetLoggerProperties(TwApiLogLevel level, Byte isVerboseEnabled, TwLogMessageDelegate onLogMessage)     at com.thingworx.communications.client.TwApiWrapper.ConfigureTwApiLogger()     at com.thingworx.communications.client.TwApiWrapper.Initialize(ClientConfigurator config)