I would like to create jira (4.4.4) issues within a confluence (3.5.13) plugin. Since I cannot create issues via rest api I'm trying to solve this problem by utilizing the soap service. While it is quite simple to create issues with a standalone client, the same code fails within a confluence plugin. Regardless what I'm trying the following exception is thrown:
Caused by: com.atlassian.renderer.v2.macro.MacroException: could not login to soap service. at net.bigpoint.confluence.plugins.implementations.requests.AbstractSoapRequest.login(AbstractSoapRequest.java:59) at net.bigpoint.confluence.plugins.implementations.requests.AbstractSoapRequest.getResult(AbstractSoapRequest.java:73) at net.bigpoint.confluence.plugins.implementations.DefaultJiraAppLinkHandler.createIssue(DefaultJiraAppLinkHandler.java:93) at net.bigpoint.confluence.plugins.implementations.actions.CreateIssueAction.getResult(CreateIssueAction.java:32) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378) at com.atlassian.confluence.velocity.introspection.UnboxingMethod.invoke(UnboxingMethod.java:31) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) ... 192 more Caused by: java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl cannot be cast to org.apache.axis.attachments.Attachments at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.client.Call.invoke(Call.java:1820) at com.atlassian.jira.rpc.soap.client.JirasoapserviceV2SoapBindingStub.login(JirasoapserviceV2SoapBindingStub.java:5591) at net.bigpoint.confluence.plugins.implementations.requests.AbstractSoapRequest.login(AbstractSoapRequest.java:57) ... 203 more Caused by: java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl cannot be cast to org.apache.axis.attachments.Attachments at org.apache.axis.Message.setup(Message.java:341) at org.apache.axis.Message.<init>(Message.java:243) at org.apache.axis.client.Call.invoke(Call.java:2406) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) ... 205 more
I've spent many hours reading documentations but I could not find any solution for this issue. Due to this ticket: https://issues.apache.org/jira/browse/AXIS-2775 it
might be an axis bug but that would mean it is not possible to fix it within a plugin I guess :(
thanks,
Lars
Community moderators have prevented the ability to post new answers.
Not sure if this is this your problem, but do not bundle any axis jars in your plugin - use what is already in Confluence.
As far as i know there are no direct dependencies to axis in my pom.xml:
- junit:junit:4.6 - com.atlassian.confluence:confluence:4.0 - com.atlassian.confluence.plugin:func-test:2.3 - com.google.code.gson:gson:2.1 - org.mockito:mockito-all:1.9.0 - log4j:log4j:1.2.16 - com.google.code.guice:guice:1.0
Just to make sure there is no chached stuff in my local maven repository I've forced maven to download the axis jars again by deleting the axis folder. Maven then downloaded the following packages from atlassian (looks fine I guess):
https://m2proxy.atlassian.com/repository/public/axis/axis/1.2.1/axis-1.2.1.pom https://m2proxy.atlassian.com/repository/public/axis/axis-jaxrpc/1.2.1-noqname/axis-jaxrpc-1.2.1-noqname.pom https://m2proxy.atlassian.com/repository/public/axis/axis-saaj/1.2.1/axis-saaj-1.2.1.pom https://m2proxy.atlassian.com/repository/public/axis/axis/1.2.1/axis-1.2.1.jar https://m2proxy.atlassian.com/repository/public/axis/axis-jaxrpc/1.2.1-noqname/axis-jaxrpc-1.2.1-noqname.jar https://m2proxy.atlassian.com/repository/public/axis/axis-saaj/1.2.1/axis-saaj-1.2.1.jar https://m2proxy.atlassian.com/repository/public/axis/axis/1.4/axis-1.4.pom https://m2proxy.atlassian.com/repository/public/axis/axis-jaxrpc/1.4/axis-jaxrpc-1.4.pom https://m2proxy.atlassian.com/repository/public/axis/axis-saaj/1.4/axis-saaj-1.4.pom https://m2proxy.atlassian.com/repository/public/axis/axis-wsdl4j/1.5.1/axis-wsdl4j-1.5.1.pom https://m2proxy.atlassian.com/repository/public/axis/axis/1.4/axis-1.4.jar https://m2proxy.atlassian.com/repository/public/axis/axis-wsdl4j/1.5.1/axis-wsdl4j-1.5.1.jar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look in your plugin jar and make sure there is nothing unexpected in there, specifically in META-INF. I ran into similar problem with the Confluence CLI Plugin . Note with that plugin you can create issues just fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That solved my problem. Thank you very much!
I had copies of different versions of the axis libraries in my META-INF/lib folder which caused the exception. After cleaning the target folder and rebuilding there are no more axis libraries in the jar and everything works fine now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
that did not help me out: REMOTE_EXCEPTION Icon Unable to log in to server: https://xxx/confluence/rpc/soap-axis/confluenceservice-v2 with user: xx. Cause: ; nested exception is: java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl cannot be cast to org.apache.axis.attachments.Attachments
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.