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

Implement JAX-WS in jira 5 plugin

Kyle DesMarais March 26, 2012

The current error i am receving is:

interface com.sun.xml.internal.ws.developer.WSBindingProvider is not visible from class loader

I believe the solution is here:

http://blog.springsource.org/2009/01/19/exposing-the-boot-classpath-in-osgi/

But I have not be able to make that class visble.

How do I implement JAX-WS inside a jira 5 plugin?

6 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

5 votes
Answer accepted
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 17, 2012

Hi Jake,

A long time with no answer! This came up again on a support ticket and I decided enough was enough... it's time to see if this is possible.

In the end, I was able to get a JAX-WS client working from within a JIRA 5 plugin - I had to debug lots of wacky classloader issues to work out exactly what needed to be bundled in the plugin and what could be provided by JIRA.

I've got an example plugin here for anyone who's interested in getting it working: https://bitbucket.org/jaysee00/jira-jax-ws-example-plugin

Remo Siegwart
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.
October 11, 2015

Thank you so much Joe for providing the sample code! This saved me a lot of time, can't thank you enough! Keep up the good work!

0 votes
Joel Holmberg June 22, 2014

I tried Joseph's example with no luck (had a bit different JIRA version - 5.1.8, and also didn't really want to overload class-loaders and such). This is what worked for me (after many hours of scratching my head):

remove the classes I had generated from the WSDL (using wsimport) from my eclipse project.

generate new classes from WSDL using org.apache.axis.wsdl.WSDL2Java instead, and import them into the eclipse project.

remove all JAX-WS dependencies that I got from Joseph's example.

Added these dependencies in my pom (thx Radek Kantor from https://answers.atlassian.com/questions/43307/getting-a-web-service-client-working-within-a-jira-plugin)

<dependency>
    <groupId>axis</groupId>
    <artifactId>axis</artifactId>
    <version>1.3</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>axis</groupId>
    <artifactId>axis-jaxrpc</artifactId>
    <version>1.3</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>axis</groupId>
    <artifactId>axis-saaj</artifactId>
    <version>1.3</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>axis</groupId>
    <artifactId>axis-wsdl4j</artifactId>
    <version>1.5.1</version>
    <scope>provided</scope>
</dependency>

refactored my code so that it used the newly created java classes instead of the old ones.

Now it works like a charm!

0 votes
Issa January 20, 2013

Hi Joseph,

I'm writing a plugin against Jira 5.1.8 which needs to call a SOAP service. The stub is generated by CXF 2.7.2. Java version 1.6.0_35.

When the plugin tries to send a request, I always get a interface com.sun.xml.internal.ws.developer.WSBindingProvider is not visible from class loader error

I've tried to update my plugin from your example, but still the same error. Any ideas? I don't know any other solution ? Is there any by the way ? I guess using Axis or Metro will not help at all.

Thx

0 votes
Kyle DesMarais June 27, 2012

I wish I could tell you I figured this out. I ended up using HttpsURLConnection to do a post to a different endpoint. I have not had a chance to revisit the problem.

0 votes
Andris Bērziņš
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.
June 27, 2012

Have you fixed this problem? I seem to have the same issue and am looking for a solution.

0 votes
Kyle DesMarais March 28, 2012

I have now tried to implement the webservice using wsimport generated classes as well as spring's JaxWsPortProxyFactoryBean.

Both methods appear to require classes or interfaces that are not being loaded from the jdk or are not visible.

[wsimport generated classes]

interface com.sun.xml.internal.ws.developer.WSBindingProvider is not visible from class loader

[spring JaxWsPortProxyFactoryBean]

java.lang.ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl

Are these classes not in the system bundle?

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