Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
Karrna Frequent Contributor.
Frequent Contributor.
815 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 (2)
0 Likes
12 Replies
Micro Focus Expert
Micro Focus Expert

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

Hello there,

Hope you are doing fine today.

I attached on this forum an official document, a guide to performing a clean uninstall process of LeanFT. Please let us know if after this change, you continue having the same results.

Hope this information was useful,

If you find this or any other post resolves your issue, please be sure to mark it as an accepted solution.

If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the pond show your appreciation.

Best regards,

0 Likes
Karrna Frequent Contributor.
Frequent Contributor.

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

I did my best on following the uninstallation instructions although they seem to be meant for QTP / UFT instead of LeanFT. After uninstallation and reboot I installed the NodeJS and LeanFT again and rebooted. After that the same original problem with "General LWE error" still persisted.

Also what has happened is that one of the working machines have also got this same problem. I even reverted to a previous snapshot that I knew had LeanFT working for sure but now the LeanFT is broken also on that snapshot.

Both of the non working machines are virtualized (VMWare) and the only working one is non-virtualized although I don't think that should have any impact.

0 Likes
Karrna Frequent Contributor.
Frequent Contributor.

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

We had to downgrade to the LeanFT 14.03 as we did not manage to get the 14.51 working. There has not been similar issues with the 14.03 so I'm concluding that there is something wrong with newer release.

I'm still waiting for some resolution or idea how to solve this issue. I would like to get rid of this issue, if not in 14.51 then at least in future releases.

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

Hello Karrna,

 

I'm sorry to hear you have experienced such an error.

Would you by any chance have a full runtime log with the error that you can send me?

 

It would be helpful if you can also share the following details:

  • Are you using the LeanFT Java SDK through Maven?
  • Are you getting this error on any command or did you try only exist?

 

Regards,

Anton

0 Likes
Karrna Frequent Contributor.
Frequent Contributor.

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

Hi, Anton

The full runtime log is as an attachement on the first post.

  • I'm using the LeanFT with Maven. I can give you the whole project code if you want, just let me know.
  • I'm getting the same error also with all other commands I have tried.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

Hi Karrna,

I've missed the attachment on the orig post.

 

I've went over the log, the issue that I see there is that for some reason it take more than 30 seconds to establish a connection between the 2 LeanFT engines (the C# one and the node one).

In order to understand what is the problem I will need the log that is called LFTRuntime.log.

It would be great if you could have it in debug, in order to configure it you need to open: <LeanFT installed Dir>\bin\LFTRuntime.log.config.xml

and update the: <root>
<level value="DEBUG"

(it is INFO by default).

 

Hope you still have that environment, so that you could reproduce the issue. 

 

Thanks,

Anton

 

0 Likes
Karrna Frequent Contributor.
Frequent Contributor.

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

Hi,

No problem, I still have one environment available where the problem persists.

The LFTRuntime.log is in the attachment.

 

 

Thanks for helping out!

 

0 Likes
astrasser Regular Contributor.
Regular Contributor.

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

Hi! 

I just wanted to add that we are facing the exact same issue.

We installed 14.51 on various clients, both virtualized and none-virtualized. All none-virtualized clients working without any problem, but both virtualized clients (Win7, VMWare) have the same "General LWE-Error" issue.

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

Hello,

 

Could you please provide the runtime.log file in trace level?

(This can be done by:

  1. copying the folder <Leanft install dir>\dat\LogConfigurations to %localappdata%\LeanFT
  2. edit the file inside called leanft.runtime.log.config.json to change the levels->all from info to trace
  3. Reproduce the issue
  4. Attach here the %localappdata%\LeanFT\Logs\leanft.runtime.log file)

This will allow me to verify that it is indeed the same issue.

 

Regards,

Anton

 

0 Likes
astrasser Regular Contributor.
Regular Contributor.

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

Hi! 

I've attached the desired file. Please feel free to ask if you need any more info! 

Best regards,

Arnold

0 Likes
Member.. Ingenierie
Member..

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

I've got the same error than youi  "General LWE error", to you find a solution to this problem ? I'm on a virtual machine, with LEanFT 14.51 and IntelliJ 2017.3 (as LeanFT 14.51 doesn't work with IntelliJ 2018.3.x).

Need to find quickly a compliant version of LeanFT and IntelliJ but it seems really difficult 

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: LeanFT 14.51 Java SDK fails with "general LWE error"

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

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.