JSS 2.5.2 and JIRA 7.1.9 - Plugin not woking

hello,

after i updated JIRA and JSS to following script in a transition cannot be executed.

from com.atlassian.jira import ComponentManager
from com.atlassian.jira.security.roles import ProjectRoleManager
result = True
project = issue.getProjectObject()
projectRoleManager = ComponentManager.getComponentInstanceOfType(ProjectRoleManager)
authenticationContext = ComponentManager.getInstance().getJiraAuthenticationContext()
userIsInRoleCustomers = projectRoleManager.isUserInProjectRole(authenticationContext.getUser(), projectRoleManager.getProjectRole("Customers"), project)
userIsInRoleDevelopers = projectRoleManager.isUserInProjectRole(authenticationContext.getUser(), projectRoleManager.getProjectRole("Developers"), project)
issueTypeIsNotSR = issue.getIssueTypeObject().getName() != "Service Request"                
if userIsInRoleCustomers:
	if not userIsInRoleDevelopers:
		if issueTypeIsNotSR:
			result = False
description = "You do not have enough permissions to create this Issue Type! Please select - Service Request -"

JSS Settings:

Global Edit Validation & Postfunction scripts enabled (QuickEdit): No

Global Edit Validation & Postfunction scripts enabled (IssueNav): No

Jython Installed: Yes

Jython Version: 2.5.2

Jython Home Path: /data/jira/home/jss/jython_2.5.2

python.home System Property: /data/jira/home/jss/jython_2.5.2

Base Scripts Installed: Yes

Base Scripts Path: /data/jira/home/jss/jython

 

Error:

2016-08-01 14:47:57,489 http-nio-9001-exec-18 ERROR ad 887x2154x1 1m98szw 172.16.177.197,10.0.0.63 /secure/QuickCreateIssue.jspa [c.q.j.plugin.workflow.JythonValidator] Unrecognized exception while executing Jyphon script: null
Traceback (most recent call last):
File "/data/jira/home/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'

at org.python.core.codecs.lookup(codecs.java:82)
at org.python.core.codecs.setDefaultEncoding(codecs.java:40)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
at org.python.core.PyObject.__call__(PyObject.java:387)
at org.python.core.PyObject.__call__(PyObject.java:391)
at org.python.pycode._pyx2.f$0(/data/jira/home/jss/jython/__init_interpreter__.py:16)
at org.python.pycode._pyx2.call_function(/data/jira/home/jss/jython/__init_interpreter__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1261)
at org.python.core.__builtin__.execfile_flags(__builtin__.java:522)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:225)
at com.quisapps.jira.jss.jython.JythonUtil.getNewInterpreter(JythonUtil.java:70)
at com.quisapps.jira.jss.jython.JythonUtil.getInterpreter(JythonUtil.java:43)
at com.quisapps.jira.plugin.workflow.JythonValidator.validate(JythonValidator.java:29)
at com.atlassian.jira.workflow.SkippableValidator.validate(SkippableValidator.java:45)
at com.opensymphony.workflow.AbstractWorkflow.verifyInputs(AbstractWorkflow.java:1512)
at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1203)
at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:615)
at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:741)
at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:580)
at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:494)
at com.atlassian.jira.bc.issue.DefaultIssueService.create(DefaultIssueService.java:230)
at com.atlassian.jira.bc.issue.DefaultIssueService.create(DefaultIssueService.java:199)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy147.create(Unknown Source)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)
at com.sun.proxy.$Proxy147.create(Unknown Source)
at com.atlassian.jira.quickedit.action.QuickCreateIssue.doExecute(QuickCreateIssue.java:308)
... 1 filtered
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
... 7 filtered
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
... 50 filtered
at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
... 62 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
... 89 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
2016-08-01 14:47:57,493 http-nio-9001-exec-18 ERROR ad 887x2154x1 1m98szw 172.16.177.197,10.0.0.63 /secure/QuickCreateIssue.jspa [c.a.j.bc.issue.DefaultIssueService] Error creating issue:
com.atlassian.jira.exception.CreateException: root cause: Traceback (most recent call last):
File "/data/jira/home/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'

at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:588)
at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:494)
at com.atlassian.jira.bc.issue.DefaultIssueService.create(DefaultIssueService.java:230)
at com.atlassian.jira.bc.issue.DefaultIssueService.create(DefaultIssueService.java:199)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy147.create(Unknown Source)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)
at com.sun.proxy.$Proxy147.create(Unknown Source)
at com.atlassian.jira.quickedit.action.QuickCreateIssue.doExecute(QuickCreateIssue.java:308)
... 1 filtered
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
... 7 filtered
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
... 50 filtered
at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
... 62 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
... 89 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.atlassian.jira.workflow.WorkflowException: root cause: Traceback (most recent call last):
File "/data/jira/home/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'

at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:760)
... 233 more
Caused by: com.opensymphony.workflow.WorkflowException: root cause: Traceback (most recent call last):
File "/data/jira/home/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'

at com.quisapps.jira.plugin.workflow.JythonValidator.validate(JythonValidator.java:89)
at com.opensymphony.workflow.AbstractWorkflow.verifyInputs(AbstractWorkflow.java:1512)
at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1203)
at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:615)
at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:741)
... 234 more
Caused by: Traceback (most recent call last):
File "/data/jira/home/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'

at org.python.core.codecs.lookup(codecs.java:82)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
at org.python.core.PyObject.__call__(PyObject.java:387)
at org.python.core.PyObject.__call__(PyObject.java:391)
at org.python.pycode._pyx2.f$0(/data/jira/home/jss/jython/__init_interpreter__.py:16)
at org.python.pycode._pyx2.call_function(/data/jira/home/jss/jython/__init_interpreter__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1261)
at org.python.core.__builtin__.execfile_flags(__builtin__.java:522)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:225)
at com.quisapps.jira.jss.jython.JythonUtil.getNewInterpreter(JythonUtil.java:70)
at com.quisapps.jira.jss.jython.JythonUtil.getInterpreter(JythonUtil.java:43)
at com.quisapps.jira.plugin.workflow.JythonValidator.validate(JythonValidator.java:29)
... 239 more

 

1 answer

This widget could not be displayed.

In your stacktrace it  points to a codec api call that sets UTF-8 in your script. There may have been a change in how that is done in the new version.

LookupError: no codec search functions registered: can't find encoding 'utf-8'  is telling here. Check if a new dependency is necessary here.

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

201 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you