Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how to run a jython script - missing modules

Erik Zaroban September 7, 2011

Hi there,

I have a problem running a jython script with the buildin python modules socket and pickle.

In the shell the script works fine and connects to the daemon on another server. So the modules are installed:

The script lies under [...]/confluence-data/script/ and can be executed via confluence with this command

{jython:output=wiki|script=#script.py}
{jython}

For a testing "Hello World" this works fine to call the script, but when I want to use the mentioned modules, they can't be found.

Traceback (innermost last):
File "<string>", line 2, in ?
ImportError: no module named socket

Does anyone has a clue how to get it working, how to explicit import the modules in confluence?! It would be nice to have this functionality in confluence.


Cheers
Erik

1 answer

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 7, 2011

See SCRP-119 comments for instance. I think you need to install whatever libraries you want to use in WEB-INF/lib.

Erik Zaroban September 7, 2011

Ok, thx I will try that for the next change.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events