A couple of people have been having problems with WSIF use of the context
class loader recently.

 In this situation where the context class loader is null perhaps WSIF
should make an effort to try some other class loader. Does anyone have an
opinion?

       ...ant

Anthony Elder
[EMAIL PROTECTED]
Web Services Development
IBM UK Laboratories,  Hursley Park
(+44) 01962 818320, x248320, MP208.


"Chen, Tony" <[EMAIL PROTECTED]> on 31/03/2003 19:29:37

To:    Anthony Elder/UK/[EMAIL PROTECTED]
cc:
Subject:    RE: Exception when axis.jar is included



Anthony,

Thanks for the help. I tried the fix and it worked.

Remember that I needed to load the providers explicitly before? I still
need
to do that. Now I need to do both of these two things. The way WSIF loads
the providers could be more robust, I think.

Tony

-----Original Message-----
From: Anthony Elder [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 1:12 AM
To: [EMAIL PROTECTED]
Subject: Re: Exception when axis.jar is included



Hi Tony,

This looks like a similar problem to one you had some time ago where the
thread contextClassLoader is null. You could try adding the following
before you get the WSIFPort:

    if (Thread.currentThread().getContextClassLoader() == null) {
        ClassLoader cl = getClass().getClassLoader();
        Thread.currentThread().setContextClassLoader(cl);
    }

If you try this and it does resolve the problem, but you think WSIF should
be handling this for you could you reply to wsif-dev so it can be
discussed?

Thanks,

       ...ant

Anthony Elder
[EMAIL PROTECTED]
Web Services Development
IBM UK Laboratories,  Hursley Park
(+44) 01962 818320, x248320, MP208.


"Chen, Tony" <[EMAIL PROTECTED]> on 26/03/2003 18:11:26

Please respond to [EMAIL PROTECTED]

To:    [EMAIL PROTECTED]
cc:
Subject:    Exception when axis.jar is included



Hi,

I do the following to get a port so that I can call createOperation() on
it.

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service = factory.getService(definition, service,
portType);
        WSIFPort port = service.getPort();


Everything has been working fine until I had to add axis.jar to the
classpath for other functionality. Now I am getting this warning and then
an
exception:

[WARN] wsif - -WSIF0006W: Multiple WSIFProvider found supporting the same
namespace URI 'http://schemas.xmlsoap.org/wsdl/soap/'. Found
('org.apache.wsif.providers.soap.apachesoap.WSIFDynamicProvider_ApacheSOAP,
org.apache.wsif.providers.soap.apacheaxis.WSIFDynamicProvider_ApacheAxis')

java.lang.NullPointerException
 at org.apache.wsif.util.WSIFProperties$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.apache.wsif.util.WSIFProperties.getProperty(Unknown Source)
 at
org.apache.wsif.util.WSIFPluggableProviders.isDefaultProvider(Unknown
Source)
 at
org.apache.wsif.util.WSIFPluggableProviders.chooseProvider(Unknown Source)
 at org.apache.wsif.util.WSIFPluggableProviders.getProvider(Unknown
Source)
 at
org.apache.wsif.base.WSIFServiceImpl.createDynamicWSIFPort(Unknown Source)
 at org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)
 at org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)

Before I dig any deeper I wonder if anyone has seen this before and if
there
is a known solultion? Thanks.

Tony





Reply via email to