cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <glen.ma...@verizon.net>
Subject Re: Problem of backward compability between cxf 2.0.2-incubator and cxf 2.1
Date Fri, 16 May 2008 11:50:17 GMT
To keep our searchable archives useful, please send this question to the
cxf-user's list.  The same developers (actually even more developers)
are there.

Glen

2008-05-16 jc meillaud wrote:
> Hi,
> 
> We are currently working on a major project with several application which
> were build with maven. In a the first version we were using the cxf 2.0.2
> incubator version, but we are facing several dependencies issues, (2.0.2
> relates to the the spring version 2.0.4), and we want to use the latest
> stable release of spring. We then decided to upgrade the cxf version to the
> latest relesaed version (2.1), but a webservice client which was builded
> through the maven cxf codegen plugin, is no more compatible. Here are some
> log :
> 
> 
> Maven pom definition :
>       <plugin>
>         <groupId>org.apache.cxf</groupId>
>         <artifactId>cxf-codegen-plugin</artifactId>
>         <version>${cxf.version}</version>
>         <executions>
>         <execution>
>             <id>generate-sources</id>
>             <phase>generate-sources</phase>
>             <configuration>
>           <sourceRoot>${basedir}/target/generated/</sourceRoot>
>           <wsdlOptions>
>             <wsdlOption>
>               <wsdl>${basedir}/src/main/resources/wsdl/factory.wsdl</wsdl>
>               <extraargs>
>                 <extraarg>p</extraarg>
>                 <extraarg>com.something.else</extraarg>
>                 <extraarg>noAddressBinding</extraarg>
>               </extraargs>
>             </wsdlOption>
>           </wsdlOptions>
>         </configuration>
>             <goals>
>                 <goal>wsdl2java</goal>
>             </goals>
>         </execution>
>     </executions>
>       </plugin>
> 
> 
> with cxf 2.0.2-incubator, classes are generated with the wanted pacakge name
> (com.something.else), but when we switch to the release 2.1, there is a
> warning during the compilation :
> 
> 
> INFO: Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@3dcf03:
> defining beans
> [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory];
> root of factory hierarchy
> May 16, 2008 10:06:17 AM org.apache.cxf.common.injection.ResourceInjector
> invokePostConstruct
> WARNING: method annotated by @PostConstruct throws exception when invoked
> java.lang.reflect.InvocationTargetException
>         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.cxf.common.injection.ResourceInjector.invokePostConstruct(ResourceInjector.java:305)
>         at
> org.apache.cxf.common.injection.ResourceInjector.construct(ResourceInjector.java:86)
>         at
> org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessAfterInitialization(Jsr250BeanPostProcessor.java:58)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:313)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1181)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>         at
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:757)
>         at
> org.apache.cxf.configuration.spring.AbstractSpringBeanMap.get(AbstractSpringBeanMap.java:136)
>         at
> org.apache.cxf.configuration.spring.AbstractSpringBeanMap$SpringBeanMapWrapper.get(AbstractSpringBeanMap.java:236)
>         at
> org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactory(DestinationFactoryManagerImpl.java:104)
>         at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildEndpoint(WSDLServiceBuilder.java:318)
>         at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:280)
>         at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:149)
>         at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:138)
>         at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:141)
>         at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:231)
>         at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
>         at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:102)
>         at
> org.apache.cxf.maven_plugin.WSDL2JavaMojo.processWsdl(WSDL2JavaMojo.java:292)
>         at
> org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:202)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
>         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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.NullPointerException
>         at
> org.apache.cxf.binding.soap.SoapTransportFactory.registerWithBindingManager(SoapTransportFactory.java:175)
>         ... 46 more
> May 16, 2008 10:06:18 AM
> org.springframework.context.support.AbstractApplicationContext doClose
> INFO: Closing org.apache.cxf.bus.spring.BusApplicationContext@f0761a:
> display name [org.apache.cxf.bus.spring.BusApplicationContext@f0761a];
> startup date [Fri May 16 10:06:15 GMT+01:00 2008]; root of context hierarchy
> May 16, 2008 10:06:18 AM
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
> destroySingletons
> INFO: Destroying singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@3dcf03:
> defining beans
> [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory];
> root of factory hierarchy
> [INFO] [resources:resources]
> 
> And the generated classes are not generated wioththe wanted package name,
> but with the package name defined in the targetnamespace of the wsdl file
> (factory.wsdl) used to generate classes.
> 
> Any help would be appreciate on this issue.
> Regards
> JC


Mime
View raw message