# Custom Keyword using Java and importing to RIDE

**URL:** <https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469>\
**Category:** Robot Framework\
**Created:** [15 July 2020 05:56 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469 "2020-07-15T05:56:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [15 July 2020 05:56 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/1 "2020-07-15T05:56:21Z")

</div>

Hi All,

I had started to build a custom keyword from Java and created a JAR file so that it can be used in RIDE as keyword. Now that I am able to create a JAR file, I am not sure on how to import the JAR to RIDE and use the keywords in a test case.  
Can anyone help me on providing the detailed steps on how to import them or a detailed documentation if available could help me understand it better.

Thanks.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [15 July 2020 14:18 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/2 "2020-07-15T14:18:16Z")

</div>

First, clarify what is the problem.

- RIDE shows import in red color:  
1. There are failed import errors in Tools-\>RIDE Log  
2. The execution in command window/shell/terminal does not work
- The execution in command window/shell/terminal works without errors

---

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [16 July 2020 14:36 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/3 "2020-07-16T14:36:19Z")

</div>

Thank you so much for replying. I highly appreciate your immediate response for the query.  
I would like to explain the whole process which I had followed in the attempt of trying to use a method/keyword from a Java class.

Python version – 2.7.15  
PIP – 9.0.3  
Robot Framework – 3.2.1  
Jython – 2.7.0

Created a java project with a class and few public methods and then created a JAR file by exporting the same.  
Placed the JAR in C:\Python27\Scripts path and as well as in C:\Python27\Lib\site-packages.

For importing the JAR File, tried few ways which weren’t of help to me:

1. Found in this link that we are supposed to create a Library spec through libdoc tool or by using Jython.  
[https://github.com/robotframework/RIDE/wiki/Keyword-Completion#setting-pythonpath](https://github.com/robotframework/RIDE/wiki/Keyword-Completion#setting-pythonpath)  
Tired to install libdoc tool from the below given URL which was found from the same blog mentioned above - [https://code.google.com/archive/p/robotframework/wikis/LibraryDocumentationTool.wiki](https://code.google.com/archive/p/robotframework/wikis/LibraryDocumentationTool.wiki), but was not able to install the same as its throwing error(Error: 404).
2. Tried to install Jython, but not sure on how to proceed with the creation of spec after that. Basically, we were not aware of creating the spec for a Java based library.
3. Not sure how to add the spec file to PYTHONPATH as we are stuck in the above mentioned point itself.
4. In the RIDE tool, created a test suite and then clicked on Add Import’s (Library). Gave the class name (fully qualified name) as org.robot.sample.keywords.SampleKeywordLibrary in the Name part. Clicked on Ok. Also tried specifying only the jar file’s name.

After adding the same, found that the library added is highlighted in “Red” color which I understand that the Import is unsuccessful.  
Found the Failed error logs in RIDE’s Log:

Importing test library ‘SampleKeywordLibrary’ failed: Not a valid file or directory to import.  
File “C:\Python27\lib\site-packages\robotide\spec\librarymanager.py”, line 87, in \_fetch\_keywords  
return get\_import\_result(path, library\_args)  
File “C:\Python27\lib\site-packages\robotide\spec\libraryfetcher.py”, line 24, in get\_import\_result  
lib = robotapi.TestLibrary(path, args)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\running\testlibraries.py”, line 50, in TestLibrary  
return\_source=True)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py”, line 72, in import\_class\_or\_module  
self.\_raise\_import\_failed(name, err)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py”, line 103, in \_raise\_import\_failed  
raise DataError(msg)

I would like to know if we have added the JAR in the required places and Can we directly use this jar or we need to create spec – I f yes then how?

It would be much helpful If you could let us know at point we are going wrong and with the steps to resolve the same.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [16 July 2020 14:54 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/4 "2020-07-16T14:54:34Z")

</div>

The reference is always our [User Guide](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html), look for Java.

It is OK for RIDE not seeing the documentation, of a library that does not documentation prepared. Libdoc is part of Robot Framework.

You will have to install Robot Framework on Jython, that would be a separate install from Python.

The best way to confirm the environment is correctly setup, is to run the SwingLibrary demo. After that, you can setup documentation in RIDE and confirm it is also correctly set.

You may use the run profile `jybot` but you have to create your own jybot script or batch, because is no longer installed with Robot Framework.

---

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [17 July 2020 14:18 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/5 "2020-07-17T14:18:18Z")

</div>

Hi, Thank you for clarifying few doubts on the installation of Robot Framework in Jython.  
We were able to install Robot Framework on Jython with the command:  
jython -m pip install robotframework

For ensuring if the environment is correctly set for RIDE, we downloaded the SwingLibrary jar from  
[https://mvnrepository.com/artifact/org.robotframework/swinglibrary/1.9.9](https://mvnrepository.com/artifact/org.robotframework/swinglibrary/1.9.9)

We had the class path set by placing the jar file in C:\Python27\Lib\site-packages.  
In CLASSPATH:  
C:\Python27\Scripts;C:\Python27\Lib\site-packages;

We then tried to import the library in Ride Tool by adding the relative path (…/…/Python27/Lib/site-packages/swingLibrary1.9.9.jar) as well as by giving the directory name as (SwingLibrary).  
Even though we had it both ways, the import is still highlighted in “red” color.  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/3be2641b28c249690001906106cefd5eeaee795a.png)  
Found the below mentioned details in the Log:

1. 20200717 17:43:02.310 [WARN]: Importing test library “C:\robotFramework\LibrarayTest…/…/Python27/Lib/site-packages/swinglibrary-demo/lib/swinglibrary-1.2.jar” failed  
Traceback (most recent call last):  
Importing test library ‘C:\robotFramework\LibrarayTest…\Python27\Lib\site-packages\swinglibrary-demo\lib\swinglibrary-1.2.jar’ failed: Not a valid file or directory to import.  
File “C:\Python27\lib\site-packages\robotide\spec\librarymanager.py”, line 87, in \_fetch\_keywords  
return get\_import\_result(path, library\_args)  
File “C:\Python27\lib\site-packages\robotide\spec\libraryfetcher.py”, line 24, in get\_import\_result  
lib = robotapi.TestLibrary(path, args)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\running\testlibraries.py”, line 50, in TestLibrary  
return\_source=True)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py”, line 72, in import\_class\_or\_module  
self.\_raise\_import\_failed(name, err)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py”, line 103, in \_raise\_import\_failed  
raise DataError(msg)

2. 20200717 17:44:09.440 [WARN]: Importing test library “swinglibrary-demo” failed  
Traceback (most recent call last):  
Importing test library ‘swinglibrary-demo’ failed: ImportError: No module named swinglibrary-demo  
Traceback (most recent call last):  
File “C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py”, line 153, in \_import  
return **import** (name, fromlist=fromlist)  
PYTHONPATH:  
C:\WINDOWS\system32\python27.zip  
C:\Python27\DLLs  
C:\Python27\lib  
C:\Python27\lib\plat-win  
C:\Python27\lib\lib-tk  
C:\Python27  
C:\Python27\lib\site-packages  
C:\Python27\lib\site-packages\win32  
C:\Python27\lib\site-packages\win32\lib  
C:\Python27\lib\site-packages\Pythonwin  
C:\Python27\lib\site-packages\wx-2.8-msw-unicode  
C:\Python27\lib\site-packages\robotide\spec  
C:\Python27\lib\site-packages\robotide\lib  
C:\Python27\lib\site-packages\robotide\contrib\testrunner…/…/lib  
C:\Python27\lib\site-packages\robotide\contrib\testrunner…/…/lib  
File “C:\Python27\lib\site-packages\robotide\spec\librarymanager.py”, line 87, in \_fetch\_keywords  
return get\_import\_result(path, library\_args)  
File “C:\Python27\lib\site-packages\robotide\spec\libraryfetcher.py”, line 24, in get\_import\_result  
lib = robotapi.TestLibrary(path, args)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\running\testlibraries.py”, line 50, in TestLibrary  
return\_source=True)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py”, line 72, in import\_class\_or\_module  
self.\_raise\_import\_failed(name, err)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py”, line 109, in \_raise\_import\_failed  
raise DataError(’\n’.join(msg))

