Building and deploying in different locations
Hello CXF listserv! I'm using version 2.2.4 of the CXF-Codegen-Plugin for Maven. I understand the error I'm getting, but I'm wondering if there's something I can do to avoid it. When we create our build, we use Maven to generate the CXF files. But in all environments except for local environments, we will actually deploy on a different machine than we build on. So when Mule/Spring start up my container and attempt initialize my CXF classes, I get a FileNotFoundException. Can I avoid this error and still use the WSDLArtifact WSDLOption? Our team has been getting around this problem by using a WSDL url instead, but this presents other problems that are a big pain. I figured I'd at least ask before assuming the URL was the only way. Here's the Maven configuration that's causing the FileNotFoundException: plugin groupIdorg.apache.cxf/groupId artifactIdcxf-codegen-plugin/artifactId version2.2.4/version executions execution idgenerate-sources/id phasegenerate-sources/phase configuration sourceRoottarget/generated-sources/wsdl//sourceRoot wsdlOptions wsdlOption wsdlArtifact groupIdorg.mycompany.MyService/groupId artifactIdMyService-interface/artifactId version${MyServiceVersion}/version /wsdlArtifact /wsdlOption /wsdlOptions /configuration goals goalwsdl2java/goal /goals /execution /executions /plugin Just for reference, here's the stack trace of the exception that is produced. ERROR [WrapperListener_start_runner][2009-11-17 03:32:00,111] org.mule.config.spring.SpringXmlConfigurationBuilder Configuration with org.mule.config.spring.SpringXmlConfigurationBuilder failed. org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Error creating bean with name 'blConn' defined in URL [file:/deployserver/ReportService/sandboxes/daily/deploy/mule/conf/mule- config.xml]: Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:76) at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistr y(SpringXmlConfigurationBuilder.java:98) at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringX mlConfigurationBuilder.java:69) at org.mule.config.builders.AbstractConfigurationBuilder.configure(Abstract ConfigurationBuilder.java:39) at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure( AbstractResourceConfigurationBuilder.java:78) at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMule ContextFactory.java:177) at org.mule.MuleServer.initialize(MuleServer.java:351) at org.mule.MuleServer.run(MuleServer.java:257) at org.mule.MuleServer.start(MuleServer.java:244) at org.mule.module.boot.MuleServerWrapper.start(MuleServerWrapper.java:48) at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:278 8) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'blConn' defined in URL [file:/deployserver/ReportService/sandboxes/daily/deploy/mule/conf/mule- config.xml]: Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec t(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g etSingleton(DefaultSingletonBeanRegistry.java:221) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean( AbstractBeanFactory.java:261) at
Re: Building and deploying in different locations
Generally, you would add a wsdlLocation element to the wsdlOption which would specify the location of the wsdl for runtime use. Something like: wsdlLocation/WEB-INF/wsdl/mywsdl.wsdl/wsdlLocation Dan On Tue November 17 2009 10:00:20 am Hale,Katherine wrote: Hello CXF listserv! I'm using version 2.2.4 of the CXF-Codegen-Plugin for Maven. I understand the error I'm getting, but I'm wondering if there's something I can do to avoid it. When we create our build, we use Maven to generate the CXF files. But in all environments except for local environments, we will actually deploy on a different machine than we build on. So when Mule/Spring start up my container and attempt initialize my CXF classes, I get a FileNotFoundException. Can I avoid this error and still use the WSDLArtifact WSDLOption? Our team has been getting around this problem by using a WSDL url instead, but this presents other problems that are a big pain. I figured I'd at least ask before assuming the URL was the only way. Here's the Maven configuration that's causing the FileNotFoundException: plugin groupIdorg.apache.cxf/groupId artifactIdcxf-codegen-plugin/artifactId version2.2.4/version executions execution idgenerate-sources/id phasegenerate-sources/phase configuration sourceRoottarget/generated-sources/wsdl//sourceRoot wsdlOptions wsdlOption wsdlArtifact groupIdorg.mycompany.MyService/groupId artifactIdMyService-interface/artifactId version${MyServiceVersion}/version /wsdlArtifact /wsdlOption /wsdlOptions /configuration goals goalwsdl2java/goal /goals /execution /executions /plugin Just for reference, here's the stack trace of the exception that is produced. ERROR [WrapperListener_start_runner][2009-11-17 03:32:00,111] org.mule.config.spring.SpringXmlConfigurationBuilder Configuration with org.mule.config.spring.SpringXmlConfigurationBuilder failed. org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Error creating bean with name 'blConn' defined in URL [file:/deployserver/ReportService/sandboxes/daily/deploy/mule/conf/mule- config.xml]: Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:76) at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistr y(SpringXmlConfigurationBuilder.java:98) at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringX mlConfigurationBuilder.java:69) at org.mule.config.builders.AbstractConfigurationBuilder.configure(Abstract ConfigurationBuilder.java:39) at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure( AbstractResourceConfigurationBuilder.java:78) at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMule ContextFactory.java:177) at org.mule.MuleServer.initialize(MuleServer.java:351) at org.mule.MuleServer.run(MuleServer.java:257) at org.mule.MuleServer.start(MuleServer.java:244) at org.mule.module.boot.MuleServerWrapper.start(MuleServerWrapper.java:48) at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:278 8) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'blConn' defined in URL [file:/deployserver/ReportService/sandboxes/daily/deploy/mule/conf/mule- config.xml]: Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1337) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec t(AbstractBeanFactory.java:264)