0

I have jira and i try to execute on workflow jython script. I have successfully added them on step (in my case "starting") and save. But after that I got the error when i clicked on this button in jira:

root cause: Traceback (most recent call last): 
File "/var/atlassian/application-data/jira/jss/jython/__init_interpreter__.py", line 6, in <module> codecs.setDefaultEncoding('utf-8') 
LookupError: no codec search functions registered: can't find encoding 'utf-8' 
It seems that you have tried to perform an illegal workflow operation. If you think this message is wrong, please contact your JIRA administrators.

Please help : there is init_interpreter.py :

# -*- coding: UTF-8 -*- 
import sys

if sys.getdefaultencoding() != 'utf-8':   
     from org.python.core import codecs   
     codecs.setDefaultEncoding('utf-8')

from com.quisapps.jira.plugin.workflow import JythonFileUtil 
path = JythonFileUtil.getInstance().getJythonPath() 
if path not in sys.path: 
    sys.path.append(path)

from com.quisapps.jira.jss.jython import JythonUtil 
path = JythonUtil.getJythonPath() 
if path not in sys.path:  
    sys.path.append(path)

and there is my new script that I try to execute :

summary = parameters['summary'][0]
if summary.find('OMG')=>0:
        result=False
        description = u'Ururu'
        invaild_fields['summary'] = description

I have tried "Reinstall everything" in Plugins - Scripting Suite section, but it's doesn't help.

Also if need, there is error in catalina.out

enter image description here

Nuwan
  • 1,226
  • 1
  • 14
  • 38
Just Me
  • 133
  • 1
  • 11
  • I'm not able to answer your question, but not doing that might be a good idea. `setdefaultencoding` is not recommended. http://stackoverflow.com/questions/28657010/dangers-of-sys-setdefaultencodingutf-8 – tripleee Jul 30 '15 at 03:49

2 Answers2

2

Try to reinstall jython. Get the .jar file from official site : http://www.jython.org/downloads.html

Kostia Skrypnyk
  • 560
  • 6
  • 13
0

Try to reinstall Jira Scripting Suite:

  1. Go to Administration page.
  2. Under Scripting Suite section select JSS installer
  3. Click Reinstall everything

If it will not help - reinstall Scripting Suite for JIRA add-on

m.myalkin
  • 1,128
  • 1
  • 10
  • 18