3. 20200717 17:58:47.456 [WARN]: Importing test library “C:\robotFramework\LibrarayTest…/…/Python27/Lib/site-packages/swinglibrary-1.9.9.jar” failed  
Traceback (most recent call last):  
Importing test library ‘C:\robotFramework\LibrarayTest…\Python27\Lib\site-packages\swinglibrary-1.9.9.jar’ failed: Not a valid file or directory to import.  
File “C:\Python27\lib\site-packages\robotide\spec\librarymanager.py”, line 87, in \_fetch\_keywords  
return get\_import\_result(path, library\_args)  
File “C:\Python27\lib\site-packages\robotide\spec\libraryfetcher.py”, line 24, in get\_import\_result  
lib = robotapi.TestLibrary(path, args)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\running\testlibraries.py”, line 50, in TestLibrary  
return\_source=True)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py”, line 72, in import\_class\_or\_module  
self.\_raise\_import\_failed(name, err)  
File “C:\Python27\lib\site-packages\robotide\lib\robot\utils\importer.py”, line 103, in \_raise\_import\_failed  
raise DataError(msg)

And one more doubt regarding jybot which you have mentioned. How exactly is jybot used in RIDE and how to create a jybot script or batch if necessary.

We have tried out three different methods of giving the Library to RIDE, but all three are giving 3 different errors.  
How should I be resolving this issue and then start using the custom keyword JAR?

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [17 July 2020 16:38 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/6 "2020-07-17T16:38:29Z")

</div>

