Highlighted
Frequent Contributor.
Frequent Contributor.
2348 views

LeanFT 14.51 Java SDK fails with "general LWE error"

Hi,

I have problem using LeanFT 14.51 Java SDK. It works fine in two computers but in one it fails to complete any commands. The conficuration phase of the SDK works fine but if I try to use the SDK e.g. to check if window exists then it fails with "general LWE error".

Environment is Windows 10 Pro, Java 1.8.0_202-b08, NodeJS 10.14.1-x64

 

Here is the code I'm running:

import com.hp.lft.sdk.Desktop;
import com.hp.lft.sdk.ModifiableSDKConfiguration;
import com.hp.lft.sdk.SDK;
import com.hp.lft.sdk.SDKConfigurationFactory;
import com.hp.lft.sdk.java.Window;
import com.hp.lft.sdk.java.WindowDescription;

import java.net.URI;

public class TestApp {

    public static void main(String[] args) throws Exception {
        System.out.println("Configuring LeanFT SDK.");
        ModifiableSDKConfiguration defaultConf = SDKConfigurationFactory.createDefaultSDKConfiguration();
        defaultConf.setServerAddress(new URI("ws://localhost:5095"));
        SDK.init(defaultConf);

        System.out.println("Making description.");
        com.hp.lft.sdk.java.Window window = Desktop.describe(Window.class, new WindowDescription.Builder().index(0).build());
        System.out.println("Checking if window exists.");
        boolean exists = window.exists();
        System.out.println("Window exists = " + exists);

        System.out.println("Cleaning LeanFT SDK.");
        SDK.cleanup();
    }
}

 

Output:

 

Configuring LeanFT SDK.
Making dscription.
Checking if window exists.
[WARNING] 
com.hp.lft.sdk.GeneralLeanFtException: general LWE error
at com.hp.lft.sdk.internal.ReplayExceptionFactory.createDefault (ReplayExceptionFactory.java:294)
at com.hp.lft.sdk.internal.ReplayExceptionFactory.createOrDefault (ReplayExceptionFactory.java:286)
at com.hp.lft.sdk.internal.ReplayExceptionFactory.createOrDefault (ReplayExceptionFactory.java:22)
at com.hp.lft.sdk.internal.TestObjectExecuterBehaviorBase$ReplayErrorHandler.onError (TestObjectExecuterBehaviorBase.java:65)
at com.hp.lft.sdk.internal.CommunicationClientImpl.handleError (CommunicationClientImpl.java:221)
at com.hp.lft.sdk.internal.CommunicationClientImpl.send (CommunicationClientImpl.java:96)
at com.hp.lft.sdk.internal.TestObjectExecuterBehavior.executeMethod (TestObjectExecuter.java:44)
at com.hp.lft.sdk.internal.TestObjectBase.executeMethod (TestObjectBase.java:128)
at com.hp.lft.sdk.internal.TestObjectBase$1.invoke (TestObjectBase.java:94)
at com.hp.lft.sdk.internal.TestObjectBase$1.invoke (TestObjectBase.java:91)
at com.hp.lft.sdk.internal.TestObjectOperationWrapper.executeWithEvents (TestObjectOperationWrapper.java:120)
at com.hp.lft.sdk.internal.TestObjectBase.exists (TestObjectBase.java:97)
at TestApp.main (TestApp.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
at java.lang.Thread.run (Thread.java:748)

 

 

There is runtime log with debugging enabled as attachment. The error is on row 4050:

 

[2019-02-08 10:55:06.062] [INFO] ReplayManager - handle message:  { data:
   { Parameters: [],
     Object: { Description: [Object], Class: 'JavaWindow' },
     Operation: 'Exist' },
  sessionId: '8ded198b-48cd-477c-a3c3-118769d8749c',
  type: 'ExecuteCommand',
  transactionId: 2,
  sessionInfo: { Mode: 0, PackageManagerAddress: 'PackageManager_1' },
  to: { target: 'PackageManager_1' } } 
responding with error:  general LWE error
[2019-02-08 10:55:06.062] [TRACE] LicenseManager.SimplePromiseThrottler - throttle: <== Exiting the concurrent operations count  0  of  4  operations in the queue  0
[2019-02-08 10:55:06.062] [DEBUG] Engine.ChannelManager - handle: responding with error to request from:  SDK_2 error: { Error: general LWE error
    at Function.processResponse (C:\Program Files (x86)\Micro Focus\LeanFT\lwe\lightweight-engine\node_modules\lightweight-engine-common\lib\channels-base.js:137:25)
    at clientInfo.channel.send (C:\Program Files (x86)\Micro Focus\LeanFT\lwe\lightweight-engine\node_modules\lightweight-engine-common\lib\channels-base.js:70:43)
    at DirectChannel._handleResponse (C:\Program Files (x86)\Micro Focus\LeanFT\lwe\lightweight-engine\node_modules\leanft.common\lib\direct_channel.js:188:9)
    at DirectChannel._onMessageReceived (C:\Program Files (x86)\Micro Focus\LeanFT\lwe\lightweight-engine\node_modules\leanft.common\lib\direct_channel.js:151:42)
    at Timeout._onTimeout (C:\Program Files (x86)\Micro Focus\LeanFT\lwe\lightweight-engine\node_modules\leanft.common\lib\direct_channel.js:138:27)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10) status: -17 }
