Hi all,
we're using CXF 2.1.9 and have a number of code first (annotated interfaces)
developed web services and WS clients for communicating with our web app.
The SessionService provides just login and logout methods.
We use a unit test that creates some threads that simply log in and out one
or more times per thread. We started with 50 threads doing 10
logins/logouts, varying those numbers doesn't change much as long as there's
more than one thread.

We keep getting either one or both of the exceptions below. We deployed the
app in Tomcat 6.0.20 and JBoss AS 5.1, all to the same effect. We use JDK
1.6.0.17. As recommended, we placed the jaxb-impl and jaxb-xjc jars from the
CXF distro into our classpath.

I know that CXF client proxies may not be thread-safe, and in our case each
thread uses it's own instance.

Monitoring the traffic with TCPmon hasn't show anything helpful yet. Can we
tune CXF's logging to get more useful information.

Any help is greatly appreciated.

Thanks,

Michael 

-----------------

The client proxy is created as follows:

        public class SessionWebServiceClientImpl implements 
SessionWebServiceClient
{

        private String serviceURL;
        private SessionWebService serviceClient;
        private JaxWsProxyFactoryBean clientProxyFactory;

        public SessionWebServiceClientImpl() throws
WebServiceClientInstantiationException {
                /* Instantiate the service */

                this.clientProxyFactory = new JaxWsProxyFactoryBean();
                this.serviceURL =
CXFWebServiceClientProxy.this.serviceConnector.getSessionServiceURL().toString();
                
this.clientProxyFactory.setServiceClass(SessionWebService.class);
                this.clientProxyFactory.setAddress(this.serviceURL);
                this.serviceClient = (SessionWebService) 
this.clientProxyFactory.create();
                Client client =
this.clientProxyFactory.getClientFactoryBean().getClient();
                HTTPConduit conduit = (HTTPConduit) client.getConduit();
                //HTTPClientPolicy clientPolicy = new HTTPClientPolicy();
                HTTPClientPolicy clientPolicy =
CXFWebServiceClientProxy.this.newClientPolicy();
           clientPolicy.setReceiveTimeout(
                        CXFWebServiceClientProxy.this.serviceConnector
                        .getSessionServiceTimeout().getMilliSeconds()
                        );
                conduit.setClient(clientPolicy);
                //System.out.println(Thread.currentThread().getName() +
this.clientProxyFactory.getClass().getSimpleName() + ':' +
this.clientProxyFactory.toString());
                //System.out.println(Thread.currentThread().getName() +
this.serviceClient.getClass().getSimpleName() + ':' +
this.serviceClient.toString());

        }

------------------

This is from a run with 4 threads, showing that separate instances are used:

   
Thread-3WebServiceClientProxyFactory:de.destatis.idb.web.ws.client.factory.webserviceclientproxyfact...@c5c3ac
   
Thread-3CXFWebServiceClientProxy:de.destatis.idb.web.ws.client.cxf.cxfwebserviceclientpr...@1b16e52
    Login 3.0
   
Thread-0WebServiceClientProxyFactory:de.destatis.idb.web.ws.client.factory.webserviceclientproxyfact...@1f436f5
   
Thread-0CXFWebServiceClientProxy:de.destatis.idb.web.ws.client.cxf.cxfwebserviceclientpr...@4413ee
    Login 0.0
   
Thread-2WebServiceClientProxyFactory:de.destatis.idb.web.ws.client.factory.webserviceclientproxyfact...@1786e64
   
Thread-2CXFWebServiceClientProxy:de.destatis.idb.web.ws.client.cxf.cxfwebserviceclientpr...@197a37c
    Login 2.0
   
Thread-1WebServiceClientProxyFactory:de.destatis.idb.web.ws.client.factory.webserviceclientproxyfact...@6e3d60
   
Thread-1CXFWebServiceClientProxy:de.destatis.idb.web.ws.client.cxf.cxfwebserviceclientpr...@17fa65e
    Login 1.0
    log4j:WARN No appenders could be found for logger