You have to try to run the demo from command window.  
The [example](https://github.com/robotframework/SwingLibrary/blob/master/demo/example.txt) is very clear, the import is:  
`Library SwingLibrary`

I think this will do for `jybot.bat` (which must be found in a directory in PATH):

```python
@echo off
set CLASSPATH=C:\jython2.7.2\Lib\site-packages\swinglibrary-1.9.9.jar
jython -m robot %*

```

NOTE: I have just tested that jybot command and the file must be .bat not .cmd (because of RIDE implementation). Also because of new RIDE only work on Python 3, the log and progress of tests would not work. Maybe you don’t have this problem with RIDE version 1.7.4.2 in Python 2.7.  
New NOTE: I confirm that with RIDE version 1.7.4.2 in Python 2.7, running status and log are OK.

---

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [20 July 2020 09:37 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/7 "2020-07-20T09:37:28Z")

</div>

I really appreciate your patience in helping us by providing steps to make this work. Thank you for replying on the same.

I tried out your comments and used [https://github.com/robotframework/SwingLibrary/blob/master/demo/example.txt](https://github.com/robotframework/SwingLibrary/blob/master/demo/example.txt) in RIDE.  
Ensured that the swinglibrary-1.9.9.jar is present in the site-packages directory of jython2.7.2 folder - C:\jython2.7.2\Lib\site-packages  
Created a jybot.bat script with

@echo off  
set CLASSPATH=C:\jython2.7.2\Lib\site-packages\swinglibrary-1.9.9.jar  
jython -m robot %\*

Below is the screenshot of the directory where we have placed the library’s JAR and the jybot.bat script.  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/34414fe6dea59177517cd3caedb563dd3c345410.png)  
Next step which is followed is that in the RIDE, I had set the Execution Profile to **jybot** and executing the test cases.

But, I was not able to execute its successfully. It was throwing a NoClassDefFoundError error.  
Below is the Error Message after trying to execute the Swing Library Demo.

command: jybot.bat --argumentfile c:\users\ah0161759.hewitt-na\appdata\local\temp\RIDEy63nbo.d\argfile.txt --listener C:\Python27\lib\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py:62397:False C:\robotFramework\LibrarayTest  
TestRunnerAgent: Running under Jython 2.7.2

# ===================================================================================================================================================================== LibrarayTest

# [ERROR] Error in file ‘C:\robotFramework\LibrarayTest’ on line 2: Importing test library ‘SwingLibrary’ failed: NoClassDefFoundError: org/robotframework/javalib/library/KeywordDocumentationRepository java.lang.NoClassDefFoundError: at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at robot.utils.importer$py._import$16(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py:188) at robot.utils.importer$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py) at robot.utils.importer$py.import_$31(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py:283) at robot.utils.importer$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py) at robot.utils.importer$py.\_import\_class\_or\_module$5(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py:77) at robot.utils.importer$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py) at robot.utils.importer$py.import\_class\_or\_module$4(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py:74) at robot.utils.importer$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py) at robot.model.visitor$py.visit\_suite$2(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/visitor.py:89) at robot.model.visitor$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/visitor.py) at robot.model.testsuite$py.visit$21(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/testsuite.py:174) at robot.model.testsuite$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/testsuite.py) at robot.run$py.main$3(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/run.py:452) at robot.run$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/run.py) at robot.utils.application$py.\_execute$10(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/application.py:94) at robot.utils.application$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/application.py) at robot.utils.application$py.execute\_cli$5(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/application.py:49) at robot.utils.application$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/application.py) at robot.run$py.run\_cli$7(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/run.py:492) at robot.run$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/run.py) at runpy$py.\_run\_code$9(C:/jython2.7.2/Lib/runpy.py:73) at runpy$py.call\_function(C:/jython2.7.2/Lib/runpy.py) at runpy$py.\_run\_module\_as\_main$14(C:/jython2.7.2/Lib/runpy.py:161) at runpy$py.call\_function(C:/jython2.7.2/Lib/runpy.py) Caused by: java.lang.ClassNotFoundException: org.robotframework.javalib.library.KeywordDocumentationRepository at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) … 194 more PYTHONPATH: C:\jython2.7.2\Lib **classpath**  **pyclasspath** / C:\jython2.7.2\Lib\site-packages C:\Python27\lib\site-packages\robotide\contrib\testrunner…/…/lib CLASSPATH: C:\jython2.7.2\jython.jar C:\jython2.7.2\Lib\site-packages\swinglibrary-1.9.9.jar LibrarayTest.UpointTest

## [ERROR] Error in file ‘C:\robotFramework\LibrarayTest\UpointTest.robot’ on line 3: Importing test library ‘SwingLibrary’ failed: NoClassDefFoundError: org/robotframework/javalib/library/KeywordDocumentationRepository java.lang.NoClassDefFoundError: at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at robot.utils.importer$py._import$16(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py:188) at robot.utils.importer$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py) at robot.utils.importer$py.import_$31(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py:283) at robot.utils.importer$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py) at robot.utils.importer$py.\_import\_class\_or\_module$5(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py:77) at robot.utils.importer$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py) at robot.utils.importer$py.import\_class\_or\_module$4(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py:74) at robot.utils.importer$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/importer.py) at robot.model.visitor$py.visit\_suite$2(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/visitor.py:89) at robot.model.visitor$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/visitor.py) at robot.model.testsuite$py.visit$21(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/testsuite.py:174) at robot.model.testsuite$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/testsuite.py) at robot.model.itemlist$py.visit$12(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/itemlist.py:76) at robot.model.itemlist$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/itemlist.py) at robot.model.visitor$py.visit\_suite$2(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/visitor.py:89) at robot.model.visitor$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/visitor.py) at robot.model.testsuite$py.visit$21(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/testsuite.py:174) at robot.model.testsuite$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/model/testsuite.py) at robot.run$py.main$3(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/run.py:452) at robot.run$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/run.py) at robot.utils.application$py.\_execute$10(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/application.py:94) at robot.utils.application$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/application.py) at robot.utils.application$py.execute\_cli$5(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/application.py:49) at robot.utils.application$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/utils/application.py) at robot.run$py.run\_cli$7(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/run.py:492) at robot.run$py.call\_function(C:/Users/ah0161759.HEWITT-NA/AppData/Local/Temp/pip-install-vaqw8t/robotframework/robot/run.py) at runpy$py.\_run\_code$9(C:/jython2.7.2/Lib/runpy.py:73) at runpy$py.call\_function(C:/jython2.7.2/Lib/runpy.py) at runpy$py.\_run\_module\_as\_main$14(C:/jython2.7.2/Lib/runpy.py:161) at runpy$py.call\_function(C:/jython2.7.2/Lib/runpy.py) Caused by: java.lang.ClassNotFoundException: org.robotframework.javalib.library.KeywordDocumentationRepository at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) … 212 more PYTHONPATH: C:\jython2.7.2\Lib **classpath**  **pyclasspath** / C:\jython2.7.2\Lib\site-packages C:\Python27\lib\site-packages\robotide\contrib\testrunner…/…/lib CLASSPATH: C:\jython2.7.2\jython.jar C:\jython2.7.2\Lib\site-packages\swinglibrary-1.9.9.jar Test Add Todo Item | FAIL | Parent suite setup failed: No keyword with name ‘Start Test Application’ found.

LibrarayTest.UpointTest | FAIL |  
Suite setup failed:  
No keyword with name ‘Start Test Application’ found.

# 1 critical test, 0 passed, 1 failed 1 test total, 0 passed, 1 failed

# LibrarayTest | FAIL | 1 critical test, 0 passed, 1 failed 1 test total, 0 passed, 1 failed

Output: c:\users\ah0161759.hewitt-na\appdata\local\temp\RIDEy63nbo.d\output.xml  
Log: c:\users\ah0161759.hewitt-na\appdata\local\temp\RIDEy63nbo.d\log.html  
Report: c:\users\ah0161759.hewitt-na\appdata\local\temp\RIDEy63nbo.d\report.html

Picked up JAVA\_TOOL\_OPTIONS: -agentlib:jvmhook  
Picked up \_JAVA\_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:“C:\Program Files (x86)\HP\Unified Functional Testing\bin\java\_shared\classes”;“C:\Program Files (x86)\HP\Unified Functional Testing\bin\java\_shared\classes\jasmine.jar”

test finished 20200720 14:19:01

Could you please help us resolve this issue as we have created the jbot.bat script and placed the library’s jar file in the required directory.

Thanks,  
Apoorva A

---

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [20 July 2020 09:39 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/8 "2020-07-20T09:39:01Z")

</div>

Below is the screenshot of RIDE, which has the Execution Profile set to “jybot”  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/9712fec4e247225a4413a2fe76b6e6c997c675b8.png)  
Thanks,  
Apoorva A

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [20 July 2020 09:59 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/9 "2020-07-20T09:59:21Z")

