Uploaded image for project: 'JIRA Software Server (including JIRA Agile)'
  1. JIRA Software Server (including JIRA Agile)
  2. JSWSERVER-14884

Dev status admin page shows error with projectKey undefined in soy template

    Details

    • Symptom Severity:
      Minor

      Description

      NOTE: This bug report is for JIRA Software Server. Using JIRA Software Cloud? See the corresponding bug report.

      Accessing the ConfigureDevStatus page on the Summit demo instance: http://summitdemo.dyn.syd.atlassian.com:2430/jira/secure/ConfigureDevStatus.jspa?projectKey=TIS gives an error page with the following exception:

      com.google.template.soy.tofu.SoyTofuException: In template JIRA.Templates.DevStatus.Admin.projectAdminPage: In 'print' tag, expression "$projectKey" 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:722)
      

      Following some troubleshooting, it was found that the root cause is the following exception:

      java.lang.IllegalArgumentException: java.lang.IllegalAccessException: Class com.atlassian.jira.webwork.JiraSafeActionParameterSetter can not access a member of class com.atlassian.jira.plugin.devstatus.we
      b.admin.AbstractProjectAdminAction with modifiers "public"
              at com.atlassian.jira.webwork.JiraSafeActionParameterSetter.setActionProperty(JiraSafeActionParameterSetter.java:227)
              at com.atlassian.jira.webwork.JiraSafeActionParameterSetter.setSafeParameters(JiraSafeActionParameterSetter.java:129)
              at com.atlassian.jira.config.webwork.JiraActionFactory$SafeParameterSettingActionFactoryProxy.setActionParameters(JiraActionFactory.java:275)
              at com.atlassian.jira.config.webwork.JiraActionFactory$SafeParameterSettingActionFactoryProxy.getActionImpl(JiraActionFactory.java:162)
              at webwork.action.factory.ChainingActionFactoryProxy.getActionImpl(ChainingActionFactoryProxy.java:53)
              at com.atlassian.jira.config.webwork.JiraActionFactory.getActionImpl(JiraActionFactory.java:353)  <+2> (GenericDispatcher.java:141) (JiraWebworkActionDispatcher.java:152)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      
      Caused by: java.lang.IllegalAccessException: Class com.atlassian.jira.webwork.JiraSafeActionParameterSetter can not access a member of class com.atlassian.jira.plugin.devstatus.web.admin.AbstractProjectAdminAction with modifiers "public"
              at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
              at java.lang.reflect.Method.invoke(Method.java:607)
              at com.atlassian.jira.webwork.JiraSafeActionParameterSetter.setActionProperty(JiraSafeActionParameterSetter.java:208)
              ... 174 more
      

      It appears that JiraActionFactory was trying to call the setter method for projectKey but failed due to IllegalAccessException. In theory, in order to use reflection to invoke a public method, Java requires the class itself to be accessible by the caller. (https://vaadin.com/forum#!/thread/1414726/1416458)

      In our case, AbstractProjectAdminAction, which is the class that owns the setProjectKey method, has default/package access. :|

      Changing the class to public fixed the problem on the summitdemo instance. But we need to figure out why it worked (and still works) on all other instances, including jdog and the jira-fusion OD instances.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  3 years, 39 weeks, 6 days ago