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!
Community moderators have prevented the ability to post new answers.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea how i could find out what my "." is in this context? im not sure about that
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.