</div>

Can’t tell much. I suspect of two things.  
The robotframework installed is 3.2.1 not 3.1.2. Uninstall robotframework and install again with fixed version.

Try to use the demo, just like it is on project, run from command window outside RIDE.  
The demo has a `run_demo.py` which is not working correctly. Confirm that you have Java 8 working OK by running the demo app:

```python
set CLASSPATH=C:\jython2.7.2\Lib\site-packages\swinglibrary-1.9.9.jar
java org.robotframework.swing.testapp.examplesut.TodoListApplication

```

But running `jybot example.txt` should work.  
After this setup is confirmed, you can try RIDE.

---

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [20 July 2020 11:36 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/10 "2020-07-20T11:36:38Z")

</div>

Do you mean that we need to have the version of Robot Framework as 3.1.2 and not 3.2.1. Is 3.1.2 a fixed version?  
And we are able to run the demo app using the commands which were provided by you in command prompt. Thus we can confirm that Java 8 is working fine.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [20 July 2020 12:40 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/11 "2020-07-20T12:40:34Z")

</div>

I think so, because 3.2.1 have a different core code, and your error suggests me that.

Do:

```python
jython -m pip install -U --force robotframework==3.1.2

```

---

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [21 July 2020 08:57 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/12 "2020-07-21T08:57:47Z")

