Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

#parse with absolute path does not work

Jens Kisters __SeibertSolutions
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.
June 8, 2016

I am in the context of a JETI template.

I want to include a file this is outside the JIRA home directory

I try this:

    #parse("/var/atlassian/custom/jira/templates/email/basis_nachricht.vm")

I get this error:

An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: ------- org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/var/atlassian/custom/jira/templates/email/basis_nachricht.vm' at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:483) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354) at 

...

 

Things i checked so far:

The file is definately readable for my JIRA user.

The path is definately correct.

Any clues? Thanks in Advance!

5 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Jens Kisters __SeibertSolutions
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.
June 9, 2016

The only solution i found was placing the files inside the 

/opt/atlassian/jira/atlassian-jira/WEB-INF/classes/templates/email/html/includes

WITHOUT using symlinks.

I am uncertain if this construct will survive a JIRA update

0 votes
Jens Kisters __SeibertSolutions
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.
June 9, 2016

I think its not possible to break out of the WEB-INF folder, using relative paths that work on the shell level logged in as the JIRA user just cause this error:

An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: ------- java.lang.IllegalArgumentException: The resource path [/WEB-INF/classes/../../../../../../var/atlassian/custom/jira/templates/email/basis_nachricht.vm] has been normalized to [null] which is not valid at org.apache.catalina.webresources.StandardRoot.validate(StandardRoot.java:265) at 

0 votes
Jens Kisters __SeibertSolutions
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.
June 9, 2016

Judging from the error message when trying to include something this seems to the WEB-INF/classes folder, in my case 

/opt/atlassian/jira/atlassian-jira/WEB-INF/classes

0 votes
Jens Kisters __SeibertSolutions
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.
June 8, 2016

Any idea how i could find out what my "." is in this context? im not sure about that

0 votes
Tomasz Stec
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.
June 8, 2016

i am not 100% sure but you probably need to provide relative path... i am also curious about it. If i were you i would try an path relative to JIRA bin or to jar that contains #parse macro.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events