RE: Error during build !!
Thanks for your informatin, I was able to take this forward after reverting to java version 1.5.0_15 \apache-cxf-2.0.4-incubator-srcmvn -version Maven version: 2.0.8 Java version: 1.5.0_15 OS name: windows xp version: 5.1 arch: x86 Family: windows \apache-cxf-2.0.4-incubator-srcjava -version java version 1.5.0_15 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04) Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing) \apache-cxf-2.0.4-incubator-srcjavac -version javac 1.5.0_15 Now, the build is successful but one of the testcase is failing... Let me know incase it's a problem with the testcase or something else... Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.157 sec FAILURE! testFactory(org.apache.cxf.binding.soap.SoapBindingFactoryTest) Time elapsed: 0.11 sec FAILURE! org.junit.ComparisonFailure: expected:[] but was:[ ] at org.junit.Assert.assertEquals(Assert.java:96) at org.junit.Assert.assertEquals(Assert.java:116) at org.apache.cxf.binding.soap.SoapBindingFactoryTest.testFactory(SoapBindingFa ctoryTest.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunn er.java:99) at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner. java:81) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterR unner.java:34) at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java: 75) at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClass MethodsRunner.java:66) at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner .java:35) at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner. java:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterR unner.java:34) at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62 ) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(Ab stractDirectoryTestSuite.java:138 ) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractD irectoryTestSuite.java:125) at org.apache.maven.surefire.Surefire.run(Surefire.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireB ooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818 ) Running org.apache.cxf.binding.soap.RPCInInterceptorTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.172 sec Running org.apache.cxf.binding.soap.SoapOutInterceptorTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.312 sec Running org.apache.cxf.binding.soap.ReadHeaderInterceptorTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec Results : Failed tests: testFactory(org.apache.cxf.binding.soap.SoapBindingFactoryTest) Tests run: 20, Failures: 1, Errors: 0, Skipped: 0 [INFO] [ERROR] BUILD FAILURE -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 6:58 PM To: cxf-user@incubator.apache.org Cc: harbhanu; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Error during build !! On Wednesday 26 March 2008, harbhanu wrote: I am trying to build CXF [2.0.4] using maven, but getting the following error during build... .. D:\JWork\CXF\apache-cxf-2.0.4-incubator-srcjavac -version javac 1.5.0_01 javac: no source files Usage: javac options source files D:\JWork\CXF\apache-cxf-2.0.4-incubator-srcjava -version java version 1.6.0_03 Java(TM) SE Runtime Environment (build 1.6.0_03-b05) Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing) D:\JWork\CXF\apache-cxf-2.0.4-incubator-srcmvn -version Maven version: 2.0.8 Java version: 1.5.0_01 OS name: windows xp version: 5.1 arch: x86 Family: windows Something very strange is going on. From the command line, you are getting 1.6.0_03, but in maven, you are getting 1.5.0_01. That said,
Re: HTTPS and CXF Protocol mismatch: engine's protocol is http, the url protocol is https
First of all thank you boys! I really appreciate your valuable help. How did you feed the CXF configuration to the server? I am working under eclipse; I have specified this argument (into the run section) -Dcxf.config.file.url=C:/Documents and Settings/ SecureServer.xml. (I have used ) The file SecureServer.xml is included in the first mail. I am interested in developing a server which listens on connections via https; this is my server: package com.hw.server; String address = https://localhost:9001/helloWorld;; IHelloWorld implementor = new HelloWorldImpl(); Service.publish(address, implementor); System.out.println(Server ready); I am currently using the 2.0.5 snapshot downloaded from cxf website but nothing has changed and I continue having the same error (protocol mismatch). Another thing you could explain me: what's the difference between sec: keyManagers and sec:trustManager and why do I have to specify the password twice (inside keyPassoword= and inside password= ) ? sec:keyManagers keyPassword=password sec:keyStore type=JKS password=password file=C:/certs/cherry.jks/ /sec:keyManagers sec:trustManagers sec:keyStore type=JKS password=password file=C:/certs/truststore.jks/ /sec:trustManagers Thank you. __ Voce Senza Limiti: chiama in tutta Italia a 0 cent. SOLO 9,90 EURO AL MESE fino al 27/03/08! http://abbonati.tiscali.it/promo/vocesenzalimiti_2603/
cxf-2.0.5 snapshot fails with scope=session
Following the post http://www.nabble.com/Share-object-in-request-scope-on-ws-server-td14611572.html and upgrading cxf-2.0.4 with the spring libraries of 2.0.8 I was able to make my service work serverside only. But If I try cxf-2.0.5 which has spring-2.0.8 I am getting again. SEVERE: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'test': Cannot resolve reference to be an 'testService' while setting bean property 'serviceBean'; nested exception is org.springframework.beans.factory.BeanCreatio nException: Error creating bean with name 'testService': Scope 'session' is not active for the current thread; consider defin ing a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateExc eption: No thread-bound request found: Are you referring to request attributes outside of an actual web request? If you are a ctually operating within a web request and still receive this message,your code is probably running outside of DispatcherServ let/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testService': Scope 'sessi on' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request a ttributes outside of an actual web request? If you are actually operating within a web request and still receive this message ,your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or Re questContextFilter to expose the current request. Caused by: java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request? If you are actually operating within a web request and still receive this message,your code is probab ly running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter t o expose the current request. at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:10 2) at org.springframework.web.context.request.SessionScope.get(SessionScope.java:88) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:283) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver .java:267) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueR esolver.java:110)
Re: cxf-2.0.5 snapshot fails with scope=session
Vassilis Virvilis wrote: Following the post http://www.nabble.com/Share-object-in-request-scope-on-ws-server-td14611572.html and upgrading cxf-2.0.4 with the spring libraries of 2.0.8 I was able to make my service work serverside only. But If I try cxf-2.0.5 which has spring-2.0.8 I am getting again. http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes-other-web-configuration To make session scope work when you're not using Spring MVC you need to add a listener to your web.xml. SEVERE: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'test': Cannot resolve reference to be an 'testService' while setting bean property 'serviceBean'; nested exception is org.springframework.beans.factory.BeanCreatio nException: Error creating bean with name 'testService': Scope 'session' is not active for the current thread; consider defin ing a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateExc eption: No thread-bound request found: Are you referring to request attributes outside of an actual web request? If you are a ctually operating within a web request and still receive this message,your code is probably running outside of DispatcherServ let/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testService': Scope 'sessi on' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request a ttributes outside of an actual web request? If you are actually operating within a web request and still receive this message ,your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or Re questContextFilter to expose the current request. Caused by: java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request? If you are actually operating within a web request and still receive this message,your code is probab ly running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter t o expose the current request. -- Ian Roberts | Department of Computer Science [EMAIL PROTECTED] | University of Sheffield, UK
Re: cxf-2.0.5 snapshot fails with scope=session
On Thursday 27 March 2008, Ian Roberts wrote: Vassilis Virvilis wrote: Following the post http://www.nabble.com/Share-object-in-request-scope-on-ws-server-td14611572.html and upgrading cxf-2.0.4 with the spring libraries of 2.0.8 I was able to make my service work serverside only. But If I try cxf-2.0.5 which has spring-2.0.8 I am getting again. http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes-other-web-configuration To make session scope work when you're not using Spring MVC you need to add a listener to your web.xml. Oh I have, I just didn't mention it. Somewhere I read that order of the org.springframework.web.context.request.RequestContextListener org.springframework.web.context.ContextLoaderListener is important so I tried it both ways ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameCompany WS/display-name context-param param-namecontextConfigLocation/param-name param-valueclasspath:com/company/ws/impl/server-beans-simple.xml/param-value /context-param listener listener-class /listener-class /listener listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener servlet servlet-nameCXFServlet/servlet-name servlet-classorg.apache.cxf.transport.servlet.CXFServlet/servlet-class /servlet servlet-mapping servlet-nameCXFServlet/servlet-name url-pattern/*/url-pattern /servlet-mapping /web-app .bill
Problems in using TLS
Hey, I'm trying to communicate with a web service using Apache CXF using TLS. When I specify TLS in the cxf.xml file using: http-conf:tlsClientParameters secureSocketProtocol=TLS sec:trustManagers sec:keyStore password=password url=file:\C:/path/to/keystore/ /sec:trustManagers sec:cipherSuitesFilter sec:include.*.*./sec:include /sec:cipherSuitesFilter /http-conf:tlsClientParameters it is failing with the following error: 27-Mar-2008 11:06:03 org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Connection reset at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat abindingInterceptor.java:75) at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68 ) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) at $Proxy35.login(Unknown Source) at thirdPartyAPI.test.Test.loginAppuser(Test.java:135) at thirdPartyAPI.test.Test.main(Test.java:61) Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313) at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat abindingInterceptor.java:73) ... 9 more Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source) at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCachin g(HTTPConduit.java:1766) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit .java:1734) at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:4 2) at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96) at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214) at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311) ... 10 more Exception in thread main javax.xml.ws.soap.SOAPFaultException: Connection reset at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175) at $Proxy35.login(Unknown Source) at thirdPartyAPI.test.Test.loginAppuser(Test.java:135) at thirdPartyAPI.test.Test.main(Test.java:61) Caused by: org.apache.cxf.interceptor.Fault: Connection reset at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat abindingInterceptor.java:75) at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68 ) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) ... 3 more Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313) at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDat abindingInterceptor.java:73) ... 9 more Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source) at
Re: cxf-2.0.5 snapshot fails with scope=session
Vassilis Virvilis wrote: ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; I notice you're using a Servlet 2.3 web.xml - what servlet container are you using? The RequestContextListener only works with a Servlet 2.4-compatible container (if you're on Tomcat, this means v5.0 or later), if you're stuck with an older server version then you can use the RequestContextFilter instead. Oh yes, and you do have an aop:scoped-proxy/ in your session-scoped bean, don't you...? Other than that I don't know what to suggest, sorry. Ian -- Ian Roberts | Department of Computer Science [EMAIL PROTECTED] | University of Sheffield, UK
Re: HTTPS and CXF Protocol mismatch: engine's protocol is http, the url protocol is https
This may be the problem: Try -Dcxf.config.file instead of -Dcxf.config.file.url, perhaps. Am Donnerstag, den 27.03.2008, 10:00 +0100 schrieb [EMAIL PROTECTED]: First of all thank you boys! I really appreciate your valuable help. How did you feed the CXF configuration to the server? I am working under eclipse; I have specified this argument (into the run section) -Dcxf.config.file.url=C:/Documents and Settings/ SecureServer.xml. (I have used ) The file SecureServer.xml is included in the first mail. I am interested in developing a server which listens on connections via https; this is my server: package com.hw.server; String address = https://localhost:9001/helloWorld;; IHelloWorld implementor = new HelloWorldImpl(); Service.publish(address, implementor); System.out.println(Server ready); I am currently using the 2.0.5 snapshot downloaded from cxf website but nothing has changed and I continue having the same error (protocol mismatch). Another thing you could explain me: what's the difference between sec: keyManagers and sec:trustManager and why do I have to specify the password twice (inside keyPassoword= and inside password= ) ? sec:keyManagers keyPassword=password sec:keyStore type=JKS password=password file=C:/certs/cherry.jks/ /sec:keyManagers sec:trustManagers sec:keyStore type=JKS password=password file=C:/certs/truststore.jks/ /sec:trustManagers Thank you. __ Voce Senza Limiti: chiama in tutta Italia a 0 cent. SOLO 9,90 EURO AL MESE fino al 27/03/08! http://abbonati.tiscali.it/promo/vocesenzalimiti_2603/
Re: HTTPS and CXF Protocol mismatch: engine's protocol is http, the url protocol is https
We have two configuration system properties to set the configuration file, one is cxf.config.file for the configuration file in the class path such as -Dcxf.config.file=SercureServer.xml , the other is cxf.config.file.url which is used for the point out the configuration's URL. In your case , I think it could be the error + missing the protocol header file:/. Willem Glen Mazza wrote: This may be the problem: Try -Dcxf.config.file instead of -Dcxf.config.file.url, perhaps. Am Donnerstag, den 27.03.2008, 10:00 +0100 schrieb [EMAIL PROTECTED]: First of all thank you boys! I really appreciate your valuable help. How did you feed the CXF configuration to the server? I am working under eclipse; I have specified this argument (into the run section) -Dcxf.config.file.url=C:/Documents and Settings/ SecureServer.xml. (I have used ) The file SecureServer.xml is included in the first mail. I am interested in developing a server which listens on connections via https; this is my server: package com.hw.server; String address = https://localhost:9001/helloWorld;; IHelloWorld implementor = new HelloWorldImpl(); Service.publish(address, implementor); System.out.println(Server ready); I am currently using the 2.0.5 snapshot downloaded from cxf website but nothing has changed and I continue having the same error (protocol mismatch). Another thing you could explain me: what's the difference between sec: keyManagers and sec:trustManager and why do I have to specify the password twice (inside keyPassoword= and inside password= ) ? sec:keyManagers keyPassword=password sec:keyStore type=JKS password=password file=C:/certs/cherry.jks/ /sec:keyManagers sec:trustManagers sec:keyStore type=JKS password=password file=C:/certs/truststore.jks/ /sec:trustManagers Thank you. __ Voce Senza Limiti: chiama in tutta Italia a 0 cent. SOLO 9,90 EURO AL MESE fino al 27/03/08! http://abbonati.tiscali.it/promo/vocesenzalimiti_2603/
Re: cxf-2.0.5 snapshot fails with scope=session
On Thursday 27 March 2008, Ian Roberts wrote: Vassilis Virvilis wrote: ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; I notice you're using a Servlet 2.3 web.xml - what servlet container are you using? The RequestContextListener only works with a Servlet 2.4-compatible container (if you're on Tomcat, this means v5.0 or later), if you're stuck with an older server version then you can use the RequestContextFilter instead. I have tomcat 5.25. The http://java.sun.com/dtd/web-app_2_3.dtd stuff is black magic for me. I copy pasted it from somewhere I tried however your suggestion and still crashes the same way Oh yes, and you do have an aop:scoped-proxy/ in your session-scoped bean, don't you...? Yes I do. Other than that I don't know what to suggest, sorry. No problem, many thanks anyway... The only reason that I reported it was the same webapp works with 2.0.4 libs while it crashes with 2.0.5 libs .bill
Re: scope=session client side configuraion
On Thursday 27 March 2008, Glen Mazza wrote: Actually, I didn't realize I had replied to you privately, something is strange with your email account--for a few accounts, including yours, when you hit reply it goes not to the list but to just back to the person. I think that's normal. You need to hit reply-all in order to reply to the list and to the person. http://www.unicom.com/pw/reply-to-harmful.html Anyway it *** works *** now. (that is with 2.0.4, still crashes with 2.0.5 see other thread) I was confused by the fact that ClientInterface test = (ClientInterface) context.getBean(Client); returns the same object every time you called it and even if I set the scope to prototype (for the client) looks like all the proxy object are using the same client / connection aka session. So I couldn't test the session scope from one java program but I could from two or a java program and a browser. So the trick is to use tha jaxws frontend (doesn't work with simple client frontend) and do client side: ClientInterface test = (ClientInterface) context.getBean(Client); ((BindingProvider) test).getRequestContext().put( BindingProvider.SESSION_MAINTAIN_PROPERTY, true); along with the scope=session documented in a previous link in this thread. .bill
Re: re[jira] stful uri binding value not set to input parameter bean property
Hi Tam I'm afraid I don't know what the issue is here. Looks like it's either the problem of missing some JAXB annotation... or more likely the problem of Jettison... Does someone know, is it possible to fix this issue at the JAXB level ? Cheers, Sergey Hi Sergey I have run into another problem! I am making a GET request to a service and it is returning me some JSON content. The content I am getting is: {telephoneNo:{code:161,number:2382907}} the content I want is: {telephoneNo:{code:0161,number:2382907}} I have tried adding an @XmlElement(type = String.class) annotation to the Field of the Object returned by the service but that makes no difference. If I add a non numeric char to the code field value (0161S) the value is returned in quotes, so it looks like it is determining the value type from the value rather than the Field or annotation?! Is this a bug or is there something I'm not setting somewhere? Cheers, Tam Sergey Beryozkin wrote: Hi Tam Thanks for that, I have now got it up and running. You also have to add the @XmlRootElement annotation to the object returned by the service otherwise you get a NullPointerException. The exception is quite poor all-right at the moment. In this case and exception saying no MessageBodyWriter was found has to be generated. I actually have a minor patch I did on weekends to improve on some of the things in this area, including the support for a standard WebApplicationException. Is it possible to specify the @ProduceMime type in the Spring context file. You can do @GET @ProduceMime(application/xml, application/json) and then, depending on the value of the Accept type the approproate MessageBodyWriter will be selected. You can also debug the formats like this : GET /yourResource?_contentType=application/xml or GET /yourResource?_contentType=xml etc, with xml in this case defaulting to application/xml. More shortcuts like 'xml' can be easily added to a system query handler dealing with this query... Cheers, Sergey Hi Sergey Thanks for that, I have now got it up and running. You also have to add the @XmlRootElement annotation to the object returned by the service otherwise you get a NullPointerException. Is it possible to specify the @ProduceMime type in the Spring context file. At the moment if i want a service to return different mime types it seems like i need multiple implementations of the method with different annotations. Cheers, Tam Sergey Beryozkin wrote: Hi Tam, I'm sorry, but I've never got to updating the documentaion but I've created a JIRA to have the docs updated asap, I'll try to update them in the next few days... In meantime have a look please at a basic jaxrs demo, the only difference with what the documentation says is that different annotations are used, for ex @GET instead of @HttpMethod(Get), @Path instead of @UriTemplate and @PathParam instead of @UriParam... Cheers, Sergey - Original Message - From: tam.sayers [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 25, 2008 11:05 AM Subject: Re: re[jira] stful uri binding value not set to input parameter bean property Hi Sergey Thanks for the reply. The version of the jax-rs implementation in the apache-cxf-2.1-incubator-20080321.032844-42.zip seems to be different than the one described in http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html. Do you know if there is any documentation anywhere for the newer version? Tam Sergey Beryozkin wrote: Hi Please try the same with the current JAX-RS implementation in CXF. I'm not qute sure why this does not work for the CXF HTTP binding, but one thing is that this binding can be considered depecated...unless someone can confirm they're going to mantain it... Cheers, Sergey I have tried calling the following service using the cxf 2.0.4 and 2.1 code and when using both the accountNumber is not set to the GetForAccount bean. When debugging through the code I can see that the values are being read from the URL and an XML element is being generated in the form: getTelephoneForAccount accountNumberab123/accountNumber /getTelephoneForAccount This is then added to the message but never gets set to the GetForAccount bean. Does anybody know why the property is not being set? Service definition: @WebService(targetNamespace = http://uk.co.jdwilliams/account;) public interface AccountTelephoneNumberService { @Get @HttpResource(location = /telnos/{accountNumber}) @WebResult(name = telephoneNo) TelephoneNumberTO getTelephoneForAccount(GetForAccount getForAccount); } input bean: public class GetForAccount { private String accountNumber; /** * @return the accountNumber */ public String getAccountNumber() { return accountNumber; } /** * @param accountNumber the accountNumber to set */
Re: HTTPS and CXF Protocol mismatch: engine's protocol is http, the url protocol is https
Thank you guys again. Now I can safely start an https server (wow I am happy; btw -Dcxf. config.file did the trick). Now I have problems with the client: [Exception] unable to find valid certification path to requested target. Please tell me if I have understood these points correctly: 1) I have a server which has two keystores: a) trustManagers (inside cxf.xml) is a keystore (.jks) which contains the CA cert b) keyManagers is a keystore which contains server's publick/private key and clients' certs (but about this, I am not totally sure); 2) I have a client which has two keystores (see above); BTW I wish to understand the protocol itself: 3) client C wants to connect to server S; server S sends its cert to client C; C uses this cert to encrypt messages. Is it correct? How can I specify which cipher suites the client should use? Please help me understand this. Thanks in advance __ Voce Senza Limiti: chiama in tutta Italia a 0 cent. SOLO 9,90 EURO AL MESE fino al 27/03/08! http://abbonati.tiscali.it/promo/vocesenzalimiti_2603/
RE: HTTPS and CXF Protocol mismatch: engine's protocol is http, the url protocol is https
Thanks for replaying! The same is that we can't use https with client, but seems that I have different problem. Does it tell you what it is? Regards, Luba. INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Connection refused: connect at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts( AbstractOutDatabindingInterceptor.java:75) at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInter ceptor.java:68) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC hain.java:208) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68) at $Proxy15.sayHi(Unknown Source) at cxf_client.TestFromSSLClientExample.TestClient(TestFromSSLClientExample. java:73) at cxf_client.TestFromSSLClientExample.main(TestFromSSLClientExample.java:1 7) Caused by: com.ctc.wstx.exc.WstxIOException: Connection refused: connect at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313) at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts( AbstractOutDatabindingInterceptor.java:73) ... 9 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.Socket.connect(Socket.java:507) at sun.net.NetworkClient.doConnect(NetworkClient.java:152) at sun.net.www.http.HttpClient.openServer(HttpClient.java:365) at sun.net.www.http.HttpClient.openServer(HttpClient.java:477) at sun.net.www.protocol.https.HttpsClient.init(HttpsClient.java:280) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:337) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttp Client(AbstractDelegateHttpsURLConnection.java:176) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnecti on.java:744) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Ab stractDelegateHttpsURLConnection.java:162) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConne ction.java:836) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsU RLConnectionImpl.java:230) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHead ersTrustCaching(HTTPConduit.java:1766) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWri te(HTTPConduit.java:1734) at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutpu tStream.java:42) at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96) at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214) at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311) ... 10 more Hit uncaught exception org.apache.cxf.interceptor.Fault -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 4:56 PM To: cxf-user@incubator.apache.org Subject: Re: HTTPS and CXF Protocol mismatch: engine's protocol is http, the url protocol is https Dear Alpin Luba (I don't know what your name is sorry), I wish I could help you! Unfortunately I think I have understood the problem but I don't know how to solve it: faultCode=PARSER_ERROR: Problem parsing 'https://localhost: 9000/helloWorld?wsdl'.: javax.net.ssl.SSLHandshakeException: sun. security.validator.ValidatorException: PKIX path building failed: sun. security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target As far as i know, this exception is raised because I am using a self made cert (see: http://blogs.sun. com/andreas/entry/no_more_unable_to_find); I followed the instructions in this website (basically add the server cert to your keystore) without success. I don't know what to do. Suggestions? Bye __ Voce Senza Limiti: chiama in tutta Italia a 0 cent. SOLO 9,90 EURO AL MESE fino al 27/03/08! http://abbonati.tiscali.it/promo/vocesenzalimiti_2603/
Re: HTTPS and CXF Protocol mismatch: engine's protocol is http, the url protocol is https
No replies ? By the way, I have managed now to get a different exception client- side Caused by: java.net.SocketException: Software caused connection abort: recv failed Basically I resolved the previous problem ([Exception] unable to find valid certification path to requested target.) by adding server's certificate into %JAVA_HOME% \jre\lib\security\cacerts. No one knows what java.net.SocketException: Software caused connection abort: recv failed means? And again what are the roles of keyManagers and trustManagers both client and server side? Thanks in advance __ Voce Senza Limiti: chiama in tutta Italia a 0 cent. SOLO 9,90 EURO AL MESE fino al 27/03/08! http://abbonati.tiscali.it/promo/vocesenzalimiti_2603/
RE: WARNING: dispatch failed!
Thanks for that - I'm not sure what has produced the warning in my log file, I don't think I have trapped it and written it to the log, I have assumed CXF has written it to the log. It hasn't written a stack trace so I'm at a loss as to where it has come from. It has only happened once in 2 weeks of continuous operation. The reason I asked the question is that I thought somebody might have recognised the syntax of the log message and could have pointed me at the CXF module (or jetty, or ...) to give me some idea of what it might be. Maybe I can do a binary search of the jar files in my project to see which one contains Dispatch failed!. We restarted the service and it has been running fine for the last 18 hours. Richard Shaw ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤ Richard Shaw Technical Design Authority - Information Solutions Consultancy Intelligent Transport Systems Atkins Highways and Transportation Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW Tel: +44 (0) 1372 756407 Fax: +44 (0) 1372 740055 Mob: 07740 817586 E-mail: [EMAIL PROTECTED] www.atkinsglobal.com/its -Original Message- From: Jervis Liu [mailto:[EMAIL PROTECTED] Sent: 27 March 2008 00:20 To: cxf-user@incubator.apache.org Subject: Re: WARNING: dispatch failed! Hi Shaw, it will be very helpful if you can provide the whole stack trace, as at the moment, it is hard to know where this Dispatch failed error message comes from. Certainly its sth wrong with CXF server, it can be a out-of-threads or out-of-memory problem as Glen suggested, or can be anything else for example a problem in Jetty or in Tomcat. We cant tell exactly unless we have a detailed stack trace, or a test case that can reproduce this problem (a test case would be hard as it has to be a long running process with client/server involved I guess. Simply hope you wont run into this problem again :-) ) Cheers, Jervis Shaw, Richard A wrote: Does anybody know why I would get the following error ? 26-Mar-2008 11:52:11 sun.reflect.GeneratedMethodAccessor19 invoke WARNING: dispatch failed! I have a client which communicated with a service every minute. The service reads some data from a database and returns it. A few hours ago my server started to log the error above every minute. Which suggests that it is still receveived communcation from the client evey minute, however it has stopped providing its wsdl definition. I was asking for the wsdl from my web browser just to check that the server was still running. I've restarted my service now and everything is working fine again (I didn't restart the client). I'm using cxf-2.0-incubator-RC.jar from 23rd April 2007 Richard Shaw ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤ Richard Shaw Technical Design Authority - Information Solutions Consultancy Intelligent Transport Systems Atkins Highways and Transportation Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW Tel: +44 (0) 1372 756407 Fax: +44 (0) 1372 740055 Mob: 07740 817586 E-mail: [EMAIL PROTECTED] www.atkinsglobal.com/its This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding. The ultimate parent company of the Atkins Group is WS Atkins plc. Registered in England No. 1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW. A list of wholly owned Atkins Group companies registered in the United Kingdom can be found at http://www.atkinsglobal.com/terms_and_conditions/index.aspx Consider the environment. Please don't print this e-mail unless you really need to. This message has been scanned for viruses by MailControl - (see http://bluepages.wsatkins.co.uk/?6875772)
Re: scope=session client side configuraion
Yea, looking at the code for the sessions stuff in the http conduit, the sessionMaintain setting is only read from current message. Thus, that requires being able to set properties on the currently dispatching message. The JAX-WS frontend has the BindingProvider.getRequestContext() stuff to set those properties. The simple frontend doesn't have any sort of request context or ability to pre-set properties on the message. Thus, it wouldn't work. The only way to get it to work would be to write a simple interceptor that just does: message.put(Message.MAINTAIN_SESSION, Boolean.TRUE); and configure that on the outbound chain for the client. Dan On Thursday 27 March 2008, Vassilis Virvilis wrote: On Thursday 27 March 2008, Glen Mazza wrote: Actually, I didn't realize I had replied to you privately, something is strange with your email account--for a few accounts, including yours, when you hit reply it goes not to the list but to just back to the person. I think that's normal. You need to hit reply-all in order to reply to the list and to the person. http://www.unicom.com/pw/reply-to-harmful.html Anyway it *** works *** now. (that is with 2.0.4, still crashes with 2.0.5 see other thread) I was confused by the fact that ClientInterface test = (ClientInterface) context.getBean(Client); returns the same object every time you called it and even if I set the scope to prototype (for the client) looks like all the proxy object are using the same client / connection aka session. So I couldn't test the session scope from one java program but I could from two or a java program and a browser. So the trick is to use tha jaxws frontend (doesn't work with simple client frontend) and do client side: ClientInterface test = (ClientInterface) context.getBean(Client); ((BindingProvider) test).getRequestContext().put( BindingProvider.SESSION_MAINTAIN_PROPERTY, true); along with the scope=session documented in a previous link in this thread. .bill -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Problems in using TLS
I don't suppose there would be any chance of you trying the 2.0.5 stuff we're voting on? http://people.apache.org/~dkulp/stage_cxf/2.0.5-incubator/ I made some changes to the TLS stuff in 2.0.5 to make it work better and with less configuration. Dan On Thursday 27 March 2008, brmaguir wrote: Hey, I'm trying to communicate with a web service using Apache CXF using TLS. When I specify TLS in the cxf.xml file using: http-conf:tlsClientParameters secureSocketProtocol=TLS sec:trustManagers sec:keyStore password=password url=file:\C:/path/to/keystore/ /sec:trustManagers sec:cipherSuitesFilter sec:include.*.*./sec:include /sec:cipherSuitesFilter /http-conf:tlsClientParameters it is failing with the following error: 27-Mar-2008 11:06:03 org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Connection reset at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart s(AbstractOutDat abindingInterceptor.java:75) at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInt erceptor.java:68 ) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto rChain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135 ) at $Proxy35.login(Unknown Source) at thirdPartyAPI.test.Test.loginAppuser(Test.java:135) at thirdPartyAPI.test.Test.main(Test.java:61) Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313) at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart s(AbstractOutDat abindingInterceptor.java:73) ... 9 more Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source) at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unk nown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect( Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unkn own Source) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHe adersTrustCachin g(HTTPConduit.java:1766) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstW rite(HTTPConduit .java:1734) at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOut putStream.java:4 2) at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96) at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214) at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311) ... 10 more Exception in thread main javax.xml.ws.soap.SOAPFaultException: Connection reset at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175 ) at $Proxy35.login(Unknown Source) at thirdPartyAPI.test.Test.loginAppuser(Test.java:135) at thirdPartyAPI.test.Test.main(Test.java:61) Caused by: org.apache.cxf.interceptor.Fault: Connection reset at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart s(AbstractOutDat abindingInterceptor.java:75) at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInt erceptor.java:68 ) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto rChain.java:207) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135 ) ... 3 more Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313) at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePart s(AbstractOutDat abindingInterceptor.java:73) ... 9 more Caused by: java.net.SocketException: Connection reset at
Re: Nested exceptions
Hello, it doesnt explain java to wsdl way. could anyone please give me a sample using annotations( @WebFault, @Xml) or any sample? I need to define everything in java and expose wsdl file on runtime using CXF. I found some samples but I could not make it run in CXF @WebFault(name = AddNumbersException, targetNamespace = http://server.fromjava/jaxws;) public class AddNumbersException_Exception extends Exception { private AddNumbersException faultInfo; public AddNumbersException_Exception(String message, AddNumbersException faultInfo) { super(message); this.faultInfo = faultInfo; } public AddNumbersException_Exception(String message, AddNumbersException faultInfo, Throwable cause) { super(message, cause); this.faultInfo = faultInfo; } public AddNumbersException getFaultInfo() { return faultInfo; } } thanks, Mehmet - Original Message From: Glen Mazza [EMAIL PROTECTED] To: cxf-user@incubator.apache.org Sent: Monday, March 24, 2008 7:47:07 PM Subject: Re: Nested exceptions Yes, look at catch (CorrelationIdNotFoundFault e) {...} in Step #10 of [1] below. HTH, Glen [1] http://www.jroller.com/gmazza/date/20080308 Am Montag, den 24.03.2008, 08:34 -0700 schrieb Mehmet Imga: Hello, is there a way to throw nested exceptions in webservices? for example I would like to throw following exception in server site and get more info about nested exception in client site. throw new WSException(outer exception message, new SecurityException(inner exception message, null)); Thanks, Mehmet __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
Error occurs when I generate wsdl in Eclipse
Step: 1. Create a new Java first JAX-WS project 2. Create a new Interface called HelloWorld 3. Add web service and web method annotation and set SOAPBinding = true 4. Then I want to generate WSDL and other Client and Server code, the error occurs, please see the pictures in the attach Any body who can help me solve that Thanks and best regards Jackey
CXF client side logging setup with spring throws NPE
I am following description Enabling message logging using the Logging feature at http://cwiki.apache.org/CXF20DOC/configuration.html http://cwiki.apache.org/CXF20DOC/configuration.html . I'd like to be able to see the raw SOAP messages that my CXF-based client sends to the server and responses that come from the server. I want to use log4j, and have found from http://www.techper.net/2008/01/30/configuring-cxf-logging-to-go-through-log4j/ http://www.techper.net/2008/01/30/configuring-cxf-logging-to-go-through-log4j/ how to do it. In my src directory I've created META-INF/cxf/org.apache.cxf.Logger file that contains a single line: org.apache.cxf.common.logging.Log4jLogger To run the client, which happens to be a webapp, I don't need cxf-2.0.4-incubator.jar, and everything just works (except I don't see the raw SOAP messages). In order to be able to use the class org.apache.cxf.common.logging.Log4jLogger, I have to add the cxf-2.0.4-incubator.jar to the WEB-INF/lib directory. Now I am getting a NullPointerException in spring class org.apache.cxf.bus.spring.BusApplicationContext, line 78: public void setConfigLocations(String[] locations) { Assert.noNullElements(locations, Config locations must not be null); this.configLocations = new String[locations.length]; // == NPE, due to locations == null for (int i = 0; i locations.length; i++) { this.configLocations[i] = resolvePath(locations[i]); } } which is caused because null is being passed from BusApplicationContext's base class constructor in class org.apache.cxf.bus.spring.BusApplicationContext: public BusApplicationContext(String cf, boolean include, ApplicationContext parent) { super((String[])null, false, parent); // == this null causes the above NPE cfgFile = cf; includeDefaults = include; refresh(); } Before the NPE is thrown, I see that LogUtils correctly initializes org.apache.cxf.common.logging.Log4jLogger for logging: LogUtils.java ( 72) : Using org.apache.cxf.common.logging.Log4jLogger for logging. My environment consists of: CXF 2.0.4 Spring 2.5.2 Struts2 2.0.11 tomcat 6.0.16 So what am I doing wrong? Is this a spring question? -- View this message in context: http://www.nabble.com/CXF-client-side-logging-setup-with-spring-throws-NPE-tp16345372p16345372.html Sent from the cxf-user mailing list archive at Nabble.com.