Hi. We write plugin for jira 5.0.6 and we get one error: MyService doesn't have any satisfiable constructors.
rather now:
SearchSoapServiceImpl doesn't have any satisfiable constructors. Unsatisfiable dependencies: [[interface com.atlassian.jira.rpc.auth.TokenManager, interface com.atlassian.jira.rpc.soap.service.ProjectService, interface com.atlassian.jira.rpc.soap.service.IssueService, interface com.atlassian.jira.rpc.soap.service.UserService, interface com.atlassian.jira.rpc.soap.service.SchemeService, interface com.atlassian.jira.rpc.soap.service.AdminService, interface com.atlassian.jira.rpc.soap.service.SearchService, interface com.atlassian.jira.rpc.soap.service.ProjectRoleService, interface com.atlassian.jira.rpc.soap.service.IssueConstantsService, interface com.atlassian.jira.rpc.soap.JiraSoapService]]
Our constructor
public SearchSoapServiceImpl(TokenManager tokenManager,
ProjectService projectService,
IssueService issueService,
UserService userService,
SchemeService schemeService,
AdminService adminService,
SearchService searchService,
ProjectRoleService projectRoleService,
IssueConstantsService issueConstantsService) {
this.tokenManager = tokenManager;
this.projectService = projectService;
this.issueService = issueService;
this.userService = userService;
this.schemeService = schemeService;
this.adminService = adminService;
this.searchService = searchService;
this.projectRoleService = projectRoleService;
this.issueConstantsService = issueConstantsService;
}
and atlassian-plugin.xml
<atlassian-plugin key="my_company" name="Search Soap Plugin" plugins-version="2">
<plugin-info>
<description>Search Soap Plugin</description>
<version>1.1.5</version>
</plugin-info>
<component key="component-FoobarSoapService" name="Search SOAP Service Component"
class=" net.my_company .SearchSoapServiceImpl">
<interface> net.my_company .SearchSoapService</interface>
</component>
<rpc-soap key="soap-search" name="Search SOAP Service" class="net.my_company.SearchSoapServiceImpl">
<description>Search SOAP service.</description>
<service-path>searchservice</service-path>
<published-interface>net. my_company .SearchSoapService</published-interface>
</rpc-soap>
<rpc-xmlrpc key="xmlrpc" name="System XML-RPC Services"
class="com.atlassian.jira.rpc.xmlrpc.JiraXmlRpcService">
<description>The standard JIRA XML-RPC services.</description>
<service-path>jira1</service-path>
</rpc-xmlrpc>
</atlassian-plugin>
I'm not convinced. Get the atlassian SDK, do an 'atlas-create-jira5-plugin'. Compare the generated pom.xml with your pom, reread my comment above and update your pom, let me know how you get on after you've added jira-api as a provided scope dependency. In a nutshell you are writing a p2 plugin, it needs to specifically import packages as its running in an OSGi container. Atlassian SDK helps IF you follow the rules :)
Why are you injecting com.atlassian.jira.rpc.soap.service.* classes? They are not components. Try the normal Service classes and use them in your plugin.
For example, com.atlassian.jira.bc.issue.search.SearchService
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
we used classes only form com.atlassian.jira.rpc.soap.service.* , but we had the same mistake
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think, that pom.xml is ok. we have got necessary dependencies
but part of our pom.xml:
...
<parent>
<groupId>com.atlassian.jira.plugins</groupId>
<artifactId>jira-plugin-base</artifactId>
<version>13</version>
</parent>
...
<dependencies>
<dependency>
<groupId>com.atlassian.jira.plugins</groupId>
<artifactId>atlassian-jira-rpc-plugin</artifactId>
<version>5.0.6-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>atlassian</id>
<name>Atlassian Repository</name>
<url>https://maven.atlassian.com/content/groups/public</url>
</repository>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
<repository>
<id>maven2-jboss.org</id>
<name>jboss.org Repository for Maven</name>
<url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>atlassian</id>
<name>Atlassian Repository</name>
<url>https://maven.atlassian.com/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</project>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think this can happen if your plugin doesnt import the necessary packages. What is your pom.xml packaging (should be atlassian-plugin), assuming also you have jira-api added in provided scope, and have the maven-jira-plugin listed in your <build><plugins>... list?
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.