We have swing application for automation. I am using jython. I have installed jython, downloaded swing library jar file. installed robot using jython -m pip install robotframework
CLASSPATH set to - C:\jython2.7.2\jython.jar;C:\swinglibrary-2.2.0.jar;myApp.jar
I have created Temp.robot in pycharm and importing library as Library SwingLibrary
still facing below issue when i do -
jython -m robot Temp.robot
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(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at robot.utils.importer$py._import$16(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/importer.py:188)
at robot.utils.importer$py.call_function(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/importer.py)
at robot.utils.importer$py.import_$31(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/importer.py:283)
at robot.utils.importer$py.call_function(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/importer.py)
at robot.utils.importer$py._import_class_or_module$5(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/importer.py:77)
at robot.utils.importer$py.call_function(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/importer.py)
at robot.utils.importer$py.import_class_or_module$4(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/importer.py:74)
at robot.utils.importer$py.call_function(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/importer.py)
at robot.model.visitor$py.visit_suite$2(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/model/visitor.py:89)
at robot.model.visitor$py.call_function(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/model/visitor.py)
at robot.model.testsuite$py.visit$21(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/model/testsuite.py:174)
at robot.model.testsuite$py.call_function(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/model/testsuite.py)
at robot.run$py.main$3(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/run.py:452)
at robot.run$py.call_function(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/run.py)
at robot.utils.application$py._execute$10(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/application.py:94)
at robot.utils.application$py.call_function(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/application.py)
at robot.utils.application$py.execute_cli$5(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/application.py:49)
at robot.utils.application$py.call_function(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/utils/application.py)
at robot.run$py.run_cli$7(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/robotframework/robot/run.py:492)
at robot.run$py.call_function(C:/Users/pranalm/AppData/Local/Temp/pip-install-sni8gx/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(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 194 more
PYTHONPATH:
C:\jython2.7.2\Lib
__classpath__
__pyclasspath__/
C:\jython2.7.2\Lib\site-packages
CLASSPATH:
C:\jython2.7.2\jython.jar
C:\jython2.7.2\jython.jar
C:\swinglibrary-2.2.0.jar
myApp.jar