Jelly Runner error

Samir Freelance
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.
July 7, 2011

I am trying to use jelly runner to import attachement files

i am getting this message error

Could not read script string.
Extra Information: [hide]

Exception: java.io.IOException: could not find 59
java.io.PrintWriter@9017ca
<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib">
<jira:AttachFile key="SOI-819" filepath="e:/rd/rd/WWW-0988_28012008_S2_deactivation test 28Jan08.ppt" option="add"/>
<jira:AttachFile key="SOI-819" filepath="e:/rd/rd/WWW-0988_30012008_S2-desactivation 30thJan08.ppt" option="add"/>
<jira:AttachFile key="SOI-819" filepath="e:/rd/rd/WWW-0988_21012008_S2_feedback pending tasks implement 21Jan08.ppt" option="add"/>
</JiraJelly>

4 answers

1 accepted

0 votes
Answer accepted
Radu Dumitriu
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.
July 7, 2011

1. The Jelly parser do not like hard returns (CRLF - \r\n) if they appear in the script. At least, for me, some time ago, it gave errors like these. So, if you are on linux, do a dos2unix first.

2. You still have to escape everything, it's a XML document so you will have to conform to its schema. Use HTML escapes, like &amp; instead of simple '&', etc.

1 vote
justindowning
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.
July 7, 2011

Your Windows file names are incorrect. You need to use the backslah instead:

e:\rd\rd\WWW-0988_28012008_S2_deactivation test 28Jan08.ppt
Samir Freelance
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.
July 7, 2011

it is working with forward / and \

but i think the problem in some line ?!

i generated from sql

SELECT '<jira:AttachFile key="' + CONVERT(nvarchar(50), jiraschema.jiraissue.pkey) +'" filepath="e:\rd\rd\' + TestSam.Doc + '" option="add"/>'
FROM TestSam INNER JOIN
jiraschema.jiraissue ON TestSam.Request = jiraschema.jiraissue.SUMMARY


0 votes
Betsy Walker
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.
July 7, 2011

The "could not find 59" error occurs when your script, as Radu explained, doesn't escape special characters.

As the Jelly Tags doc (http://confluence.atlassian.com/display/JIRA/Jelly+Tags) says:

  • ampersands must be specifed as &amp;
  • apostrophe/single quote (') must be specified as &apos;
  • double quote (") must be specified as &quot;
  • less than (<) must be specified &lt;
  • greater than (>) must be specified as &gt;

Betsy

<th class="confluenceTh"> </th><th class="confluenceTh"> </th>
0 votes
Samir Freelance
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.
July 7, 2011

I am using Windows server 2003

I am trying to run all this

<jira:AttachFile key="SOI-819" filepath="e:\rd\rd\WWW-0988_28012008_S2_deactivation test 28Jan08.ppt" option="add"/>
<jira:AttachFile key="SOI-819" filepath="e:\rd\rd\WWW-0988_30012008_S2-desactivation 30thJan08.ppt" option="add"/>
<jira:AttachFile key="SOI-819" filepath="e:\rd\rd\WWW-0988_21012008_S2_feedback pending tasks implement 21Jan08.ppt" option="add"/>
<jira:AttachFile key="SOI-2167" filepath="e:\rd\rd\KBI-2430_22032011_15 min overview last node.jpg" option="add"/>

i was trying this alone

<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib">
<jira:AttachFile key="SOI-242" filepath="c:/18072007_FWA in S&C.ppt" option="override"/>
</JiraJelly>

it gave me the same error


Could not read script string.

Extra Information: [hide]
Exception: java.io.IOException: could not find 59
java.io.PrintWriter@176d5d3

Radu Dumitriu
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.
July 7, 2011

That's what I told you. You cannot add per se an &. (like in S&C). Escape it!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events