</div>

Hi, Thanks for suggesting the same. We tried to use the command  
jython -m pip install -U --force robotframework==3.1.2  
But we are getting the below error when we try the same:  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/ab127d43fdec13ed260f3f9d0b87291f442be2ed.png)  
Can you please help us on the same.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [21 July 2020 09:14 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/13 "2020-07-21T09:14:08Z")

</div>

Why you say it is the same problem?  
This is a totally different problem. It has to deal with Java certificates.

In my experiments I had problems when using newer pip. After searching the net, I got that the best version for jython, would be around 9. So, I installed pip 9.?? in jython and could install the intended versions of packages.

---

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [22 July 2020 08:52 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/14 "2020-07-22T08:52:25Z")

</div>

We found that in Jython (2.7.2) the version of PIP being used is 19.1. And that is why we had an issue with the installation of Robot Frame work in Jython.  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/3e611efef7580b3ade743e2ef98af5694ea64431.png)  
Could you please help us out in this downgrading of PIP version from 19.1 to 9.?

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [22 July 2020 09:15 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/15 "2020-07-22T09:15:26Z")

</div>

Option1:

1. Delete all pip\* folders inside jython’s Lib\Site-packages
2. Run `jython -m ensurepip`
3. If all went well, you now have pip~=1.0 or other
4. Install newer pip with `jython -m pip install --upgrade pip==9.0.3`

Option2:

1. Delete all pip\* folders inside jython’s Lib\Site-packages
2. Download and extract pip version 9.0.3 on some temporary directory
3. Install newer pip with `jython setup.py install`

---

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [22 July 2020 10:25 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/16 "2020-07-22T10:25:28Z")

</div>

We are now able to use the PIP 9.0.3 in Jython by following the steps mentioned. And now, tried to install Robot Framework in Jython with the PIP version of 9.0.3.

But still, we are facing the same issue which was already faced while trying to install Robot Framework in Jython using the command:  
**jython -m pip install -U --force robotframework==3.1.2**

Below is the error which was throwing when we executed the command:

C:\Users\ah0161759.HEWITT-NA\>jython -m pip install -U --force robotframework==3.  
1.2  
Picked up JAVA\_TOOL\_OPTIONS: -agentlib:jvmhook  
Picked up \_JAVA\_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:“C:\Program Files (x86)  
HP\Unified Functional Testing\bin\java\_shared\classes”;“C:\Program Files (x86)\H  
P\Unified Functional Testing\bin\java\_shared\classes\jasmine.jar”  
Collecting robotframework==3.1.2  
←[31mException:  
Traceback (most recent call last):  
File “ **pyclasspath** /pip/basecommand.py”, line 215, in main  
status = self.run(options, args)  
File “ **pyclasspath** /pip/commands/install.py”, line 324, in run  
requirement\_set.prepare\_files(finder)  
File “ **pyclasspath** /pip/commands/install.py”, line 324, in run  
requirement\_set.prepare\_files(finder)  
File “ **pyclasspath** /pip/req/req\_set.py”, line 376, in prepare\_files  
discovered\_reqs.extend(self.\_prepare\_file(  
File “ **pyclasspath** /pip/req/req\_set.py”, line 376, in prepare\_files  
discovered\_reqs.extend(self.\_prepare\_file(  
File “ **pyclasspath** /pip/req/req\_set.py”, line 551, in \_prepare\_file  
req\_to\_install.populate\_link(  
File “ **pyclasspath** /pip/req/req\_install.py”, line 278, in populate\_link  
self.link = finder.find\_requirement(self, upgrade)  
File “ **pyclasspath** /pip/index.py”, line 465, in find\_requirement  
all\_candidates = self.find\_all\_candidates(req.name)  
File “ **pyclasspath** /pip/index.py”, line 423, in find\_all\_candidates  
for page in self.\_get\_pages(url\_locations, project\_name):  
File “ **pyclasspath** /pip/index.py”, line 568, in \_get\_pages  
page = self.\_get\_page(location)  
File “ **pyclasspath** /pip/index.py”, line 683, in \_get\_page  
return HTMLPage.get\_page(link, session=self.session)  
File “ **pyclasspath** /pip/index.py”, line 788, in get\_page  
resp = session.get(  
File “ **pyclasspath** /pip/index.py”, line 788, in get\_page  
resp = session.get(  
File “ **pyclasspath** /pip/\_vendor/requests/sessions.py”, line 521, in get  
return self.request(‘GET’, url, \*\*kwargs)  
File “ **pyclasspath** /pip/download.py”, line 386, in request  
return super(PipSession, self).request(method, url, \*args, \*\*kwargs)  
File “ **pyclasspath** /pip/\_vendor/requests/sessions.py”, line 508, in request  
resp = self.send(prep, \*\*send\_kwargs)  
File “ **pyclasspath** /pip/\_vendor/requests/sessions.py”, line 618, in send  
r = adapter.send(request, **kwargs)  
File “pyclasspath/pip/\_vendor/cachecontrol/adapter.py”, line 47, in send  
resp = super(CacheControlAdapter, self).send(request, kw)  
File “pyclasspath/pip/\_vendor/requests/adapters.py”, line 407, in send  
self.cert\_verify(conn, request.url, verify, cert)  
File “pyclasspath/pip/\_vendor/requests/adapters.py”, line 225, in cert\_ver  
ify  
raise IOError("Could not find a suitable TLS CA certificate bundle, "  
IOError: Could not find a suitable TLS CA certificate bundle, invalid path: py  
classpath/pip/\_vendor/certifi\cacert.pem←[0m  
 ←[33mYou are using _pip version 9.0.3_, however version 20.1.1 is available.**  
**You should consider upgrading via the ‘pip install --upgrade pip’ command.←[0m**

Can you please help us on the same as we are having the correct version of PIP installed now in Jython.

Thanks.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [22 July 2020 11:05 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/17 "2020-07-22T11:05:28Z")

</div>

To bypass certificates problem, download the .zip package from PyPi, from this URL: [https://pypi.org/project/robotframework/3.1.2/#files](https://pypi.org/project/robotframework/3.1.2/#files)

Then install from the package:  
`jython -m pip install -U --force robotframework-3.1.2.zip`

You could try to install directly with (but the same certificate problem may happen):  
`jython -m pip install -U --force https://files.pythonhosted.org/packages/6c/04/2aee0fb807e14d2f2463217f81ac94c542b5b0c5809a7535f284a0bbb05c/robotframework-3.1.2.zip `

I am not sure if jython/pip would support the use of .whl files, so I propose the .zip.

---

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [22 July 2020 12:58 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/18 "2020-07-22T12:58:57Z")

</div>

Thank you so much for spending your valuable time in exchanging your ideas and ways to make this work.

We tried to install the robot framework 3.1.2 successfully by following the steps mentioned above.

We are also able to run the demo app by using the command which you had provided:

set CLASSPATH=C:\jython2.7.2\Lib\site-packages\swinglibrary-1.9.9.jar  
java org.robotframework.swing.testapp.examplesut.TodoListApplication

which confirms that we have Java 8 working OK.  
Now that we have all of them in place, we tried to use the SwingLibrary in RIDE, but the library is not being recognized when we try to use the same.

Would you mind if we could set up a connect for this issue so that it will be very helpful for us to understand and resolve this issue.

Thanks.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [22 July 2020 13:36 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/19 "2020-07-22T13:36:25Z")

</div>

Hope you tried to run the demo test, from command window and from RIDE, to see it is working.

About the red color for SwingLibrary in RIDE, you fix that by importing the documentation XML, you get from [https://github.com/robotframework/SwingLibrary/releases](https://github.com/robotframework/SwingLibrary/releases).

Have fun 🙂

---

<div class="post-metadata">

**Author:** ![Apoorva1](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@Apoorva1](https://forum.robotframework.org/u/Apoorva1)\
**Post date:** [22 July 2020 14:13 UTC](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469/20 "2020-07-22T14:13:24Z")

</div>

Yes we have tried running the demo test from command window as well as in RIDE. We were able to execute the same in command window.

While we **executed** in RIDE by setting the Execution Profile to Jybot and we got the following error message:

**[ERROR] Error in file ‘C:\robotFramework\LibrarayTest\TestLib’: Importing test library ‘SwingLibrary’ failed: NoClassDefFoundError: org/robotframework/javalib/library/KeywordDocumentationRepository**  
**java.lang.NoClassDefFoundError: \*\*  
\*\* at java.lang.ClassLoader.defineClass1(Native Method)**  
\*\* at java.lang.ClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.security.SecureClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader.access$100(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader$1.run(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader$1.run(Unknown Source)\*\*  
\*\* at java.security.AccessController.doPrivileged(Native Method)\*\*  
\*\* at java.net.URLClassLoader.findClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.defineClass1(Native Method)\*\*  
\*\* at java.lang.ClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.security.SecureClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader.access$100(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader$1.run(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader$1.run(Unknown Source)\*\*  
\*\* at java.security.AccessController.doPrivileged(Native Method)\*\*  
\*\* at java.net.URLClassLoader.findClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.Class.forName0(Native Method)\*\*  
\*\* at java.lang.Class.forName(Unknown Source)\*\*  
\*\* at robot.utils.importer$py._import$14(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py:167)\*\*  
\*\* at robot.utils.importer$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py)\*\*  
\*\* at robot.utils.importer$py.import_$29(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py:257)\*\*  
\*\* at robot.utils.importer$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py)\*\*  
\*\* at robot.utils.importer$py.\_import\_class\_or\_module$5(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py:77)\*\*  
\*\* at robot.utils.importer$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py)\*\*  
\*\* at robot.utils.importer$py.import\_class\_or\_module$4(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py:74)\*\*  
\*\* at robot.utils.importer$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py)\*\*  
\*\* at robot.model.visitor$py.visit\_suite$2(C:/jython2.7.2/Lib/site-packages/robot/model/visitor.py:88)\*\*  
\*\* at robot.model.visitor$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/model/visitor.py)\*\*  
\*\* at robot.model.testsuite$py.visit$19(C:/jython2.7.2/Lib/site-packages/robot/model/testsuite.py:168)\*\*  
\*\* at robot.model.testsuite$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/model/testsuite.py)\*\*  
\*\* at robot.run$py.main$3(C:/jython2.7.2/Lib/site-packages/robot/run.py:448)\*\*  
\*\* at robot.run$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/run.py)\*\*  
\*\* at robot.utils.application$py.\_execute$10(C:/jython2.7.2/Lib/site-packages/robot/utils/application.py:94)\*\*  
\*\* at robot.utils.application$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/application.py)\*\*  
\*\* at robot.utils.application$py.execute\_cli$5(C:/jython2.7.2/Lib/site-packages/robot/utils/application.py:49)\*\*  
\*\* at robot.utils.application$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/application.py)\*\*  
\*\* at robot.run$py.run\_cli$7(C:/jython2.7.2/Lib/site-packages/robot/run.py:488)\*\*  
\*\* at robot.run$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/run.py)\*\*  
\*\* at runpy$py.\_run\_code$9(C:/jython2.7.2/Lib/runpy.py:73)\*\*  
\*\* at runpy$py.call\_function(C:/jython2.7.2/Lib/runpy.py)\*\*  
\*\* at runpy$py.\_run\_module\_as\_main$14(C:/jython2.7.2/Lib/runpy.py:161)\*\*  
\*\* at runpy$py.call\_function(C:/jython2.7.2/Lib/runpy.py)\*\*  
**Caused by: java.lang.ClassNotFoundException: org.robotframework.javalib.library.KeywordDocumentationRepository**  
\*\* at java.net.URLClassLoader.findClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* … 194 more\*\*  
**PYTHONPATH:**  
\*\* C:\jython2.7.2\Lib\*\*  
\*\* **classpath** \*\*  
\*\* **pyclasspath** /\*\*  
\*\* C:\jython2.7.2\Lib\site-packages\*\*  
\*\* C:\Python27\lib\site-packages\robotide\contrib\testrunner…/…/lib\*\*  
**CLASSPATH:**  
\*\* C:\jython2.7.2\jython.jar\*\*  
\*\* C:\jython2.7.2\Lib\site-packages\swinglibrary-1.9.9.jar\*\*  
**=========================================================================================================================================================================**  
\*\*TestLib \*\*  
**=========================================================================================================================================================================**  
\*\*TestLib.UpointTest \*\*  
**=========================================================================================================================================================================**

**[ERROR] Error in file ‘C:\robotFramework\LibrarayTest\TestLib\UpointTest.robot’: Importing test library ‘SwingLibrary’ failed: NoClassDefFoundError: org/robotframework/javalib/library/KeywordDocumentationRepository**  
**java.lang.NoClassDefFoundError: \*\*  
\*\* at java.lang.ClassLoader.defineClass1(Native Method)**  
\*\* at java.lang.ClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.security.SecureClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader.access$100(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader$1.run(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader$1.run(Unknown Source)\*\*  
\*\* at java.security.AccessController.doPrivileged(Native Method)\*\*  
\*\* at java.net.URLClassLoader.findClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.defineClass1(Native Method)\*\*  
\*\* at java.lang.ClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.security.SecureClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader.defineClass(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader.access$100(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader$1.run(Unknown Source)\*\*  
\*\* at java.net.URLClassLoader$1.run(Unknown Source)\*\*  
\*\* at java.security.AccessController.doPrivileged(Native Method)\*\*  
\*\* at java.net.URLClassLoader.findClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.Class.forName0(Native Method)\*\*  
\*\* at java.lang.Class.forName(Unknown Source)\*\*  
\*\* at robot.utils.importer$py._import$14(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py:167)\*\*  
\*\* at robot.utils.importer$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py)\*\*  
\*\* at robot.utils.importer$py.import_$29(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py:257)\*\*  
\*\* at robot.utils.importer$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py)\*\*  
\*\* at robot.utils.importer$py.\_import\_class\_or\_module$5(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py:77)\*\*  
\*\* at robot.utils.importer$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py)\*\*  
\*\* at robot.utils.importer$py.import\_class\_or\_module$4(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py:74)\*\*  
\*\* at robot.utils.importer$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/importer.py)\*\*  
\*\* at robot.model.visitor$py.visit\_suite$2(C:/jython2.7.2/Lib/site-packages/robot/model/visitor.py:88)\*\*  
\*\* at robot.model.visitor$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/model/visitor.py)\*\*  
\*\* at robot.model.testsuite$py.visit$19(C:/jython2.7.2/Lib/site-packages/robot/model/testsuite.py:168)\*\*  
\*\* at robot.model.testsuite$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/model/testsuite.py)\*\*  
\*\* at robot.model.itemlist$py.visit$11(C:/jython2.7.2/Lib/site-packages/robot/model/itemlist.py:71)\*\*  
\*\* at robot.model.itemlist$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/model/itemlist.py)\*\*  
\*\* at robot.model.visitor$py.visit\_suite$2(C:/jython2.7.2/Lib/site-packages/robot/model/visitor.py:88)\*\*  
\*\* at robot.model.visitor$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/model/visitor.py)\*\*  
\*\* at robot.model.testsuite$py.visit$19(C:/jython2.7.2/Lib/site-packages/robot/model/testsuite.py:168)\*\*  
\*\* at robot.model.testsuite$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/model/testsuite.py)\*\*  
\*\* at robot.run$py.main$3(C:/jython2.7.2/Lib/site-packages/robot/run.py:448)\*\*  
\*\* at robot.run$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/run.py)\*\*  
\*\* at robot.utils.application$py.\_execute$10(C:/jython2.7.2/Lib/site-packages/robot/utils/application.py:94)\*\*  
\*\* at robot.utils.application$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/application.py)\*\*  
\*\* at robot.utils.application$py.execute\_cli$5(C:/jython2.7.2/Lib/site-packages/robot/utils/application.py:49)\*\*  
\*\* at robot.utils.application$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/utils/application.py)\*\*  
\*\* at robot.run$py.run\_cli$7(C:/jython2.7.2/Lib/site-packages/robot/run.py:488)\*\*  
\*\* at robot.run$py.call\_function(C:/jython2.7.2/Lib/site-packages/robot/run.py)\*\*  
\*\* at runpy$py.\_run\_code$9(C:/jython2.7.2/Lib/runpy.py:73)\*\*  
\*\* at runpy$py.call\_function(C:/jython2.7.2/Lib/runpy.py)\*\*  
\*\* at runpy$py.\_run\_module\_as\_main$14(C:/jython2.7.2/Lib/runpy.py:161)\*\*  
\*\* at runpy$py.call\_function(C:/jython2.7.2/Lib/runpy.py)\*\*  
**Caused by: java.lang.ClassNotFoundException: org.robotframework.javalib.library.KeywordDocumentationRepository**  
\*\* at java.net.URLClassLoader.findClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)\*\*  
\*\* at java.lang.ClassLoader.loadClass(Unknown Source)\*\*  
\*\* … 212 more\*\*  
**PYTHONPATH:**  
\*\* C:\jython2.7.2\Lib\*\*  
\*\* **classpath** \*\*  
\*\* **pyclasspath** /\*\*  
\*\* C:\jython2.7.2\Lib\site-packages\*\*  
\*\* C:\Python27\lib\site-packages\robotide\contrib\testrunner…/…/lib\*\*  
**CLASSPATH:**  
\*\* C:\jython2.7.2\jython.jar\*\*  
\*\* C:\jython2.7.2\Lib\site-packages\swinglibrary-1.9.9.jar\*\*  
**Utest | PASS |**  
**-------------------------------------------------------------------------------------------------------------------------------------------------------------------------**  
**TestLib.UpointTest | PASS |**  
**1 critical test, 1 passed, 0 failed**  
**1 test total, 1 passed, 0 failed**  
**=========================================================================================================================================================================**  
**TestLib | PASS |**  
**1 critical test, 1 passed, 0 failed**  
**1 test total, 1 passed, 0 failed**  
**=========================================================================================================================================================================**  
**Output: c:\users\ah0161759.hewitt-na\appdata\local\temp\RIDEwic1cs.d\output.xml**  
**Log: c:\users\ah0161759.hewitt-na\appdata\local\temp\RIDEwic1cs.d\log.html**  
**Report: c:\users\ah0161759.hewitt-na\appdata\local\temp\RIDEwic1cs.d\report.html**

**Picked up JAVA\_TOOL\_OPTIONS: -agentlib:jvmhook**  
**Picked up \_JAVA\_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:“C:\Program Files (x86)\HP\Unified Functional Testing\bin\java\_shared\classes”;"C:\Program Files (x86)\HP\Unified Functional Testing\bin\java\_shared\classes\jasmine.jar"**

**test finished 20200722 18:09:26**

Even though it is showing Red colour in the Import section, we executed and got the above error.

Secondly, we are able to download the documentation XML. Could you please let us know at what path should the XML File be placed exactly or how should we import the XML?

Thanks.

[Next page](https://forum.robotframework.org/t/custom-keyword-using-java-and-importing-to-ride/469.md?page=2)
