Adding license support to plugin problem

nsacerdote October 1, 2013

I have followed the tutorial provided by attlassian and also read this page. But I can't make the license support to work in my plugin. After modifying the atlassian-plugin.xml and the pom.xml files, Jira still starts but my plugin is disabled and these are the errors I found:

When entering UPM:

WARN admin 641x827x3 16ww3iu 192.168.178.21 /rest/plugins/1.0/pac-status [atlassian.upm.pac.PacClientImpl] Unable to determine whether PAC is reachable
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NoSuchMethodError: com.sun.jersey.core.spi.component.ProviderServices.<init>(Lcom/sun/jersey/core/spi/factory/InjectableProviderFactory;Lcom/sun/jersey/core/spi/component/ProviderFactory;Ljava/util/Set;Ljava/util/Set;)V
  at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:148)
  at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:111)
...
Caused by: java.lang.NoSuchMethodError: com.sun.jersey.core.spi.component.ProviderServices.<init>(Lcom/sun/jersey/core/spi/factory/InjectableProviderFactory;Lcom/sun/jersey/core/spi/component/ProviderFactory;Ljava/util/Set;Ljava/util/Set;)V
  at com.sun.jersey.api.client.Client.<init>(Client.java:165)
  at com.sun.jersey.client.apache.ApacheHttpClient.<init>(ApacheHttpClient.java:109)
  at com.sun.jersey.client.apache.ApacheHttpClient.<init>(ApacheHttpClient.java:95)
...

Then I get this error with the same exception:

ERROR admin 641x825x1 16ww3iu 192.168.178.21 /rest/plugins/1.0/product-version [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service

When trying to enable my plugin:

WARN admin 648x843x1 16ww3iu 192.168.178.21 /rest/plugins/1.0/pac-details-link/es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin/1.0 [upm.rest.resources.PacPluginDetailsResource] Could not get the plugin version from PAC (es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin, 1.0): com.atlassian.plugins.PacException: com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NoSuchMethodError: com.sun.jersey.core.spi.component.ProviderServices.<init>(Lcom/sun/jersey/core/spi/factory/InjectableProviderFactory;Lcom/sun/jersey/core/spi/component/ProviderFactory;Ljava/util/Set;Ljava/util/Set;)V
Spring executor 19 ERROR admin 648x847x1 16ww3iu 192.168.178.21 /rest/plugins/1.0/es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin-key [plugin.osgi.factory.OsgiPlugin] Unable to start the Spring context for plugin es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tx-processor' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.activeobjects.external.ActiveObjects]: : Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]
  at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591)
...
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]
  at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)
...
Caused by: java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]
  at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
...
Spring executor 19 ERROR admin 648x847x1 16ww3iu 192.168.178.21 /rest/plugins/1.0/es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin-key [extender.internal.activator.ContextLoaderListener] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tx-processor' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.activeobjects.external.ActiveObjects]: : Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]
  at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591)
...
Exception in thread "Spring executor 19" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tx-processor' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.activeobjects.external.ActiveObjects]: : Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]
...
INFO admin 648x847x1 16ww3iu 192.168.178.21 /rest/plugins/1.0/es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin-key [atlassian.plugin.util.WaitUntil] Plugins that have yet to be enabled: [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin], 31 seconds remaining
INFO admin 648x847x1 16ww3iu 192.168.178.21 /rest/plugins/1.0/es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin-key [atlassian.plugin.util.WaitUntil] Plugins that have yet to be enabled: [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin], 30 seconds remaining
ERROR admin 648x847x1 16ww3iu 192.168.178.21 /rest/plugins/1.0/es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin-key [atlassian.plugin.manager.PluginEnabler] Unable to start the following plugins due to timeout while waiting for plugin to enable: es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin

If I try to enable it again, I get:

Spring executor 21 ERROR admin 657x850x1 16ww3iu 192.168.178.21 /rest/plugins/1.0/es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin-key [plugin.osgi.factory.OsgiPlugin] Unable to start the Spring context for plugin es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tx-processor' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.activeobjects.external.ActiveObjects]: : Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]
  at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591)
...
Exception in thread "Spring executor 21" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tx-processor' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.activeobjects.external.ActiveObjects]: : Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl] for bean with name 'thirdPartyPluginLicenseStorageManager' defined in URL [bundle://111.0:0/META-INF/spring/atlassian-plugins-components.xml]; nested exception is java.lang.ClassNotFoundException: com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl not found from bundle [es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin]
  at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591)

[pom.xml]

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>es.edataunited.supportSystemJiraPlugin</groupId>
    <artifactId>supportSystemJiraPlugin</artifactId>
    <version>1.0</version>
    <organization>
        <name>edataunited S.L.</name>
        <url>http://www.edataunited.es/</url>
    </organization>
    <name>supportSystemJiraPlugin</name>
    <description>This is the Support System Jira Plugin for Atlassian JIRA.</description>
    <packaging>atlassian-plugin</packaging>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>velocity-tools</groupId>
            <artifactId>velocity-tools</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-mail-plugin</artifactId>
            <version>6.0.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.mail</groupId>
            <artifactId>atlassian-mail</artifactId>
            <version>2.5.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.7</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <version>${ao.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <version>2.7.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.collections</groupId>
            <artifactId>google-collections</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>plugin-license-storage-lib</artifactId>
            <version>${upm.license.compatibility.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>plugin-license-storage-plugin</artifactId>
            <version>${upm.license.compatibility.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>licensing-api</artifactId>
            <version>${upm.license.compatibility.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>upm-api</artifactId>
            <version>${upm.license.compatibility.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <version>${atlassian.templaterenderer.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-core</artifactId>
            <version>1.1.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.8.5</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jira-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.version}</productDataVersion>
                    <useFastdevCli>false</useFastdevCli>
                    <systemPropertyVariables>
                        <atlassian.mail.senddisabled>false</atlassian.mail.senddisabled>
                        <atlassian.mail.fetchdisabled>false</atlassian.mail.fetchdisabled>
                    </systemPropertyVariables>
                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.activeobjects</groupId>
                            <artifactId>activeobjects-plugin</artifactId>
                            <version>${ao.version}</version>
                        </pluginArtifact>
                        <pluginArtifact>
                            <groupId>com.atlassian.activeobjects</groupId>
                            <artifactId>activeobjects-jira-spi</artifactId>
                            <version>${ao.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>
                    <instructions>
                        <Private-Package>com.atlassian.upm.license.storage.lib*</Private-Package>
                        <DynamicImport-Package>com.atlassian.upm.api.license.entity;version="2.0.1", com.atlassian.upm.api.license;version="2.0.1", com.atlassian.upm.api.util;version="2.0.1", com.atlassian.upm.license.storage.plugin;version="${upm.license.compatibility.version}"</DynamicImport-Package>
                    </instructions>
                    <bundledArtifacts>
			            <bundledArtifact>
			                <groupId>com.atlassian.upm</groupId>
			                <artifactId>atlassian-universal-plugin-manager-plugin</artifactId>
			                <version>1.6.3</version>
			            </bundledArtifact>                        
                        <bundledArtifact>
                            <groupId>com.atlassian.upm</groupId>
                            <artifactId>plugin-license-storage-plugin</artifactId>
                            <version>${upm.license.compatibility.version}</version>
                        </bundledArtifact>
                    </bundledArtifacts>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Plugin-name>${project.name}</Plugin-name>
                            <Plugin-version>${project.version}</Plugin-version>
                            <Organization-name>${project.organization.name}</Organization-name>
                            <Organization-url>${project.organization.url}</Organization-url>
                            <Description>${project.description}</Description>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-storage-plugin</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                            <includeArtifactIds>plugin-license-storage-plugin</includeArtifactIds>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>
    <properties>
        <jira.version>5.2.7</jira.version>
        <amps.version>4.1.6</amps.version>
        <ao.version>0.19.7</ao.version>
<upm.license.compatibility.version>2.13.2</upm.license.compatibility.version> <atlassian.templaterenderer.version>1.4.3</atlassian.templaterenderer.version> </properties> </project>

[atlassian-plugin.xml]

...
  &lt;component-import key="i18nResolver" interface="com.atlassian.sal.api.message.I18nResolver"/&gt;
  &lt;component-import key="applicationProperties" interface="com.atlassian.sal.api.ApplicationProperties"/&gt;
...
  &lt;component-import key="pluginAccessor" interface="com.atlassian.plugin.PluginAccessor"/&gt;
  &lt;component-import key="pluginController" interface="com.atlassian.plugin.PluginController"/&gt;
  &lt;component-import key="txTemplate" interface="com.atlassian.sal.api.transaction.TransactionTemplate"/&gt;
  &lt;component-import key="templateRenderer" interface="com.atlassian.templaterenderer.TemplateRenderer"/&gt;
  &lt;component-import key="pluginSettingsFactory" interface="com.atlassian.sal.api.pluginsettings.PluginSettingsFactory"/&gt;
  &lt;component-import key="loginUriProvider" interface="com.atlassian.sal.api.auth.LoginUriProvider"/&gt;
  &lt;component-import key="userManager" interface="com.atlassian.sal.api.user.UserManager"/&gt;  
...
  &lt;component key="thirdPartyPluginLicenseStorageManager" class="com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManagerImpl"/&gt;
  &lt;component key="pluginLicenseStoragePluginInstaller" class="com.atlassian.upm.license.storage.lib.PluginLicenseStoragePluginInstaller"/&gt;
  &lt;component key="atlassianMarketplaceUriFactory" class="com.atlassian.upm.license.storage.lib.AtlassianMarketplaceUriFactoryImpl"/&gt;
...
  &lt;servlet name="License Servlet" i18n-name-key="license-servlet.name" key="license-servlet" class="es.edataunited.supportSystemJiraPlugin.servlet.LicenseServlet"&gt;
     &lt;description key="license-servlet.description"&gt;The License Servlet Plugin&lt;/description&gt;
     &lt;url-pattern&gt;/es.edataunited.supportSystemJiraPlugin.supportSystemJiraPlugin/license&lt;/url-pattern&gt;
  &lt;/servlet&gt;
...

I think that atlassian-plugin.xml is probably fine, but I'm not very sure about pom.xml, specially the versions:

...
        &lt;groupId&gt;com.atlassian.sal&lt;/groupId&gt;
	&lt;artifactId&gt;sal-api&lt;/artifactId&gt;
	 &lt;version&gt;2.7.0&lt;/version&gt;
	&lt;scope&gt;provided&lt;/scope&gt;
...
        &lt;jira.version&gt;5.2.7&lt;/jira.version&gt;
        &lt;amps.version&gt;4.1.6&lt;/amps.version&gt;
        &lt;ao.version&gt;0.19.7&lt;/ao.version&gt;
        &lt;upm.license.compatibility.version&gt;2.13.2&lt;/upm.license.compatibility.version&gt;
        &lt;atlassian.templaterenderer.version&gt;1.4.3&lt;/atlassian.templaterenderer.version&gt;
...

I would appreciate any help.

Regards

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

5 votes
Answer accepted
nsacerdote November 5, 2013

I still have to make further testing but I think I finally got it! These are the versions used in pom.xml to make it work. I also needed to add a dependency "com.atlassian.usercompatibility:usercompatibility-sal"

&lt;dependency&gt;
    &lt;groupId&gt;com.atlassian.sal&lt;/groupId&gt;
    &lt;artifactId&gt;sal-api&lt;/artifactId&gt;
    &lt;version&gt;2.8.0&lt;/version&gt;
    &lt;scope&gt;provided&lt;/scope&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.atlassian.usercompatibility&lt;/groupId&gt;
    &lt;artifactId&gt;usercompatibility-sal&lt;/artifactId&gt;
    &lt;version&gt;0.5&lt;/version&gt;
&lt;/dependency&gt;
&lt;properties&gt;
    &lt;jira.version&gt;5.2.7&lt;/jira.version&gt;
   &lt;amps.version&gt;4.2.10&lt;/amps.version&gt;
   &lt;ao.version&gt;0.19.7&lt;/ao.version&gt;
   &lt;upm.license.compatibility.version&gt;2.14&lt;/upm.license.compatibility.version&gt;
   &lt;atlassian.templaterenderer.version&gt;1.0.5&lt;/atlassian.templaterenderer.version&gt;
&lt;/properties&gt;

I had also to modify atlassian-plugin.xml, adding a component:

&lt;component key="compatibilityUserManager" class="com.atlassian.sal.usercompatibility.impl.CompatibilityUserManager" /&gt;

Finnally I performed the following commands/actions:

atlas-clean
atlas-mvn eclipse:eclipse
atlas-package
check that usercompatibility and ThirdPartyPluginLicenseStorageManagerImpl classes are inside the generated .jar
atlas-run

It was useful to resolve this problem:

3 votes
George Dinkov _Botron_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 9, 2013

Hi,

Looking at the upm compatibility version, I think it may be problematic that you compile against a later version than what is bundled with your JIRA version. Have you tried using upm.license.compatibility.version 2.7.10. Reference: https://ecosystem.atlassian.net/wiki/display/UPM/UPM+Bundling+Matrix

Also looking at the POM I'm not sure why you need the maven-jar-plugin as the build will package a jar? I don't think this should be a problem though, but it seems redundant.

Here are a few more links that may help you find a solution if this doesn't help:

https://developer.atlassian.com/display/MARKET/Understanding+the+Generated+License+API+Support

https://answers.atlassian.com/questions/73136/why-do-customers-get-a-classnotfoundexception-for-pluginlicensestoragemanager-when-using-our-plugin

Regards,

George

Eitzenberger Thomas December 22, 2016

Hmm the Building matrix is not visible to me... Confluence says "Not Permitted"

any public link?

2 votes
George Dinkov _Botron_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 4, 2013

Hi there,

You have a typo in the pom.xml on line 78:

&lt;artifactId&gt;plugin-license-storage-lugin&lt;/artifactId&gt;

Should be

&lt;artifactId&gt;plugin-license-storage-plugin&lt;/artifactId&gt;

Regards,

George

nsacerdote October 6, 2013

Hi George,

Thank you for pointing out the typo, but unfortunately it was ok in the real code :(. Anyway, thank you again for your effort!

Regards

TAGS
AUG Leaders

Atlassian Community Events