Our bundles are deployed inside Felix thus we use 
cxf-dosgi-ri-singlebundle-distribution 1.1.

I don't really know where the class ReflectionServiceFactoryBean is but it 
seems to appears into cxf-rt-frontend-simple and cxf-bundle-minimal.

I have found a 2.4 version of "cxf-bundle-minimal" jar file into "lib" folder 
of "cxf-dosgi-ri-singlebundle-distribution.jar"... 

Could it be a bug in this bundle ?

Thanks for help.

-----Message d'origine-----
De : Daniel Kulp [mailto:dk...@apache.org] 
Envoyé : mardi 12 octobre 2010 19:28
À : users@cxf.apache.org
Cc : DAT Jean NRS
Objet : Re: NPE in CXF with a client API generated with cxf-codegen-plugin

On Tuesday 12 October 2010 11:28:00 am jean....@orange-ftgroup.com wrote:
[] 
> Hi,
> 
> In my project I'm using CXF 2.2.9 to consume a wsdl (axis server). See in
> attachment the wsdl.

Are you sure you are using 2.2.9?   
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeClas
> sInfo(ReflectionServiceFactoryBean.java:685) at

That line number doesn't match up with the 2.2.9 tag.  
http://svn.apache.org/repos/asf/cxf/tags/cxf-2.2.9/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

the initializeClassInfo method  doesn't even start till line 719.   Definitely 
check your dependencies and such to make sure 2.2.9 (preferrably update to 
2.2.11 or 2.3.0 instead) is being picked up.

Dan


> 
> We use maven plugin cxf-codegen-plugin to generate a client API.
> 
> When invoking web service with this API, I got a NullPointerException in
> CXF code.
> 
> Any idea ? Thanks for any help.
> 
> Following are the stack trace and maven instructions to generate the client
> API...
> 
> Here is the stack trace :
> --------------------------
> java.lang.NullPointerException
>         at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeClas
> sInfo(ReflectionServiceFactoryBean.java:685) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperati
> on(JaxWsServiceFactoryBean.java:202) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDL
> Operations(ReflectionServiceFactoryBean.java:605) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperati
> ons(JaxWsServiceFactoryBean.java:238) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFr
> omWSDL(ReflectionServiceFactoryBean.java:355) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServ
> iceModel(ReflectionServiceFactoryBean.java:459) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflect
> ionServiceFactoryBean.java:212) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFa
> ctoryBean.java:163) at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Ab
> stractWSDLBasedEndpointFactory.java:100) at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52
> ) at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBe
> an.java:102) at
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.ja
> va:115) at
> org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:438) at
> org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:315) at
> org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:302) at
> javax.xml.ws.Service.getPort(Service.java:40)
>         at
> com.smartimmo.services.spacehelper.SpaceHelperService.getSpaceHelper(Space
> HelperService.java:63) at
> com.orange.m2m.smartbuilding.ihm.utils.cstb.CstbReferential.getSpaceHelper
> (CstbReferential.java:71) at
> com.orange.m2m.smartbuilding.ihm.utils.cstb.CstbReferential.getSpaces(Cstb
> Referential.java:90) at
> com.orange.m2m.smartbuilding.ihm.controllers.forms.CreatorControllerForm.b
> uildCstbPanel(CreatorControllerForm.java:90) at
> com.orange.m2m.smartbuilding.ihm.controllers.forms.CreatorControllerForm.b
> uildContentPanel(CreatorControllerForm.java:74) at
> com.orange.m2m.smartbuilding.ihm.panels.form.CreatorComponentForm.getConte
> ntPanel(CreatorComponentForm.java:189) at
> com.orange.m2m.smartbuilding.ihm.panels.form.CreatorComponentForm.buildFor
> m(CreatorComponentForm.java:97) at
> com.orange.m2m.smartbuilding.ihm.panels.form.CreatorComponentForm.<init>(C
> reatorComponentForm.java:71) at
> com.orange.m2m.smartbuilding.ihm.controllers.forms.CreatorControllerForm.<
> init>(CreatorControllerForm.java:62) at
> com.orange.m2m.smartbuilding.ihm.controllers.pages.CreateController$1.getL
> azyLoadComponent(CreateController.java:35) at
> org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel$1.respond(
> AjaxLazyLoadPanel.java:79) at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefau
> ltAjaxBehavior.java:286) at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.
> processEvents(BehaviorRequestTarget.java:119) at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Abst
> ractRequestCycleProcessor.java:92) at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1
> 250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at
> org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) at
> org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:31
> 2) at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandl
> er.java:1148) at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
> at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.handle(
> HttpServiceServletHandler.java:64) at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.handle(HttpSer
> viceContext.java:111) at
> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.hand
> le(JettyServerHandlerCollection.java:64) at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326)
>         at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnect
> ion.java:864) at
> org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:40
> 9) at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:5
> 20)
> 
> Here is the maven code generation instructions :
> -----------------------------------------------------------
> <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>${project.build.directory}/generated/cxf</sourceRoot>
> <wsdlOptions> <wsdlOption>
> <wsdl><some_host>/smartimmo/services/SpaceHelper?wsdl</wsdl> <wsdlOption>
> </wsdlOptions> </configuration>
>                                                 <goals>
>                                                        
> <goal>wsdl2java</goal> </goals>
>                                         </execution>
>                                 </executions>
>                         </plugin>
> 
> 
> Any idea ?
> 
> Thanks for help.
> 
> John.
> 
> *********************************
> This message and any attachments (the "message") are confidential and
> intended solely for the addressees. Any unauthorised use or dissemination
> is prohibited.
> Messages are susceptible to alteration.
> France Telecom Group shall not be liable for the message if altered,
> changed or falsified. If you are not the intended addressee of this
> message, please cancel it immediately and inform the sender.
> ********************************

-- 
Daniel Kulp
dk...@apache.org
http://dankulp.com/blog

*********************************
This message and any attachments (the "message") are confidential and intended 
solely for the addressees. 
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. 
France Telecom Group shall not be liable for the message if altered, changed or 
falsified.
If you are not the intended addressee of this message, please cancel it 
immediately and inform the sender.
********************************

Reply via email to