← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #679737]: Error running Sikuli jar from batch file

 

Question #679737 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/679737

Description changed to:
I've created a program on Sikuli IDE and everything works when I run it
inside the IDE. Everything okay for now, but after exporting it to a
runnable jar file from a batch file, I get the following error. What can
I do? I tried almost evrything I could fine even though most of people
don't have the same problem as me. Thanks in advance. Here's the log:


Exception in thread "main" Traceback (most recent call last):
  File "C:\Users\HenriqueAlbertoBarro\Documents\Sikuli_sikuli.jar\Lib\warnings.py", line 233, in warn
  File "C:\Users\HenriqueAlbertoBarro\Documents\Sikuli_sikuli.jar\Lib\warnings.py", line 272, in warn_explicit
  File "C:\Users\HenriqueAlbertoBarro\Documents\Sikuli_sikuli.jar\Lib\linecache.py", line 40, in getlines
  File "C:\Users\HenriqueAlbertoBarro\Documents\Sikuli_sikuli.jar\Lib\linecache.py", line 92, in updatecache
  File "C:\Users\HenriqueAlbertoBarro\Documents\Sikuli_sikuli.jar\Lib\linecache.py", line 92, in updatecache
java.lang.NullPointerException
        at org.python.core.ClasspathPyImporter$1.close(ClasspathPyImporter.java:186)
        at org.python.core.ClasspathPyImporter.ClasspathPyImporter_get_source(ClasspathPyImporter.java:116)
        at org.python.core.ClasspathPyImporter$ClasspathPyImporter_get_source_exposer.__call__(Unknown Source)
        at org.python.core.PyObject.__call__(PyObject.java:484)
        at linecache$py.updatecache$5(C:/Users/HenriqueAlbertoBarro/Documents/Sikuli_sikuli.jar/Lib/linecache.py:135)
        at linecache$py.call_function(C:/Users/HenriqueAlbertoBarro/Documents/Sikuli_sikuli.jar/Lib/linecache.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:171)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:154)
        at org.python.core.PyFunction.__call__(PyFunction.java:423)
        at linecache$py.getlines$3(C:/Users/HenriqueAlbertoBarro/Documents/Sikuli_sikuli.jar/Lib/linecache.py:40)
        at linecache$py.call_function(C:/Users/HenriqueAlbertoBarro/Documents/Sikuli_sikuli.jar/Lib/linecache.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:171)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:154)
        at org.python.core.PyFunction.__call__(PyFunction.java:423)
        at warnings$py.warn_explicit$18(C:/Users/HenriqueAlbertoBarro/Documents/Sikuli_sikuli.jar/Lib/warnings.py:301)
        at warnings$py.call_function(C:/Users/HenriqueAlbertoBarro/Documents/Sikuli_sikuli.jar/Lib/warnings.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:171)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
        at org.python.core.PyFunction.function___call__(PyFunction.java:471)
        at org.python.core.PyFunction.__call__(PyFunction.java:466)
        at org.python.core.PyFunction.__call__(PyFunction.java:456)
        at warnings$py.warn$17(C:/Users/HenriqueAlbertoBarro/Documents/Sikuli_sikuli.jar/Lib/warnings.py:233)
        at warnings$py.call_function(C:/Users/HenriqueAlbertoBarro/Documents/Sikuli_sikuli.jar/Lib/warnings.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:171)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:171)
        at org.python.core.PyFunction.__call__(PyFunction.java:434)
        at org.python.core.PyFunction.__call__(PyFunction.java:428)
        at org.python.core.Py.warning(Py.java:512)
        at org.python.core.Py.warning(Py.java:499)
        at org.python.core.PyTableCode.call(PyTableCode.java:175)
        at org.python.core.PyCode.call(PyCode.java:18)
        at org.python.core.imp.createFromCode(imp.java:436)
        at org.python.core.util.importer.importer_load_module(importer.java:116)
        at org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:170)
        at org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown Source)
        at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46)
        at org.python.core.imp.loadFromLoader(imp.java:593)
        at org.python.core.imp.find_module(imp.java:547)
        at org.python.core.imp.import_next(imp.java:838)
        at org.python.core.imp.import_first(imp.java:863)
        at org.python.core.imp.load(imp.java:721)
        at org.python.util.JarRunner.run(JarRunner.java:27)
        at org.python.util.JarRunner.main(JarRunner.java:31)
java.lang.NullPointerException: java.lang.NullPointerException

The jar file is called "Sikuli_sikuli.jar"

Content of the batch file:

java -jar Sikuli_sikuli.jar
pause

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.