SoyTofuException error when viewing a project or issue in Jira server

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

After clicking in a project or to view an issue details, the following error message is displayed: 

Error pasted:

Technical details
Log's referral number: dcf50448-c2a7-496f-97cd-0b03ab6c895f
Cause
Referer URL: http://xxx:8080/secure/Dashboard.jspa
com.google.template.soy.tofu.SoyTofuException: In template JIRA.Templates.Projects.browseTabs: In 'print' tag, expression "$projectAvatarUrl" evaluates to undefined.
com.google.template.soy.tofu.SoyTofuException: In template JIRA.Templates.Projects.browseTabs: In 'print' tag, expression "$projectAvatarUrl" evaluates to undefined.
at com.google.template.soy.tofu.internal.BaseTofu.renderMainHelper(BaseTofu.java:341)
at com.google.template.soy.tofu.internal.BaseTofu.renderMain(BaseTofu.java:300)
at com.google.template.soy.tofu.internal.BaseTofu.access$100(BaseTofu.java:56)
at com.google.template.soy.tofu.internal.BaseTofu$RendererImpl.render(BaseTofu.java:427)
at com.atlassian.soy.impl.DefaultSoyManager.render(DefaultSoyManager.java:111)
at com.atlassian.soy.impl.SoyTemplateRendererImpl.render(SoyTemplateRendererImpl.java:40)
at com.atlassian.soy.impl.SoyTemplateRendererImpl.render(SoyTemplateRendererImpl.java:33)
at com.atlassian.jira.web.dispatcher.JiraSoyViewDispatcher.dispatch(JiraSoyViewDispatcher.java:36)
at com.atlassian.jira.web.dispatcher.JiraWebworkViewDispatcher.dispatchViaSoyView(JiraWebworkViewDispatcher.java:148)
at com.atlassian.jira.web.dispatcher.JiraWebworkViewDispatcher.dispatchView(JiraWebworkViewDispatcher.java:65)
at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:204)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

Diagnosis

The message above is an error thrown while rendering the soy template, which is a symptom of a deeper cause. Look in the atlassian-jira.log file for the root cause, which is likely to be a different error message. For example, one plugin throws:

2014-09-08 16:28:11,565 ajp-bio-8009-exec-80 ERROR admin.username 988x18247x1 2j0e3j 70.53.43.212 /browse/PROJECTKEY [jira.projects.web.BrowseProject] Something went wrong getting context for currently selected browse project tab
java.lang.IllegalArgumentException: PermissionType passed to this function must NOT be a global permission, 0 is global
	at com.atlassian.jira.security.DefaultPermissionManager.getNonGlobalKey(DefaultPermissionManager.java:521)
	at com.atlassian.jira.security.DefaultPermissionManager.hasPermission(DefaultPermissionManager.java:222)
	at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:132)
	at sun.reflect.GeneratedMethodAccessor339.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:83)
	at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
	at com.sun.proxy.$Proxy32.hasPermission(Unknown Source)
	at com.lbcg.jira.plugins.bulkclone.BulkClone.showPanel(BulkClone.java:98)
	at com.atlassian.jira.projects.web.BrowseProject.isTabPanelHidden(BrowseProject.java:257)

In this case, this is an error in the Bulk Clone add-on. The text 'admin.username' and the project /browse/PROJECTKEY are good keys to search for in your logs. Search your logs for the project key or username that is experiencing the problem to find the right error message.

Causes and Resolution

Possible CauseResolution Steps
The exception statement: com.google.template.soy.tofu.SoyTofuException: In template JIRA.Templates.Projects.browseTabs: In 'print' tag, expression "$projectAvatarUrl" evaluates to undefined. Indicates a problem with how the pages in JIRA are being rendered, which is what causes the exception. It seems like it is occurring when attempting to display the Avatar.
  1. If you have upgraded JIRA recently, navigate to Administration > Plugins > Manage Add-ons to check and update add-ons to compatible versions.
  2. Enable Safe Mode, which will disable all user plugins to isolate whether the problem might be caused by one of them. To Enable Safe Mode you need to navigate to Administration > Plugins > Manage Add-ons and click on the link Enable Safe Mode. If disabling the plugins resolves the problem, enable the plugins one by one to discover which one is the culprit (or use a binary search).
Running a 32-bit JVM on 64-bit machine.
  1. Check the Java version: The Java version could be found using the command "java -version" taking care that the java is the same used by JIRA.
  2. Check the OS Version.
    • On Linux, try "uname -a" to find whether the OS is 32 or 64-bit.
    • On Windows, you could check System Information.
  3. If required, upgrade the JVM used with JIRA to use 64-bit instead using the Installing Java and/or How to Use System JRE Instead of Embedded JRE guides.
A malformed JAVA_OPTS may also cause this problem.
  • JAVA_OPTS could be configured either as an Environment Variable or in JIRA Installation Directory/bin/setenv.sh (for Linux) or JIRA Installation Directory/bin/setenv.bat (Windows).
  • Revert any changes you may have done to the JAVA_OPTS variable and restart the application.
Index corruption
A re-index will lock down the JIRA and prevent users from using JIRA. Please keep this in mind when following these steps to resolve this issue - depending on the size of the instance a downtime window may require scheduling. With the release of JIRA 5.2, an option to perform a background re-index was implemented, but it is advised you use the Lock JIRA and perform a re-index in this scenario. See this page for more details: Search Indexing
  • Perform a full reindex of JIRA through the Adminsitration section. (Full reindex functionality will delete the corrupted indexes before reindexing.)

Last modified on Sep 25, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.