Error while running change password script - JIRA Jelly Runner

I am trying to get a Jelly script running but I am getting the following error:

XML script invalid.
Extra Information: [hide]

Exception: org.xml.sax.SAXException: could not find namespace with prefix core
java.io.PrintWriter@3a7b59e4
This is the jelly script I am using:
<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib">
<!--
    Add your own Jelly XML here
    For documentation on the JIRA tag library see:
    http://www.atlassian.com/software/jira/docs/latest/jelly.html
-->

xmlns:core="jelly:core" xmlns:log="jelly:log" xmlns:util="jelly:util" >
<jira:Login username="t_user2" password="apple">

    <core:invokeStatic className="com.atlassian.jira.component.ComponentAccessor" method="getUserManager" var="userManager"/>
    <core:invokeStatic className="com.atlassian.jira.component.ComponentAccessor" method="getUserUtil" var="userUtil"/>

    <core:invoke on="${userManager}" method="getUser" var="user">
    <core:arg type="java.lang.String" value="t_user2"/>
    
    </core:invoke>
    <core:invoke on="${userUtil}" method="changePassword">
    <core:arg type="com.atlassian.crowd.embedded.api.User" value="${user}"/>
    <core:arg type="java.lang.String" value="orange"/>
    </core:invoke>
</jira:Login>


</JiraJelly>

Can someone help me figure out what might be the issue?

Thanks!

3 answers

1 accepted

This widget could not be displayed.

try with this script

<JiraJelly 
xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib"
xmlns:core="jelly:core" xmlns:log="jelly:log"
xmlns:util="jelly:util" >

<jira:Login username="t_user2" password="apple"> 
    <core:invokeStatic className="com.atlassian.jira.component.ComponentAccessor" method="getUserManager" var="userManager"/>
    <core:invokeStatic className="com.atlassian.jira.component.ComponentAccessor" method="getUserUtil" var="userUtil"/>
 
    <core:invoke on="${userManager}" method="getUserByName" var="user">
    <core:arg type="java.lang.String" value="t_user2"/>
     
    </core:invoke>
    <core:invoke on="${userUtil}" method="changePassword">
    <core:arg type="com.atlassian.crowd.embedded.api.User" value="${user}"/>
    <core:arg type="java.lang.String" value="orange"/>
    </core:invoke>
</jira:Login>
  
</JiraJelly>

Hi,

I ran the entire the entire script u suggested, but still got the same error.

I started debugging now:

After running the first few lines I am getting this error :

Error: <JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:core="jelly:core" xmlns:log="jelly:log" xmlns:util="jelly:util">
Exception: org.apache.commons.jelly.JellyTagException: null:10:0: No such accessible method: getUserByName() on object: com.atlassian.jira.user.util.DefaultUserManager
java.io.PrintWriter@54e0af8d

&lt;JiraJelly
xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib"
xmlns:core="jelly:core" xmlns:log="jelly:log"
xmlns:util="jelly:util"
&gt;

&lt;jira:Login username="t_user1" password="apple"&gt;
  &lt;core:invokeStatic className="com.atlassian.jira.component.ComponentAccessor" method="getUserManager" var="userManager"/&gt;
  &lt;core:invokeStatic className="com.atlassian.jira.component.ComponentAccessor" method="getUserUtil" var="userUtil"/&gt;  
  &lt;core:invoke on="${userManager}" method="getUserByName" var="user"/&gt;  

&lt;/jira:Login&gt;

&lt;/JiraJelly&gt;

Thanks! This works :D

Glad to hear it works !!!

This widget could not be displayed.

please, how to edit and change email's user with jelly runner?

This widget could not be displayed.

Hi, I am getting the same error even after changing it to getUserByName.

I think you misclosed the JiraJelly tag at the top. It should be continuous as

<JiraJellyxmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib"
<!

xmlns:core="jelly:core" xmlns:log="jelly:log" xmlns:util="jelly:util" >
shift the comment lines to top of the document.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

281 views 5 0
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