Okay I put version 1.2.2 of commons-dbcp and it worked fine. Can't believe that it took me 2 hours to narrow down issue and 1 minute to resolve.
I debugged issue by hit and trial and removing all the code I added, how would you have done ? Is there any thing I could learn from this expereince. Experts opinion needed. Thanks, Petr --- On Tue, 12/2/08, Petr V. <[EMAIL PROTECTED]> wrote: From: Petr V. <[EMAIL PROTECTED]> Subject: commons-dbcp in class path fails CXF deployment To: [email protected] Date: Tuesday, December 2, 2008, 4:48 AM I simply added dependency on commons-dbcp in my project via maven. <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.2.1</version> </dependency> I am not using any class from this package at all. It is just in class path via maven and now my CXF services could not be deployed and I get following exception. When I access wsdl in browser, I get blank page I had to spend couple of hours to narrow down the issue. Never imagined that adding dependency on commans-dbcp would create an havoc. Is this some known issue, I eventually have to use hibernate and I am using org.apache.commons.dbcp.BasicDataSource for my data source. I am simply using Endpoint.publish(address, service); to publish my service The exception log is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:134) at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:65) at javax.xml.ws.Service.<init>(Service.java:56) at com.mypc.jcollector.collectorwebservice.serviceimpl.DefaultCollectorService.<init>(DefaultCollectorService.java:59) at com.mypc.jcollector.collectorwebservice.Test_CollectorServiceContract.createClient(Test_CollectorServiceContract.java:39) at com.mypc.jcollector.collectorwebservice.Test_CollectorServiceContract.access$000(Test_CollectorServiceContract.java:20) at com.mypc.jcollector.collectorwebservice.Test_CollectorServiceContract$1.runDelegate(Test_CollectorServiceContract.java:77) at com.mypc.jcollector.collectorwebservice.Test_CollectorServiceContract.runService(Test_CollectorServiceContract.java:29) at com.mypc.jcollector.collectorwebservice.Test_CollectorServiceContract.test_getComputer(Test_CollectorServiceContract.java:70) 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:597) at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) 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:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:83) at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:140) at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:132) ... 34 more Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://localhost:8185/CollectorService?wsdl'.: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8185/CollectorService?wsdl at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:212) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:176) at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81) ... 36 more Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8185/CollectorService?wsdl at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1290) at java.net.URL.openStream(URL.java:1009) at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:796) at org.apache.xerces.impl.XMLEntityManager.startDocumentEntity(XMLEntityManager.java:741) at org.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(XMLDocumentScannerImpl.java:260) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:498) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152) at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:253) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201) ... 42 more
