robotframework/jrobotremoteserver

Facing issue to connect to remote server while running the server from command prompt.

SibaPNayak opened this issue · 2 comments

I have built a maven project where I am using javalib-core-1.2 & jrobotremoteserver-3.0 jars to access a remote server (with user defined library and its keywords).
The strange thing is it works perfectly with Eclipse (one instance for server and one instance for robot testcases) but when I am running the server in command prompt (converted the maven project to a executable jar) and trying to access from Eclipse (the instance with robot testcases) its not working.

Its throwing the below exception in eclipse.

**Library specification generation problem

Problem occurred during generating libdoc for 'Remote [http://127.0.0.1:1234/PlatformRuntime]' library.
Following exception has been thrown:
Traceback (most recent call last):
File "C:\Users\SN185201\AppData\Local\Temp\RobotTempDir5823544428525871813\robot_session_server.py", line 43, in inner
result['result'] = func(*args, **kwargs)
File "C:\Users\SN185201\AppData\Local\Temp\RobotTempDir5823544428525871813\robot_session_server.py", line 105, in inner
return to_call(*args, **kwargs)
File "C:\Users\SN185201\AppData\Local\Temp\RobotTempDir5823544428525871813\robot_session_server.py", line 138, in inner
return to_call(*args, **kwargs)
File "C:\Users\SN185201\AppData\Local\Temp\RobotTempDir5823544428525871813\robot_session_server.py", line 78, in inner
return func(*args, **kwargs)
File "C:\Users\SN185201\AppData\Local\Temp\RobotTempDir5823544428525871813\robot_session_server.py", line 358, in create_libdoc
return red_libraries.create_libdoc(libname, format)
File "C:\Users\SN185201\AppData\Local\Temp\RobotTempDir5823544428525871813\red_libraries.py", line 69, in create_libdoc
raise Exception(console_output)
Exception: Getting keyword names from library 'Remote' failed: Calling dynamic method 'get_keyword_names' failed: Connecting remote server at http://127.0.0.1:1234/PlatformRuntime failed: <Fault 0: 'Failed to invoke method get_keyword_names in class org.robotframework.remoteserver.servlet.ServerMethods: java.lang.RuntimeException: No keywords found in the test library'>

        Try --help for usage information.**

From the server side I am getting some exception as below in command prompt.

    **... 29 more

Caused by: java.lang.RuntimeException: No keywords found in the test library
at org.robotframework.remoteserver.servlet.ServerMethods.get_keyword_names(ServerMethods.java:58)
... 34 more
Caused by:
java.lang.RuntimeException: java.lang.RuntimeException: No keywords found in the test library
at org.robotframework.remoteserver.servlet.ServerMethods.get_keyword_names(ServerMethods.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)**

Command I run to execute the server is: java -jar .jar
Java version in both eclipse and local is - 1.8_261 (64 bit)

Please let me know if anyone needs any extra information.
Thanks

Hi-Fi commented

I think you have some issues with the created jar. When running at the eclipse, it probably has something in the classpath that's not going to CLI running version.

I'd suggest handling whole dependency stack with Maven which would simplify things.

Hi-Fi commented

No comments for long time -> closing.