Error: general LWE error
    at Function.processResponse (C:\Program Files (x86)\Micro Focus\LeanFT\lwe\lightweight-engine\node_modules\lightweight-engine-common\lib\channels-base.js:137:25)
    at clientInfo.channel.send (C:\Program Files (x86)\Micro Focus\LeanFT\lwe\lightweight-engine\node_modules\lightweight-engine-common\lib\channels-base.js:70:43)
    at DirectChannel._handleResponse (C:\Program Files (x86)\Micro Focus\LeanFT\lwe\lightweight-engine\node_modules\leanft.common\lib\direct_channel.js:188:9)
    at DirectChannel._onMessageReceived (C:\Program Files (x86)\Micro Focus\LeanFT\lwe\lightweight-engine\node_modules\leanft.common\lib\direct_channel.js:151:42)
    at Timeout._onTimeout (C:\Program Files (x86)\Micro Focus\LeanFT\lwe\lightweight-engine\node_modules\leanft.common\lib\direct_channel.js:138:27)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
[2019-02-08 10:55:06.062] [DEBUG] Engine.ChannelManager - handle: adoptedResponse - {
    "format": "LeanFT",
    "version": "1",
    "agentType": "leanFTClient",
    "data": {
        "status": -17,
        "data": {
            "ErrorMessage": "general LWE error"
        },
        "type": "ExecuteCommand",
        "sessionId": "8ded198b-48cd-477c-a3c3-118769d8749c"
    }
}

 

 

Br,

Timo

Labels (1)
0 Likes
18 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Hi all,

Attached is a patch for LeanFT 14.51, which should solve the issue.

Inside the zip file you will see the lwe folder which needs to be copied over the <LEANFT-INSTALLATION-FOLDER>\lwe (the attached folder has 3 js files in the correct folder structure).

Regards,

Anton

Highlighted
Super Contributor.
Super Contributor.

I noticed this error was fixed for 14.51 however I have a user that sporadically sees the same error message...pretty much all the same except they have UFT 15.  Does anyone know if this fix made it into UFT 15?

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Or I should say UFT Developer version 15

0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

facing the same issue, waiting for a response 

0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Do we have a solution for 15.01? 

0 Likes
Highlighted
Super Contributor.
Super Contributor.

No have no resolution yet from Micro Focus...they are not able to reproduce our issues

I guess showing them our issues and providing logs it is happening is not enough for them to figure out our issue or provide a solution

0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Try this piece of code and enable the browser extension(in case you are trying to play around a browser) 
this worked for me.
 
        ModifiableSDKConfiguration config = new ModifiableSDKConfiguration();
        config.setServerAddress(new URI("ws://localhost:5095"));
        SDK.init(config);
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.