When I add the condition 'com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition' to a web-item, the plugin won't start.
Here the excerpt from atlassian-plugin.xml
<web-item key="my-addon-webitem" name="My Addon" section="system.user.options/personal" weight="1000"> <description key="my_description">Show my addon</description> <label key="my_label"></label> <link linkId="my_link">/secure/MyAddon.jspa</link> <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition" /> </web-item>
Hand here the log output:
[INFO] [talledLocalContainer] 2015-12-10 14:30:24,927 localhost-startStop-1 ERROR [c.a.plugin.manager.DefaultPluginManager] There was an error loading the descriptor 'My Plugin' of plugin 'com.acme.jira.my-addon'. Disabling. [INFO] [talledLocalContainer] java.lang.RuntimeException: Unable to enable web fragment [INFO] [talledLocalContainer] at ... [INFO] [talledLocalContainer] Caused by: com.atlassian.plugin.PluginParseException: Unable to load the module's display conditions: Could not load 'com.atlassian.jira.plugin.webfragment.conditions.UserIsAdminCondition' in plugin com.acme.jira.my-addon [INFO] [talledLocalContainer] at ... [INFO] [talledLocalContainer] Caused by: java.lang.ClassNotFoundException: com.atlassian.jira.plugin.webfragment.conditions.UserIsAdminCondition not found by com.acme.jira.my-addon [165] [INFO] [talledLocalContainer] at ...
What am I missing?
When you generate a new plugin with the atlassian-plugin-sdk the generated stub also doesn't work:
atlas-create-jira-plugin cd my-plugin atlas-create-jira-plugin-module select web-item and add the condition under advanced
This example can be found here: https://bitbucket.org/aeffle/jira7test/src/
Any ideas?
===
SOLUTION:
Simply disable the new plugin scanner and stick to the old version. This works fine for me
Community moderators have prevented the ability to post new answers.
Hi @Alexander von Renteln
I know I'm a bit late for the party, but I've just had a similar issue and was able to resolve it by adding the com.atlassian.jira.plugin.webfragment.conditions package to the <Import-Package> tag in pom.xml.
My maven-jira-plugin pom section look as follows:
<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> <enableQuickReload>true</enableQuickReload> <enableFastdev>false</enableFastdev> <instructions> <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key> <!-- Add package to export here --> <Export-Package>pl.com.tt.mailtask.code, pl.com.tt.mailtask.model.dao,</Export-Package> <!-- Add package import here --> <Import-Package>com.atlassian.jira.plugin.webfragment.conditions, org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", * </Import-Package> <!-- Ensure plugin is spring powered - see https://extranet.atlassian.com/x/xBS9hQ --> <Spring-Context>*</Spring-Context> </instructions> <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> </configuration> </plugin>
Hope it's going to help you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Maciej Kucharek, this solution saved my day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It should work. At least it works for me under JIRA 7.0.0.
Did you try atlas-clean for your addon?
I see error in the stacktrace that there is no
com.atlassian.jira.plugin.webfragment.conditions.UserIsAdminCondition class and
UserIsAdminCondition is part of jira-api. Have not you accidentally deleted jira-api dependency from pom.xml?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I didn't delete that dependency - actually it doesn't even work for a newly generated plugin. 15 <dependencies> 16 <dependency> 17 <groupId>com.atlassian.jira</groupId> 18 <artifactId>jira-api</artifactId> 19 <version>${jira.version}</version> 20 <scope>provided</scope> 21 </dependency> [...] 155 <properties> 156 <jira.version>7.0.4</jira.version> 157 <amps.version>6.1.2</amps.version> 158 <plugin.testrunner.version>1.2.3</plugin.testrunner.version> 159 <atlassian.spring.scanner.version>1.2.6</atlassian.spring.scanner.version> 160 <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. --> 161 <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key> 162 <!-- TestKit version 6.x for JIRA 6.x --> 163 <testkit.version>6.3.11</testkit.version> 164 </properties>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see you have atlassian.spring.scanner.version and probably atlassian-spring-scanner plugin (I guess it's auto generated in the latest AMPS). Try to clean your pom.xml so it looks like (you may need to bring back test related stuff if you use it):
<?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>som.group</groupId> <artifactId>art-id</artifactId> <version>0.1</version> <organization> <name>NAME</name> <url>http://name.com/</url> </organization> <name>NAME</name> <description>DESC</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>com.atlassian.upm</groupId> <artifactId>licensing-api</artifactId> <version>2.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.atlassian.upm</groupId> <artifactId>upm-api</artifactId> <version>2.0.1</version> <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> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build> <properties> <jira.version>6.4.12</jira.version> <amps.version>6.1.2</amps.version> <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. --> <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key> <useFastdevCli>false</useFastdevCli> </properties> </project>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I put an example here: https://bitbucket.org/aeffle/jira7test/src/ Unfortunately, I think one has to use the new plugin system and the new scanner which finds out dependencies at build time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
pom I posted works for me and it should work for you. There are no wonders and even if smth looks like a wonder there is always explanation when you dig deeper :-).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the old "atlassian-plugin.xml component style", just clean your pom.xml to look like mine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Volodymyr, thank you very much. I just tried it in my test playground and it actually works :-) So the solution is to simply not use the new style and hope that they fix it before the old version is deprecated :-) Cheers, Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad that it works for you :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
fyi: i reported this as a bug a while ago and it seems they are working on it:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The reason the condition class is not found is that your plugin's OSGi manifest does not contain an `Import-Package` entry for the package in which the condition is located (namely com.atlassian.jira.plugin.webfragment.conditions).
This in turn is because mentioning a class in the plugin XML (or any non-Java file) is not enough for the BND tool (which AMPS uses to generate the manifest) to detect that you require its package.
This is why adding com.atlassian.jira.plugin.webfragment.conditions to the <Import-Package> instructions in your plugin's POM allows your plugin bundle to load the condition's class at runtime. Having jira-api on your classpath only allows you to resolve the class at compile time (which is not necessary if you're only using it from XML).
None of the above is anything to do with the Spring Scanner, which is solely concerned with OSGi services (not packages).
One of the other answers noted that the condition needs to inject the `GlobalPermissionManager` service, which is correct. This OSGi service will only be available to your plugin if you have declared that you're importing it, either by:
I hope this clears up any confusion or questions about using this condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrew, thanks for your explanation. I finally got my plugin XML condition to work:
<condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsAdminCondition"/>
But I also had to add this to my plugin servlet class, and inject it as part of the constructor to get it all to work:
@ComponentImport
private final PermissionManager permissionMgr;
My servlet does not need to use the PermissionManager class. It's only there for the sake of getting the plugin UserIsAdminCondition to work.
Is there a more elegant/cleaner solution?
(I can't use <component-import> tag in my plugin XML to declare the PermissionManager class because in my POM I'm using the Atlassian-Plugin-Key which forbids it... and as I understand, the whole point of all this is to use the latest Scanner 2.x so that plugins will not require run-time 'transformation' so that they load faster -- albeit at the cost of managing the run-time BND package/class imports ourselves)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Victor,
Glad you got it working!
I agree it's a little ugly to declare a dependency that you don't actually use, just to get something else to work. What some people do is write a "wiring" class (you can call it whatever you want, maybe `ComponentImports`) and add annotated fields of the required types:
/**
* This class exists solely to cause Spring Scanner to import
* the required OSGi services. It should never be instantiated.
*/
public final class ComponentImports {
@ComponentImport private PermissionManager permissionMgr;
private ComponentImports() {
throw new IllegalStateException("Should never be instantiated");
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrew,
Thanks for your suggestion. I like it! I think it's a good compromise to use a dedicated class for this purpose.
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you maybe clarify how to disable this scanner and work the 'old style' (i just started trying to build some plugins and never used 'the old style')? tried to remove all scanner related stuff from the pom and added: <component-import key="CustomFieldValuePersister" interface="com.atlassian.jira.issue.customfields.persistence.CustomFieldValuePersister" /> to the atlassian-plugin.xml in the hope to get that component to inject but that also doesnt work. (Is the 'old way' with injection at all?)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lila,
with spring-scanner, you can no longer use <component-import> in your xml file. Instead, you should annotate your PermissionManager with @ComponentImport annotation.
Please check out the spring-scanner readme (https://bitbucket.org/atlassian/atlassian-spring-scanner/src/1.2.x/README.md?at=1.2.x&fileviewer=file-view-default), specifically "Add scanner annotations to your code" section
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately component-import isn't allowed for plugins:
atlassian-plugin.xml contains a definition of component-import. This is not allowed when Atlassian-Plugin-Key is set.
With an import-package instruction in pom.xml it finds the webfragment condition, but no unique bean for it's permissionmanager dependency
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The condition com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition should work as it implements the interface com.atlassian.plugin.web.Condition.
I would suggest the same as Volodymyr. Check your pom.xml and ensure a refence to jira-api is set:
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<!--<version>${jira.version}</version>-->
<!--<version>6.4.4</version>-->
<version>7.0.0-m01b</version>
<scope>provided</scope>
</dependency>
Beside this in your last Stacktrace an exception is thrown for the condition
com.atlassian.jira.plugin.webfragment.conditions.UserIsAdminCondition
This is enabled also adding the dependency of jira-api in the pom.xml
For an overview of all conditions see
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
atlas-version output:
$ atlas-version ATLAS Version: 6.1.0 ATLAS Home: /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec ATLAS Scripts: /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/bin ATLAS Maven Home: /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/apache-maven-3.2.1 AMPS Version: 6.1.2 -------- Executing: /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/apache-maven-3.2.1/bin/mvn --version -gs /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/apache-maven-3.2.1/conf/settings.xml Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0 Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00) Maven home: /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/apache-maven-3.2.1 Java version: 1.8.0_05, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.11.1", arch: "x86_64", family: "mac"
atlas-create-jira-plugin
$ atlas-create-jira-plugin --artifact-id my-addon --group-id com.acme --version 1.0.0-SNAPSHOT --non-interactive Executing: /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/apache-maven-3.2.1/bin/mvn com.atlassian.maven.plugins:maven-jira-plugin:6.1.2:create -gs /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/apache-maven-3.2.1/conf/settings.xml -DartifactId='my-addon' -DgroupId='com.acme' -Dversion='1.0.0-SNAPSHOT' -DinteractiveMode=false Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0 [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-jira-plugin:6.1.2:create (default-cli) @ standalone-pom --- [INFO] Google Analytics Tracking is enabled to collect AMPS usage statistics. [INFO] Although no personal information is sent, you may disable tracking by adding <allowGoogleTracking>false</allowGoogleTracking> to the amps plugin configuration in your pom.xml [INFO] Sending event to Google Analytics: AMPS:jira - Create Plugin [INFO] determining latest stable product version... [INFO] using latest stable product version: 7.0.4 [INFO] determining latest stable data version... [INFO] using latest stable data version: 7.0.4 Define value for groupId: : com.acme Define value for artifactId: : my-addon Define value for version: 1.0.0-SNAPSHOT: : Define value for package: com.acme: : Confirm properties configuration: groupId: com.acme artifactId: my-addon version: 1.0.0-SNAPSHOT package: com.acme Y: : [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] Generating project in Batch mode [INFO] Archetype repository missing. Using the one from [com.atlassian.maven.archetypes:jira-plugin-archetype:5 -> https://maven.atlassian.com/public] found in catalog internal [WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 49,column 22] : ${atlassian.spring.scanner.version} is not a valid reference. [WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 56,column 22] : ${atlassian.spring.scanner.version} is not a valid reference. [WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 121,column 47] : ${atlassian.plugin.key} is not a valid reference. [WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 180,column 31] : ${project.groupId} is not a valid reference. [WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 180,column 50] : ${project.artifactId} is not a valid reference. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 34.392 s [INFO] Finished at: 2015-12-10T15:40:13+01:00 [INFO] Final Memory: 16M/343M [INFO] ------------------------------------------------------------------------
Enter the directory and create a webitem with atlas-create-jira-plugin-module:
$ cd my-addon/ $ atlas-create-jira-plugin-module Executing: /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/apache-maven-3.2.1/bin/mvn com.atlassian.maven.plugins:maven-jira-plugin:6.1.2:create-plugin-module -gs /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/apache-maven-3.2.1/conf/settings.xml Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0 [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.acme:my-addon:atlassian-plugin:1.0.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 163, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building my-addon 1.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-jira-plugin:6.1.2:create-plugin-module (default-cli) @ my-addon --- Choose Plugin Module: 1: Component Import 2: Component 3: Component Tab Panel 4: Custom Field 5: Custom Field Searcher 6: Downloadable Plugin Resource 7: Gadget Plugin Module 8: Issue Tab Panel 9: Keyboard Shortcut 10: JQL Function 11: Licensing API Support 12: Module Type 13: Project Tab Panel 14: REST Plugin Module 15: RPC Endpoint Plugin 16: Report 17: Search Request View 18: Servlet Context Listener 19: Servlet Context Parameter 20: Servlet Filter 21: Servlet 22: Template Context Item 23: User Format 24: Version Tab Panel 25: Web Item 26: Web Panel 27: Web Panel Renderer 28: Web Resource 29: Web Resource Transformer 30: Web Section 31: Webwork Plugin 32: Workflow Condition 33: Workflow Post Function 34: Workflow Validator Choose a number (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34): 25 [INFO] Google Analytics Tracking is enabled to collect AMPS usage statistics. [INFO] Although no personal information is sent, you may disable tracking by adding <allowGoogleTracking>false</allowGoogleTracking> to the amps plugin configuration in your pom.xml [INFO] Sending event to Google Analytics: AMPS:jira - Create Plugin Module - jira:Web Item Enter Plugin Module Name My Web Item: : some-name Enter Section (e.g. system.admin/globalsettings): system.admin/globalsettings Enter Link URL (e.g. /secure/CreateIssue!default.jspa): /secure/CreateIssue!default.jspa Show Advanced Setup? (Y/y/N/n) N: : y Module Key some--name: : Module Description The some-name Plugin: : i18n Name Key some--name.name: : i18n Description Key some--name.description: : Weight 1000: : Link Id some--name-link: : Enter Label Key some--name.label: : Enter Label Value some-name: : Add Label Param? (Y/y/N/n) N: : Add Icon? (Y/y/N/n) N: : Add Tooltip? (Y/y/N/n) N: : Add Resource (Y/y/N/n) N: : Add Velocity Context Provider (Y/y/N/n) N: : Add Plugin Module Param? (Y/y/N/n) N: : Add Conditions? (Y/y/N/n) N: : y Condition Type (AND/and/OR/or) AND: : Choose A Condition 1: IsAdminCondition 2: UserIsAdminCondition 3: Custom Condition Choose a number: (1/2/3) : : 1 Add Condition Parameter? (Y/y/N/n) N: : Invert Condition? (Y/y/N/n) N: : Add Condition? (Y/y/N/n) N: : [INFO] Adding the following items to the project: [INFO] [dependency: org.mockito:mockito-all] [INFO] [module: web-item] [INFO] i18n strings: 3 Add Another Plugin Module? (Y/y/N/n) N: : [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:32 min [INFO] Finished at: 2015-12-10T15:45:48+01:00 [INFO] Final Memory: 21M/137M [INFO] ------------------------------------------------------------------------
Let it run and crash with atlas-run:
$ atlas-run Executing: /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/apache-maven-3.2.1/bin/mvn com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:6.1.2:run -gs /usr/local/Cellar/atlassian-plugin-sdk/6.1.0/libexec/apache-maven-3.2.1/conf/settings.xml Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0 [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.acme:my-addon:atlassian-plugin:1.0.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 146, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building my-addon 1.0.0-SNAPSHOT [INFO] - [...] [INFO] [talledLocalContainer] java.lang.RuntimeException: Unable to enable web fragment [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.enabled(AbstractWebFragmentModuleDescriptor.java:133) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.DefaultWebItemModuleDescriptor.enabled(DefaultWebItemModuleDescriptor.java:72) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.DefaultAbstractWebFragmentModuleDescriptor.enabled(DefaultAbstractWebFragmentModuleDescriptor.java:35) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:2168) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModule(DefaultPluginManager.java:1850) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModules(DefaultPluginManager.java:1822) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1268) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1221) [INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:513) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.JiraPluginManager.earlyStartup(JiraPluginManager.java:104) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.JiraPluginManager.start(JiraPluginManager.java:94) [INFO] [talledLocalContainer] at com.atlassian.jira.ComponentManager$PluginSystem.start(ComponentManager.java:591) [INFO] [talledLocalContainer] at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java:180) [INFO] [talledLocalContainer] at com.atlassian.jira.ComponentManager.start(ComponentManager.java:153) [INFO] [talledLocalContainer] at com.atlassian.jira.upgrade.PluginSystemLauncher.start(PluginSystemLauncher.java:30) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postDbLaunch$473(DefaultJiraLauncher.java:129) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher$$Lambda$13/574597525.run(Unknown Source) [INFO] [talledLocalContainer] at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:298) [INFO] [talledLocalContainer] at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:194) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:120) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$start$471(DefaultJiraLauncher.java:89) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher$$Lambda$1/2067326067.run(Unknown Source) [INFO] [talledLocalContainer] at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:31) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:87) [INFO] [talledLocalContainer] at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:79) [INFO] [talledLocalContainer] ... 8 filtered [INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745) [INFO] [talledLocalContainer] Caused by: com.atlassian.plugin.PluginParseException: Unable to load the module's display conditions: Could not load 'com.atlassian.jira.plugin.webfragment.conditions.IsAdminCondition' in plugin com.acme.my-addon [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditionImplementation(ConditionElementParser.java:95) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditionImplementation(ConditionElementParser.java:29) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.baseconditions.AbstractConditionElementParser.makeCondition(AbstractConditionElementParser.java:116) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeCondition(ConditionElementParser.java:73) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeCondition(ConditionElementParser.java:29) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditions(ConditionElementParser.java:65) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditions(ConditionElementParser.java:29) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.baseconditions.AbstractConditionElementParser.makeConditions(AbstractConditionElementParser.java:57) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditions(ConditionElementParser.java:57) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditions(ConditionElementParser.java:29) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.baseconditions.AbstractConditionElementParser.makeConditions(AbstractConditionElementParser.java:70) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditions(ConditionElementParser.java:57) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.makeConditions(AbstractWebFragmentModuleDescriptor.java:72) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.enabled(AbstractWebFragmentModuleDescriptor.java:128) [INFO] [talledLocalContainer] ... 37 more [INFO] [talledLocalContainer] Caused by: com.atlassian.plugin.web.conditions.ConditionLoadingException: Could not load 'com.atlassian.jira.plugin.webfragment.conditions.IsAdminCondition' in plugin com.acme.my-addon [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.JiraWebFragmentHelper.loadCondition(JiraWebFragmentHelper.java:45) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor$1.create(AbstractWebFragmentModuleDescriptor.java:169) [INFO] [talledLocalContainer] at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditionImplementation(ConditionElementParser.java:86) [INFO] [talledLocalContainer] ... 51 more [INFO] [talledLocalContainer] Caused by: java.lang.ClassNotFoundException: com.atlassian.jira.plugin.webfragment.conditions.IsAdminCondition not found by com.acme.my-addon [17] [INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) [INFO] [talledLocalContainer] at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) [INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [INFO] [talledLocalContainer] at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1844) [INFO] [talledLocalContainer] at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:937) [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:65) [INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.OsgiPlugin.loadClass(OsgiPlugin.java:212) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.JiraWebFragmentHelper.loadCondition(JiraWebFragmentHelper.java:42) [INFO] [talledLocalContainer] ... 53 more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Maciej Kucharek! That worked for me!
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.