We are developing a custom plugin which has dependency to jira-tempo plugin. We had dependency problem with jira tempo and overcame with creating our custom plugin as obr. Now we have an error which is annoying us from last 2 weeks. Our module can not enabled because of the error which is at below.
Our pom.xml is:
<dependencies> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-api</artifactId> <version>${jira.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> <dependency> <groupId>com.atlassian.plugins</groupId> <artifactId>atlassian-plugins-osgi-testrunner</artifactId> <version>${plugin.testrunner.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <version>1.8.5</version> <scope>test</scope> </dependency> <dependency> <groupId>org.ofbiz</groupId> <artifactId>ofbcore-share</artifactId> <version>2.1.1</version> </dependency> <dependency> <groupId>com.tempoplugin</groupId> <artifactId>tempoplugin</artifactId> <version>7.6.2</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>2.5.6</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.jira</groupId> <artifactId>jira-tests</artifactId> <version>${jira.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-core</artifactId> <version>${jira.version}</version> <classifier>classes</classifier> <scope>provided</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> <pluginArtifacts> <pluginArtifact> <groupId>com.tempoplugin</groupId> <artifactId>tempoplugin</artifactId> <version>7.6.2</version> </pluginArtifact> </pluginArtifacts> <pluginDependencies> <pluginDependency> <groupId>com.tempoplugin</groupId> <artifactId>tempoplugin</artifactId> </pluginDependency> </pluginDependencies> <instructions> <Import-Package>is.origo.jira.tempo-plugin*;version="7.6.2"</Import-Package> </instructions> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build>
The error is (I removed some logs to make it more readable):
[INFO] [talledLocalContainer] 2013-06-10 11:47:01,101 main ERROR [atlassian.plugin.manager.DefaultPluginManager] There was an error loading the descriptor 'DailyWorklogWebPanel' of plugin 'com.kartaca.tempo'. Disabling.
[INFO] [talledLocalContainer] java.lang.NoClassDefFoundError: com/atlassian/jira/plugin/webfragment/contextproviders/AbstractJiraContextProvider
[INFO] [talledLocalContainer] at java.lang.ClassLoader.defineClass1(Native Method)
[INFO] [talledLocalContainer] at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
[INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1829)
[INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716)
[INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
[INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
[INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
[INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:634)
[INFO] [talledLocalContainer] at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1594)
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:887)
[INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.util.BundleClassLoaderAccessor.loadClass(BundleClassLoaderAccessor.java:46)
[INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.OsgiPluginInstalledHelper.loadClass(OsgiPluginInstalledHelper.java:63)
...
...
...
...
[INFO] [talledLocalContainer] Caused by: java.lang.ClassNotFoundException: com.atlassian.jira.plugin.webfragment.contextproviders.AbstractJiraContextProvider
[INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772)
[INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
[INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
[INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
[INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
Community moderators have prevented the ability to post new answers.
I resolved this problem by insering this in the pom between the configuration tags ( just where you must have declared the package import from the obr dependencies):
<instructions> <!-- Specify what package to include. Ensure that any packages from OBRs are also listed. --> <Import-Package> ... com.atlassian.jira.plugin.webfragment.contextproviders ; version=1.0 ... </Import-Package> <CONF_COMM/> </instructions>
This is weird because it should be imported by default anyway, however, it seems to work.
EDIT : It seems that all packages used in the plugin generating the obr should be imported the same way
See this question that has some discussion: https://answers.atlassian.com/questions/178933/jira-custom-plugin-can-not-enabled
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.