I wrote a Jira plugin that sends and receives data to/from a SOAP web service after certain IssueEvents occured. For this I wrote a simple SOAP client using javax.xml.soap to send a request via HTTP. This all works fine when I call and test the client directly but fails whenever I upload the plugin to my local Jira.
I get the following error when calling SOAPConnectionFactory.newInstance():
javax.xml.soap.SOAPException:
Unable to create SOAP connection factory:
com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory cannot be cast to javax.xml.soap.SOAPConnectionFactor
Does anyone know what to make of this? I’m relatively new to Jira development and especially web services.
My jira version is 8.5.3 and jdk 11. I am having the same problem and adding those dependencies did not solve the issue. My project has the soap client as dependency in pom xml. so I have this separate soap client mvn project and there all code works without problem. but when I deploy the jira plugin then I get
Caused by: javax.xml.soap.SOAPException: Unable to create SOAP connection factory: Provider com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory not found
I believe I am missing something in my jira plugin pom. Any pointers would highly appreciated. I tried to add com.sun.* to Export-Package or Import-Package result did not change.
And when I check the obr file. Actually I can see that HttpSOAPConnectionFactory is in the right folder.
I’m not really sure if this helps, but if you are using an IDE, make sure that your maven home directory is from the atlassian-plugin-sdk 's path and not a bundled maven.
Also, the atlas-mvn command sometimes seems to re-import maven dependencies that atlas-package doesn’t, so I’d try that as well.
Regarding the pom dependencies, my xml contains these: