Jira start up failed with custom plugin using rest api (jersey) -


we working on jira custom plugin uses rest api.

after installing custom plugin, when restart jira, fails.

we facing following exception in logs:

org.springframework.beans.factory.beancreationexception: error creating bean name 'activator' defined in url [bundle://109.0:0/meta-inf/spring/atlassian-plugins-components.xml]: invocation of init method failed; nested exception com.sun.jersey.spi.service.serviceconfigurationerror: com.sun.jersey.spi.headerdelegateprovider: class com.sun.jersey.core.impl.provider.header.localeprovider implementing provider interface com.sun.jersey.spi.headerdelegateprovider not instantiated: cannot cast com.sun.jersey.core.impl.provider.header.localeprovider com.sun.jersey.spi.headerdelegateprovider @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1338) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:473) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory$1.run(abstractautowirecapablebeanfactory.java:409) @ java.security.accesscontroller.doprivileged(native method) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:380) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:264) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:222) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:261) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:185) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:164) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.preinstantiatesingletons(defaultlistablebeanfactory.java:429) @ org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:728) @ org.springframework.osgi.context.support.abstractdelegatedexecutionapplicationcontext.access$1600(abstractdelegatedexecutionapplicationcontext.java:69) @ org.springframework.osgi.context.support.abstractdelegatedexecutionapplicationcontext$4.run(abstractdelegatedexecutionapplicationcontext.java:355) @ org.springframework.osgi.util.internal.privilegedutils.executewithcustomtccl(privilegedutils.java:85) @ org.springframework.osgi.context.support.abstractdelegatedexecutionapplicationcontext.completerefresh(abstractdelegatedexecutionapplicationcontext.java:320) @ org.springframework.osgi.extender.internal.dependencies.startup.dependencywaiterapplicationcontextexecutor$completerefreshtask.run(dependencywaiterapplicationcontextexecutor.java:132) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:724) caused by: com.sun.jersey.spi.service.serviceconfigurationerror: com.sun.jersey.spi.headerdelegateprovider: class com.sun.jersey.core.impl.provider.header.localeprovider implementing provider interface com.sun.jersey.spi.headerdelegateprovider not instantiated: cannot cast com.sun.jersey.core.impl.provider.header.localeprovider com.sun.jersey.spi.headerdelegateprovider @ com.sun.jersey.core.osgi.activator$osgiservicefinder$1.next(activator.java:80) @ com.sun.jersey.core.spi.factory.abstractruntimedelegate.<init>(abstractruntimedelegate.java:76) @ com.sun.jersey.server.impl.provider.runtimedelegateimpl.<init>(runtimedelegateimpl.java:54) @ com.sun.jersey.server.osgi.activator.start(activator.java:63) @ com.atlassian.plugins.rest.module.activator.afterpropertiesset(activator.java:22) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1335) ... 19 more caused by: java.lang.classcastexception: cannot cast com.sun.jersey.core.impl.provider.header.localeprovider com.sun.jersey.spi.headerdelegateprovider @ java.lang.class.cast(class.java:3084) @ com.sun.jersey.core.osgi.activator$osgiservicefinder$1.next(activator.java:78) ... 25 more 

can please suggest solution above exception?

atlassian-plugin.xml file plugin:

<atlassian-plugin key="${project.groupid}.${project.artifactid}" name="${project.name}" plugins-version="2">     <plugin-info>         <description>${project.description}</description>         <version>${project.version}</version>         <vendor name="${project.organization.name}" url="${project.organization.url}" />         <param name="plugin-icon">images/pluginicon.png</param>         <param name="plugin-logo">images/pluginlogo.png</param>     </plugin-info>    <web-resource key="qc-jira-linkage" name="qc-jira-linkage web resources">         <dependency>com.atlassian.auiplugin:ajs</dependency>     <!--     <resource type="download" name="qc-jira-linkage.css" location="css/qc-jira-linkage.css"/> -->         <resource type="download" name="qc-jira-linkage.js" location="js/qc-jira-linkage.js"/>         <resource type="download" name="images/" location="images/"/>         <context>qc-jira-linkage</context>         <context>atl.general</context>        <context>atl.admin</context>     </web-resource>       <!-- add our i18n resource -->     <resource type="i18n" name="qc-jira-linkage" location="qc-jira-linkage"/>       <web-item key="add-qc-link" section="create-issue-link-types" weight="20">         <label key="com.example.externallinkage.type" />         <link linkid="add-qc-link">             /secure/linkqc!default.jspa?id=${issueid}         </link>      </web-item>     <component key="link-service" class="com.example.externallinkage.linkservice"/>      <component-import key="activityservice" interface="com.atlassian.streams.thirdparty.api.activityservice"/>     <component-import key="sal-request-factory" interface="com.atlassian.sal.api.net.requestfactory"/>      <webwork1 key="issue-link-qc" name="link issues qc" class="java.lang.object">         <actions>             <action name="com.example.externallinkage.linkqc" alias="linkqc">                 <view name="error">/templates/qc-jira-linkage-view.vm</view>                 <view name="input">/templates/qc-jira-linkage-view.vm</view>             </action>         </actions>     </webwork1>        <component-import key="remote-issue-link-service" interface="com.atlassian.jira.bc.issue.link.remoteissuelinkservice"/>      <issue-link-renderer key="qc-jira-linkagekey" application-type="com.example.externallinkage" class="com.example.externallinkage.jiraqclinkrenderer">          <resource name="initial-view" type="velocity" location="templates/renderer/loadingissuelink.vm"/>         <resource name="final-view" type="velocity" location="templates/renderer/qclink.vm"/>     </issue-link-renderer>      <component-import key="usermanager" interface="com.atlassian.sal.api.user.usermanager" />     <component-import key="loginuriprovider" interface="com.atlassian.sal.api.auth.loginuriprovider" />     <component-import key="renderer" interface="com.atlassian.templaterenderer.velocity.one.six.velocitytemplaterenderer" />     <component-import key="applicationproperties" interface="com.atlassian.sal.api.applicationproperties" />     <component-import key="pluginsettingsfactory" interface="com.atlassian.sal.api.pluginsettings.pluginsettingsfactory" />     <component-import key="transactiontemplate" interface="com.atlassian.sal.api.transaction.transactiontemplate" />     <template-context-item key="applicationpropertiescontextitem" component-ref="applicationproperties"                         context-key="applicationproperties" name="application properties context item"/>       <servlet key="link-servlet" class="com.example.externallinkage.linkservlet">       <url-pattern>/asurion/testinstancedetails</url-pattern>      </servlet>       <webwork1 key="deletelink" name="deletelink" class="java.lang.object">               <actions>                      <action name="com.example.externallinkage.remotedeletelink" alias="deleteremoteissuelink" roles-required="use">                         <view name="input">/secure/views/issue/deletelink.jsp</view>                         <view name="error">/secure/views/issue/deletelink.jsp</view>                     </action>               </actions>        </webwork1>     </atlassian-plugin> 

couldn't edit question, adding more details here.

atlassian-plugin.xml file plugin, requested in comment gone :(

<atlassian-plugin key="${project.groupid}.${project.artifactid}" name="${project.name}" plugins-version="2">     <plugin-info>         <description>${project.description}</description>         <version>${project.version}</version>         <vendor name="${project.organization.name}" url="${project.organization.url}" />         <param name="plugin-icon">images/pluginicon.png</param>         <param name="plugin-logo">images/pluginlogo.png</param>     </plugin-info>    <web-resource key="qc-jira-linkage" name="qc-jira-linkage web resources">         <dependency>com.atlassian.auiplugin:ajs</dependency>     <!--     <resource type="download" name="qc-jira-linkage.css" location="css/qc-jira-linkage.css"/> -->         <resource type="download" name="qc-jira-linkage.js" location="js/qc-jira-linkage.js"/>         <resource type="download" name="images/" location="images/"/>         <context>qc-jira-linkage</context>         <context>atl.general</context>        <context>atl.admin</context>     </web-resource>       <!-- add our i18n resource -->     <resource type="i18n" name="qc-jira-linkage" location="qc-jira-linkage"/>       <web-item key="add-qc-link" section="create-issue-link-types" weight="20">         <label key="com.example.externallinkage.type" />         <link linkid="add-qc-link">             /secure/linkqc!default.jspa?id=${issueid}         </link>      </web-item>     <component key="link-service" class="com.example.externallinkage.linkservice"/>      <component-import key="activityservice" interface="com.atlassian.streams.thirdparty.api.activityservice"/>     <component-import key="sal-request-factory" interface="com.atlassian.sal.api.net.requestfactory"/>      <webwork1 key="issue-link-qc" name="link issues qc" class="java.lang.object">         <actions>             <action name="com.example.externallinkage.linkqc" alias="linkqc">                 <view name="error">/templates/qc-jira-linkage-view.vm</view>                 <view name="input">/templates/qc-jira-linkage-view.vm</view>             </action>         </actions>     </webwork1>        <component-import key="remote-issue-link-service" interface="com.atlassian.jira.bc.issue.link.remoteissuelinkservice"/>      <issue-link-renderer key="qc-jira-linkagekey" application-type="com.example.externallinkage" class="com.example.externallinkage.jiraqclinkrenderer">          <resource name="initial-view" type="velocity" location="templates/renderer/loadingissuelink.vm"/>         <resource name="final-view" type="velocity" location="templates/renderer/qclink.vm"/>     </issue-link-renderer>      <component-import key="usermanager" interface="com.atlassian.sal.api.user.usermanager" />     <component-import key="loginuriprovider" interface="com.atlassian.sal.api.auth.loginuriprovider" />     <component-import key="renderer" interface="com.atlassian.templaterenderer.velocity.one.six.velocitytemplaterenderer" />     <component-import key="applicationproperties" interface="com.atlassian.sal.api.applicationproperties" />     <component-import key="pluginsettingsfactory" interface="com.atlassian.sal.api.pluginsettings.pluginsettingsfactory" />     <component-import key="transactiontemplate" interface="com.atlassian.sal.api.transaction.transactiontemplate" />     <template-context-item key="applicationpropertiescontextitem" component-ref="applicationproperties"                         context-key="applicationproperties" name="application properties context item"/>       <servlet key="link-servlet" class="com.example.externallinkage.linkservlet">       <url-pattern>/asurion/testinstancedetails</url-pattern>      </servlet>       <webwork1 key="deletelink" name="deletelink" class="java.lang.object">               <actions>                      <action name="com.example.externallinkage.remotedeletelink" alias="deleteremoteissuelink" roles-required="use">                         <view name="input">/secure/views/issue/deletelink.jsp</view>                         <view name="error">/secure/views/issue/deletelink.jsp</view>                     </action>               </actions>        </webwork1>     </atlassian-plugin> 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -