Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-21430

ValuesGenerator implementations for a Service Plugin point can not be loaded from the plugin's classloader

    XMLWordPrintable

Details

    Description

      Version 2.0 JIRA service plugins cannot access field *Generator's unless the class referenced by the loaded object descriptor has been 'exploded' under <jira-home>/WEB-INF/classes/com/...

      For example, the snippet below shows 2 different Generator's being referenced. The first results in a java.lang.ClassNotFoundException during server startup, the second one works fine. The first one references a custom class located only in the v2.0 plugin jar, the second one is a standard Atlassian class:

      <property>
          <key>project</key>
          <name>Attempt1</name>
          <type>select</type>
          <values class="com.company.jira.services.email.utilities.ProjectValuesGenerator" />
      </property>
      
      
      <property>
          <key>popserver</key>
          <name>admin.service.common.handler.popserver</name>
          <type>select</type>
          <values class="com.atlassian.jira.service.services.mail.MailServersValuesGenerator"/>
      </property>
      

      Once the class com.company.jira.services.email.utilities.ProjectValuesGenerator was copied under <jira home>/WEB-INF/classes/com/company/jira/services/email/utilities/ProjectValuesGenerator the ClassNotFoundException went away.

      also, as an aside, the generator com.atlassian.jira.portal.ProjectValuesGenerator doesn't work, that's why I created my own and got the bug. Has to do with the BUG comment about user being cached somewhere.

      Attachments

        Activity

          People

            Unassigned Unassigned
            a09a4d781816 William Crighton [CCC]
            Votes:
            6 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated: