Today I installed latest SDK and I am able to compile our custom plugins. When I run on my local environment I am getting tons of errors. I see most of the errors are related to .vm files. Can someone help me please??
[INFO] [talledLocalContainer] 2013-06-13 17:33:14,418 http-bio-2990-exec-10 ERROR admin 1053x731x1 fo6h5g 10.105.180.29 /secure/AdminAction.jspa [velocity] Left side of addition operation is not a valid type. Currently only integers (1,2,3...) and Integer type is supported. admin.vm [line 86, column 51
[INFO] [talledLocalContainer] 2013-06-13 17:33:14,418 http-bio-2990-exec-10 ERROR admin 1053x731x1 fo6h5g 10.105.180.29 /secure/AdminAction.jspa [velocity] Left side ( "-" ) of addition operation has null value. Operation not possible. admin.vm [line 86, column 57]
[INFO] [talledLocalContainer] 2013-06-13 17:33:14,436 http-bio-2990-exec-10 ERROR admin 1053x731x1 fo6h5g 10.105.180.29 /secure/AdminAction.jspa [velocity] Left side ( $vn ) of addition operation has null value. Operation not possible. admin.vm [line 86, column 63]
[INFO] [talledLocalContainer] 2013-06-13 17:33:14,436 http-bio-2990-exec-10 ERROR admin 1053x731x1 fo6h5g 10.105.180.29 /secure/AdminAction.jspa [velocity] RHS of #set statement is null. Context will not be modified. admin.vm [line 86, column 26]
[INFO] [talledLocalContainer] 2013-06-13 17:33:14,440 http-bio-2990-exec-10 WARN admin 1053x731x1 fo6h5g 10.105.180.29 /secure/AdminAction.jspa [velocity] org.apache.velocity.runtime.exception.ReferenceException: reference : template = admin.vm [line 87,column 50] : $id is not a valid reference.
[INFO] [talledLocalContainer] at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:277)
[INFO] [talledLocalContainer] at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)
[INFO] [talledLocalContainer] at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:166)
[INFO] [talledLocalContainer] at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114)
[INFO] [talledLocalContainer] at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)
[INFO] [talledLocalContainer] at org.apache.velocity.Template.merge(Template.java:256)
[INFO] [talledLocalContainer] at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:422)
[INFO] [talledLocalContainer] at com.atlassian.velocity.DefaultVelocityManager.getEncodedBody(DefaultVelocityManager.java:77)
[INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webwork.JiraPluginWebworkVelocityServlet.service(JiraPluginWebworkVelocityServlet.java:57)
[INFO] [talledLocalContainer] at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[INFO] [talledLocalContainer] at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)
[INFO] [talledLocalContainer] at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66)
[INFO] [talledLocalContainer] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25)
[INFO] [talledLocalContainer] at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74)
[INFO] [talledLocalContainer] at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42)
[INFO] [talledLocalContainer] at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)
[INFO] [talledLocalContainer] at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)
Community moderators have prevented the ability to post new answers.
Updated atlassian sdk and restarted the server. Now the issue was resolved.
Srinivas
So this is a custom vm file? You have errors in it for sure at least in regards to $id?
$id is not a valid reference.
I would check that all your variables are actually available to the velocity context (Or change them to $!id so they go to null?)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes this vm file was working before I upgraged atlassian SDK 4.2.1. Yes all the variables are available to velocity context.
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'll have to post some of the vm file for us to help you further
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the sample vm code. It worked before I updaded the SDK version 4.0 and tested on JIRA 4.4.5 and 5.2.5 versions
<table class="aui aui-table-rowhover" id="project-config-versions-table" > <thead> <tr> <th>&nbsp</th> <th>$i18n.getText('version.label')</th> <th>$i18n.getText('qualifier.label')</th> <th>$i18n.getText('release.date.label')</th> <th>$i18n.getText('code.freeze.date.label')</th> <th>$i18n.getText('feature.complete.date.label')</th> <!--<th>$i18n.getText('confluence.url.label')</th>--> <th>&nbsp</th> </tr> </thead> <tbody> #set ($projectKey = $action.projectKey) #foreach ($versionName in $action.versions) #set ($vn = $versionName.replace(' ','-')) #set ($formid = $projectKey + "-" + $vn) <tr class="jira-restfultable-row jira-restfultable-readonly"> <td>&nbsp;</td> <td class="project-config-version-name"><a href="/plugins/servlet/xproduct/releaseinfo?version=$versionName&strProjectKey=$projectKey&flag=details">$versionName</a></td> #set ($id = $projectKey + "-" + $vn + "-qualifier") <td><select name=$id id=$id class="select"/></td> <td> #set ($id = $projectKey + "-" + $vn + "-releasedate") #set ($divid = $id + "-div") #set ($triggerid = $id + "-trigger") <div class="project-config-date-field" id=$divid> <input id=$id name=$id type="text" class="text short-field" value="" title="Select a date" /> <a href="#" id=$triggerid title="Select a date"> <span class="aui-icon icon-date">Select a date</span></a> </div> </td> <td><input type="button" class="button" value="Save" id=$formid></td> </tr> #set ($id = $projectKey + "-" + $vn + "-version") <input type="hidden" id=$id value=$versionName /> #end </tbody> </table>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
got tons of similar exceptions while loading this vm file.
2013-06-13 22:56:34,378 http-bio-2990-exec-5 ERROR admin 1376x719x1 1ytwv50 10.98.39.62 /secure/AdminAction.jspa [velocity] Left side of addition operation is not a valid type. Currently only integers (1,2,3...) and Integer type is supported. admin.vm [line 86, column 51] 2013-06-13 22:56:34,379 http-bio-2990-exec-5 ERROR admin 1376x719x1 1ytwv50 10.98.39.62 /secure/AdminAction.jspa [velocity] Left side ( "-" ) of addition operation has null value. Operation not possible. admin.vm [line 86, column 57] 2013-06-13 22:56:34,379 http-bio-2990-exec-5 ERROR admin 1376x719x1 1ytwv50 10.98.39.62 /secure/AdminAction.jspa [velocity] Left side ( $vn ) of addition operation has null value. Operation not possible. admin.vm [line 86, column 63] 2013-06-13 22:56:34,389 http-bio-2990-exec-5 ERROR admin 1376x719x1 1ytwv50 10.98.39.62 /secure/AdminAction.jspa [velocity] RHS of #set statement is null. Context will not be modified. admin.vm [line 86, column 26] 2013-06-13 22:56:34,390 http-bio-2990-exec-5 WARN admin 1376x719x1 1ytwv50 10.98.39.62 /secure/AdminAction.jspa [velocity] org.apache.velocity.runtime.exception.ReferenceException: reference : template = admin.vm [line 87,column 50] : $id is not a valid reference. at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:277) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:166) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Colin, Any update please..
-Srinivas
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.
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.