I am trying to get a Jelly script running but I am getting the following error:
XML script invalid.
Extra Information: [hide]
<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!
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
<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_user1" 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"/>
</jira:Login>
</JiraJelly>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to hear it works !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please, how to edit and change email's user with jelly runner?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you try getUserByName as Renjith suggested in https://answers.atlassian.com/questions/108828/script-to-change-passwords-for-existing-users
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I am getting the same error even after changing it to getUserByName.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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" >You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.