(org.apache.cxf.bus.spring.BusApplicationContext).
    log4j:WARN Please initialize the log4j system properly.
    12.03.2010 18:34:19 org.apache.cxf.bus.spring.BusApplicationContext
getConfigResources
    INFO: No cxf.xml configuration file detected, relying on defaults.
    Malformed URL on system identifier: classpath:/schemas/wsdl
   
Thread-2JaxWsProxyFactoryBean:org.apache.cxf.jaxws.jaxwsproxyfactoryb...@5e5d8b
   
Thread-3JaxWsProxyFactoryBean:org.apache.cxf.jaxws.jaxwsproxyfactoryb...@1bfd68e
   
Thread-0JaxWsProxyFactoryBean:org.apache.cxf.jaxws.jaxwsproxyfactoryb...@6dbc09
    Thread-0$Proxy50:org.apache.cxf.jaxws.jaxwsclientpr...@98b375
   
Thread-1JaxWsProxyFactoryBean:org.apache.cxf.jaxws.jaxwsproxyfactoryb...@812bbc
    Thread-1$Proxy50:org.apache.cxf.jaxws.jaxwsclientpr...@207b64
    Thread-3$Proxy50:org.apache.cxf.jaxws.jaxwsclientpr...@2828f4
    Thread-2$Proxy50:org.apache.cxf.jaxws.jaxwsclientpr...@4b6e15

------------------

java.lang.NullPointerException
        at
org.apache.cxf.binding.soap.SoapBindingFactory.createSoapBinding(SoapBindingFactory.java:185)
        at
org.apache.cxf.binding.soap.SoapBindingFactory.createBindingInfo(SoapBindingFactory.java:174)
        at
org.apache.cxf.binding.AbstractBindingFactory.createBindingInfo(AbstractBindingFactory.java:82)
        at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:396)
        at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:258)
        at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:146)
        at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
        at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
        at
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
        at
de.destatis.idb.web.ws.client.cxf.CXFWebServiceClientProxy$SessionWebServiceClientImpl.<init>(CXFWebServiceClientProxy.java:371)
        at
de.destatis.idb.web.ws.client.cxf.CXFWebServiceClientProxy.getSessionWebServiceClient(CXFWebServiceClientProxy.java:92)
        at
de.destatis.idb.test.util.DefaultTestClient.login(DefaultTestClient.java:97)
        at 
de.destatis.idb.test.rollout.thread.TH900$LoginThread.run(TH900.java:83)
        at java.lang.Thread.run(Thread.java:619)

----------------

javax.xml.ws.soap.SOAPFaultException: Unmarshalling Error: null 
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:147)
        at $Proxy50.login(Unknown Source)
        at
de.destatis.idb.web.ws.client.cxf.CXFWebServiceClientProxy$SessionWebServiceClientImpl.login(CXFWebServiceClientProxy.java:387)
        at
de.destatis.idb.test.util.DefaultTestClient.login(DefaultTestClient.java:99)
        at 
de.destatis.idb.test.rollout.thread.TH900$LoginThread.run(TH900.java:83)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
        at java.util.LinkedList.clear(LinkedList.java:294)
        at
com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister.startPacking(Lister.java:296)
        at
com.sun.xml.bind.v2.runtime.reflect.Lister$CollectionLister.startPacking(Lister.java:265)
        at com.sun.xml.bind.v2.runtime.unmarshaller.Scope.add(Scope.java:114)
        at
com.sun.xml.bind.v2.runtime.property.ArrayERProperty$ReceiverImpl.receive(ArrayERProperty.java:206)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.endElement(UnmarshallingContext.java:492)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:250)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:214)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:646)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:533)
        at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:113)
        at
org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:242)
        at
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:125)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:665)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2160)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2043)
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1941)
        at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:629)
        at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
        at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:127)
        ... 5 more



-- 
View this message in context: 
http://old.nabble.com/Concurrency-issue-tp27882337p27882337.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to