Hi,
has anyone integrated successfully a WebService Stub into an jira plugin? (here i'm using JIRA 4.4.5)
I want to send Data to an Webservice from within a JIRA Webaction.
I've generated the Webservice with axis2 and tested the client stub within a standalone servlet with no problems. But i cant manage to integrate the stub in my jira plugin.
The stub fails on the following position, with the stacktrace:
[INFO] [talledLocalContainer] java.lang.ClassNotFoundException: org.w3c.dom.Node [INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772) [INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73) [INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690) [INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [INFO] [talledLocalContainer] at org.apache.axiom.locator.DefaultOMMetaFactoryLocator.<init>(DefaultOMMetaFactoryLocator.java:74) [INFO] [talledLocalContainer] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [INFO] [talledLocalContainer] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [INFO] [talledLocalContainer] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [INFO] [talledLocalContainer] at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [INFO] [talledLocalContainer] at java.lang.Class.newInstance0(Class.java:355)
_service = new org.apache.axis2.description.AxisService("MyService" + getUniqueSuffix());
The following are the dependencies from my pom.xml
<dependency> <groupId>org.apache.axis2</groupId> <artifactId>axis2</artifactId> <version>1.6.2</version> </dependency> <dependency> <groupId>org.apache.ws.commons.axiom</groupId> <artifactId>axiom-api</artifactId> <version>1.2.14</version> </dependency> <dependency> <groupId>org.apache.ws.commons.axiom</groupId> <artifactId>axiom-impl</artifactId> <version>1.2.14</version> </dependency> <dependency> <groupId>org.apache.ws.commons.schema</groupId> <artifactId>XmlSchema</artifactId> <version>1.4.7</version> </dependency>
Any hint on how to provide org.w3c.dom.Node?? Maybe anybody had success in integrating a axis2 ws call and can provide the pom.xml?
Any help is greatly appreciated!
Thanks!
Markus
Community moderators have prevented the ability to post new answers.
I don't know it's worth to give the answer now but for those who will get this exception in future the answer to this problem is-
add the following code in atlassian-plugin.xml under <plugin-info> tag
<bundle-instructions> <DynamicImport-Package>*</DynamicImport-Package> <!-- <DynamicImport-Package>org.w3c.dom.*</DynamicImport-Package> <Import-Package>org.w3c.dom.*,*</Import-Package> --> </bundle-instructions>
I would also very much like to hear if you ever managed to solve this, and of course how.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi. Have you figured this out? I have the same problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried to switch to the axis2.osgi bundle:
<dependency> <groupId>org.apache.axis2</groupId> <artifactId>org.apache.axis2.osgi</artifactId> <version>1.6.2</version> </dependency>
But nearly no change. On the first try i get exactly the above Stacktrace. After the first try (i call the webservice in a jira servlet), so after a reload, i got the following stacktrace:
java.lang.NoClassDefFoundError: Could not initialize class org.apache.axiom.om.OMAbstractFactory at org.apache.axis2.description.AxisDescription.<init>(AxisDescription.java:72) at org.apache.axis2.description.AxisService.<init>(AxisService.java:323) at org.apache.axis2.description.AxisService.<init>(AxisService.java:394)
on the same position in the axis2 client stub:
_service = new org.apache.axis2.description.AxisService("MyService" + getUniqueSuffix());
I'm desperate what a pain it is to integrate 3rd party standard functionality into a jira plugin. Is there really no way to integrate axis2?
There was a workaround for jax-ws (https://bitbucket.org/jaysee00/jira-jax-ws-example-plugin) maybe there is a solution for axis2?!
Thanks for any hints!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you confirm that the dependency is in your plugin? It should be in META-INF/lib
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can confirm, that all my dependencies are in META-INF/lib:
I saw in eclipse that org.w3c.dom.Node is part of the standard JRE/JDK (i use 1.6).
Additionaly org.w3c.dom.Node is part of xml-apis-1.3.04.jar which is bundled in JIRA so there shouldn't be a problem?
I tried to set it as dependency with <scope>provided</scope> but always the same Exception is thrown.
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.