Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Axis2 WS Client in Jira-Plugin to consume webservice - maven Dependency problems

Markus Bode January 17, 2013

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

5 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Jitender Singh Gahlot July 9, 2015

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

&lt;bundle-instructions&gt;

		&lt;DynamicImport-Package&gt;*&lt;/DynamicImport-Package&gt;

			&lt;!-- &lt;DynamicImport-Package&gt;org.w3c.dom.*&lt;/DynamicImport-Package&gt;

			&lt;Import-Package&gt;org.w3c.dom.*,*&lt;/Import-Package&gt; --&gt;

		&lt;/bundle-instructions&gt;
0 votes
Jason Boileau
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2015

I would also very much like to hear if you ever managed to solve this, and of course how.

0 votes
Mateusz Szafarz October 8, 2014

Hi. Have you figured this out? I have the same problem.

0 votes
Markus Bode January 21, 2013

I have tried to switch to the axis2.osgi bundle:

&lt;dependency&gt;
    &lt;groupId&gt;org.apache.axis2&lt;/groupId&gt;
    &lt;artifactId&gt;org.apache.axis2.osgi&lt;/artifactId&gt;
    &lt;version&gt;1.6.2&lt;/version&gt;
&lt;/dependency&gt;

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.&lt;init&gt;(AxisDescription.java:72)
	at org.apache.axis2.description.AxisService.&lt;init&gt;(AxisService.java:323)
	at org.apache.axis2.description.AxisService.&lt;init&gt;(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!!

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2013

Can you confirm that the dependency is in your plugin? It should be in META-INF/lib

Markus Bode January 20, 2013

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.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events