You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Diefenbach Anne <Di...@fgan.de> on 2009/06/16 16:44:26 UTC

NullPointerException creating service

Hi,

I am building service which, as far as I can see, is almost exactly the same
as the previous one I built, but suddenly I receive a NullPointerException
retrieving my binding:

16.06.2009 16:18:46
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service
{http://servicemix.org/wsnotification}NotificationBroker from WSDL:
file:resources/broker.wsdl
Exception in thread "main" java.lang.NullPointerException
	at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation(WSDLServiceBuilder.java:573)
	at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface(WSDLServiceBuilder.java:557)
	at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:328)
	at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:184)
	at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:129)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:328)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:436)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:194)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:164)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
	at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
	at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
	at
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
	at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:434)
	at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
	at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:299)
	at javax.xml.ws.Service.getPort(Service.java:40)
	at
org.servicemix.wsnotification.NotificationBroker.getCxfBinding(NotificationBroker.java:63)
	at
org.oasis_open.docs.wsn.bw_2.NotificationConsumer_NotificationConsumerPort_Server.main(NotificationConsumer_NotificationConsumerPort_Server.java:135)

I cannot figure out where this exception comes from. Google turns up a
somewhat similar bug, but it was fixed back in CXF 2.0.1. I use Fuse 2.1.3.1
and upon appearance of this exception also tried 2.2.0.0 (which is where
this stacktrace comes from).

Is this a bug, or did I go wrong somewhere?

Regards,

Anne

http://www.nabble.com/file/p24055861/NotificationConsumer_NotificationConsumerPort_Server.java
NotificationConsumer_NotificationConsumerPort_Server.java 
http://www.nabble.com/file/p24055861/NotificationBroker.java
NotificationBroker.java 
http://www.nabble.com/file/p24055861/NotificationConsumer.wsdl
NotificationConsumer.wsdl 
-- 
View this message in context: http://www.nabble.com/NullPointerException-creating-service-tp24055861p24055861.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: AW: NullPointerException creating service

Posted by Daniel Kulp <dk...@apache.org>.
This is due to an invalid wsdl.   The imports in broker.wsdl don't have proper 
namespace attributes.   Thus WSDL4J doesn't match them to proper messages.  
Ideally, wsdl4j would give us an error at parse time...   :-(

Dan


On Wed June 17 2009 6:55:49 am Diefenbach Anne wrote:
> https://issues.apache.org/jira/browse/CXF-2295
>
> Let me know if you need any more information.
>
> Regards,
>
> Anne
>
> > -----Ursprüngliche Nachricht-----
> > Von: Eamonn Dwyer [mailto:EAMDWYER@progress.com]
> > Gesendet: Mittwoch, 17. Juni 2009 11:23
> > An: users@cxf.apache.org
> > Betreff: RE: NullPointerException creating service
> >
> > Hi Anne
> > Sounds like there is a bug in there somewhere (at very least it should
> > report a better error message than a NullPointerException). Can you file
> > a jira for it?
> > Thanks
> > Eamonn
> >
> > -----Original Message-----
> > From: Diefenbach Anne [mailto:Diefenbach@fgan.de]
> > Sent: 17 June 2009 09:16
> > To: users@cxf.apache.org
> > Subject: Re: NullPointerException creating service
> >
> > Hi Eamonn,
> >
> > thanks for your answer. It appears you were right. I was using the WSDL
> > which came with the ServiceMix WSN CXF Binding example (broker.wsdl) and
> > was, for whatever reason, able to solve this issue by using the WSDL
> > pointed to by http://localhost:8192/Broker/?wsdl. Maybe the import needed
> > to get resolved first.
> >
> > Regards,
> >
> > Anne
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Eamonn Dwyer [mailto:EAMDWYER@progress.com]
> > > Gesendet: Dienstag, 16. Juni 2009 17:09
> > > An: users@cxf.apache.org
> > > Betreff: RE: NullPointerException creating service
> > >
> > > Hi Anne
> > > I'm kinda guessing here but anyway -
> > >
> > > I had a quick look at the code and the following line looks like the
> > > culprit
> > > MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(),
> > > MessageInfo.Type.INPUT);
> > >
> > > To get to that stage opInfo must be non null, so it must mean that
> > > input or the input's message is null. Is there a chance you have an
> > > operation without an associated input in your wsdl, or an input without
> > > a message associated with it?
> > >
> > > Regs
> > > Eamonn
> > >
> > > -----Original Message-----
> > > From: Diefenbach Anne [mailto:Diefenbach@fgan.de]
> > > Sent: 16 June 2009 15:44
> > > To: users@cxf.apache.org
> > > Subject: NullPointerException creating service
> > >
> > >
> > > Hi,
> > >
> > > I am building service which, as far as I can see, is almost exactly the
> > > same
> > > as the previous one I built, but suddenly I receive a
> > > NullPointerException
> > > retrieving my binding:
> > >
> > > 16.06.2009 16:18:46
> > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > > buildServiceFromWSDL
> > > INFO: Creating Service
> > > {http://servicemix.org/wsnotification}NotificationBroker from WSDL:
> > > file:resources/broker.wsdl
> > > Exception in thread "main" java.lang.NullPointerException
> > > 	at
> > > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation(WSDLSe
> > >r viceBuilder.java:573)
> > > 	at
> > > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface(WSDLServiceBuil
> > >d er.java:557)
> > > 	at
> > > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuild
> > >e r.java:328)
> > > 	at
> > > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuild
> > >e r.java:184)
> > > 	at
> > > org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java
> > >: 129)
> > > 	at
> > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServic
> > >e FromWSDL(ReflectionServiceFactoryBean.java:328)
> > > 	at
> > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeS
> > >e rviceModel(ReflectionServiceFactoryBean.java:436)
> > > 	at
> > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refl
> > >e ctionServiceFactoryBean.java:194)
> > > 	at
> > > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServic
> > >e FactoryBean.java:164)
> > > 	at
> > > org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint
> > >( AbstractWSDLBasedEndpointFactory.java:100)
> > > 	at
> > > org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java
> > >: 52)
> > > 	at
> > > org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactor
> > >y Bean.java:102)
> > > 	at
> > > org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean
> > >. java:115)
> > > 	at
> > > org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:434)
> > > 	at
> > > org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
> > > 	at
> > > org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:299)
> > > 	at javax.xml.ws.Service.getPort(Service.java:40)
> > > 	at
> > > org.servicemix.wsnotification.NotificationBroker.getCxfBinding(Notifica
> > >t ionBroker.java:63)
> > > 	at
> > > org.oasis_open.docs.wsn.bw_2.NotificationConsumer_NotificationConsumerP
> > >o
> > > rt_Server.main(NotificationConsumer_NotificationConsumerPort_Server.jav
> > >a
> > >
> > > :135)
> > >
> > > I cannot figure out where this exception comes from. Google turns up a
> > > somewhat similar bug, but it was fixed back in CXF 2.0.1. I use Fuse
> > > 2.1.3.1
> > > and upon appearance of this exception also tried 2.2.0.0 (which is
> > > where this stacktrace comes from).
> > >
> > > Is this a bug, or did I go wrong somewhere?
> > >
> > > Regards,
> > >
> > > Anne
> > >
> > > http://www.nabble.com/file/p24055861/NotificationConsumer_NotificationC
> > >o nsumerPort_Server.java
> > > NotificationConsumer_NotificationConsumerPort_Server.java
> > > http://www.nabble.com/file/p24055861/NotificationBroker.java
> > > NotificationBroker.java
> > > http://www.nabble.com/file/p24055861/NotificationConsumer.wsdl
> > > NotificationConsumer.wsdl
> > > --
> > > View this message in context:
> > > http://www.nabble.com/NullPointerException-creating-service-tp24055861p
> > >2 4055861.html
> > > Sent from the cxf-user mailing list archive at Nabble.com.

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

RE: NullPointerException creating service

Posted by Eamonn Dwyer <EA...@progress.com>.
Hi Anne
If you could also attach a file containing a test case to the Jira it would increase the chances of a quicker fix time.
By the way I probably won't have time to fix it myself, but others in the community (especially those who actually have some experience with the wsdl service builder :) ) may volunteer.

Regs and thanks
Eamonn


-----Original Message-----
From: Diefenbach Anne [mailto:Diefenbach@fgan.de] 
Sent: 17 June 2009 11:56
To: users@cxf.apache.org
Subject: AW: NullPointerException creating service

https://issues.apache.org/jira/browse/CXF-2295

Let me know if you need any more information.

Regards,

Anne

> -----Ursprüngliche Nachricht-----
> Von: Eamonn Dwyer [mailto:EAMDWYER@progress.com]
> Gesendet: Mittwoch, 17. Juni 2009 11:23
> An: users@cxf.apache.org
> Betreff: RE: NullPointerException creating service
> 
> Hi Anne
> Sounds like there is a bug in there somewhere (at very least it should
> report a better error message than a NullPointerException). Can you file a
> jira for it?
> Thanks
> Eamonn
> 
> -----Original Message-----
> From: Diefenbach Anne [mailto:Diefenbach@fgan.de]
> Sent: 17 June 2009 09:16
> To: users@cxf.apache.org
> Subject: Re: NullPointerException creating service
> 
> Hi Eamonn,
> 
> thanks for your answer. It appears you were right. I was using the WSDL
> which came with the ServiceMix WSN CXF Binding example (broker.wsdl) and
> was, for whatever reason, able to solve this issue by using the WSDL
> pointed to by http://localhost:8192/Broker/?wsdl. Maybe the import needed
> to get resolved first.
> 
> Regards,
> 
> Anne
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Eamonn Dwyer [mailto:EAMDWYER@progress.com]
> > Gesendet: Dienstag, 16. Juni 2009 17:09
> > An: users@cxf.apache.org
> > Betreff: RE: NullPointerException creating service
> >
> > Hi Anne
> > I'm kinda guessing here but anyway -
> >
> > I had a quick look at the code and the following line looks like the
> > culprit
> > MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(),
> > MessageInfo.Type.INPUT);
> >
> > To get to that stage opInfo must be non null, so it must mean that input
> > or the input's message is null. Is there a chance you have an operation
> > without an associated input in your wsdl, or an input without a message
> > associated with it?
> >
> > Regs
> > Eamonn
> >
> > -----Original Message-----
> > From: Diefenbach Anne [mailto:Diefenbach@fgan.de]
> > Sent: 16 June 2009 15:44
> > To: users@cxf.apache.org
> > Subject: NullPointerException creating service
> >
> >
> > Hi,
> >
> > I am building service which, as far as I can see, is almost exactly the
> > same
> > as the previous one I built, but suddenly I receive a
> > NullPointerException
> > retrieving my binding:
> >
> > 16.06.2009 16:18:46
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > buildServiceFromWSDL
> > INFO: Creating Service
> > {http://servicemix.org/wsnotification}NotificationBroker from WSDL:
> > file:resources/broker.wsdl
> > Exception in thread "main" java.lang.NullPointerException
> > 	at
> > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation(WSDLSer
> > viceBuilder.java:573)
> > 	at
> > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface(WSDLServiceBuild
> > er.java:557)
> > 	at
> > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
> > r.java:328)
> > 	at
> > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
> > r.java:184)
> > 	at
> > org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
> > 129)
> > 	at
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
> > FromWSDL(ReflectionServiceFactoryBean.java:328)
> > 	at
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
> > rviceModel(ReflectionServiceFactoryBean.java:436)
> > 	at
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
> > ctionServiceFactoryBean.java:194)
> > 	at
> > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
> > FactoryBean.java:164)
> > 	at
> > org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
> > AbstractWSDLBasedEndpointFactory.java:100)
> > 	at
> > org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:
> > 52)
> > 	at
> > org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactory
> > Bean.java:102)
> > 	at
> > org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.
> > java:115)
> > 	at
> > org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:434)
> > 	at
> > org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
> > 	at
> > org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:299)
> > 	at javax.xml.ws.Service.getPort(Service.java:40)
> > 	at
> > org.servicemix.wsnotification.NotificationBroker.getCxfBinding(Notificat
> > ionBroker.java:63)
> > 	at
> > org.oasis_open.docs.wsn.bw_2.NotificationConsumer_NotificationConsumerPo
> > rt_Server.main(NotificationConsumer_NotificationConsumerPort_Server.java
> > :135)
> >
> > I cannot figure out where this exception comes from. Google turns up a
> > somewhat similar bug, but it was fixed back in CXF 2.0.1. I use Fuse
> > 2.1.3.1
> > and upon appearance of this exception also tried 2.2.0.0 (which is where
> > this stacktrace comes from).
> >
> > Is this a bug, or did I go wrong somewhere?
> >
> > Regards,
> >
> > Anne
> >
> > http://www.nabble.com/file/p24055861/NotificationConsumer_NotificationCo
> > nsumerPort_Server.java
> > NotificationConsumer_NotificationConsumerPort_Server.java
> > http://www.nabble.com/file/p24055861/NotificationBroker.java
> > NotificationBroker.java
> > http://www.nabble.com/file/p24055861/NotificationConsumer.wsdl
> > NotificationConsumer.wsdl
> > --
> > View this message in context:
> > http://www.nabble.com/NullPointerException-creating-service-tp24055861p2
> > 4055861.html
> > Sent from the cxf-user mailing list archive at Nabble.com.


AW: NullPointerException creating service

Posted by Diefenbach Anne <Di...@fgan.de>.
https://issues.apache.org/jira/browse/CXF-2295

Let me know if you need any more information.

Regards,

Anne

> -----Ursprüngliche Nachricht-----
> Von: Eamonn Dwyer [mailto:EAMDWYER@progress.com]
> Gesendet: Mittwoch, 17. Juni 2009 11:23
> An: users@cxf.apache.org
> Betreff: RE: NullPointerException creating service
> 
> Hi Anne
> Sounds like there is a bug in there somewhere (at very least it should
> report a better error message than a NullPointerException). Can you file a
> jira for it?
> Thanks
> Eamonn
> 
> -----Original Message-----
> From: Diefenbach Anne [mailto:Diefenbach@fgan.de]
> Sent: 17 June 2009 09:16
> To: users@cxf.apache.org
> Subject: Re: NullPointerException creating service
> 
> Hi Eamonn,
> 
> thanks for your answer. It appears you were right. I was using the WSDL
> which came with the ServiceMix WSN CXF Binding example (broker.wsdl) and
> was, for whatever reason, able to solve this issue by using the WSDL
> pointed to by http://localhost:8192/Broker/?wsdl. Maybe the import needed
> to get resolved first.
> 
> Regards,
> 
> Anne
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Eamonn Dwyer [mailto:EAMDWYER@progress.com]
> > Gesendet: Dienstag, 16. Juni 2009 17:09
> > An: users@cxf.apache.org
> > Betreff: RE: NullPointerException creating service
> >
> > Hi Anne
> > I'm kinda guessing here but anyway -
> >
> > I had a quick look at the code and the following line looks like the
> > culprit
> > MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(),
> > MessageInfo.Type.INPUT);
> >
> > To get to that stage opInfo must be non null, so it must mean that input
> > or the input's message is null. Is there a chance you have an operation
> > without an associated input in your wsdl, or an input without a message
> > associated with it?
> >
> > Regs
> > Eamonn
> >
> > -----Original Message-----
> > From: Diefenbach Anne [mailto:Diefenbach@fgan.de]
> > Sent: 16 June 2009 15:44
> > To: users@cxf.apache.org
> > Subject: NullPointerException creating service
> >
> >
> > Hi,
> >
> > I am building service which, as far as I can see, is almost exactly the
> > same
> > as the previous one I built, but suddenly I receive a
> > NullPointerException
> > retrieving my binding:
> >
> > 16.06.2009 16:18:46
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > buildServiceFromWSDL
> > INFO: Creating Service
> > {http://servicemix.org/wsnotification}NotificationBroker from WSDL:
> > file:resources/broker.wsdl
> > Exception in thread "main" java.lang.NullPointerException
> > 	at
> > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation(WSDLSer
> > viceBuilder.java:573)
> > 	at
> > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface(WSDLServiceBuild
> > er.java:557)
> > 	at
> > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
> > r.java:328)
> > 	at
> > org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
> > r.java:184)
> > 	at
> > org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
> > 129)
> > 	at
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
> > FromWSDL(ReflectionServiceFactoryBean.java:328)
> > 	at
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
> > rviceModel(ReflectionServiceFactoryBean.java:436)
> > 	at
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
> > ctionServiceFactoryBean.java:194)
> > 	at
> > org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
> > FactoryBean.java:164)
> > 	at
> > org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
> > AbstractWSDLBasedEndpointFactory.java:100)
> > 	at
> > org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:
> > 52)
> > 	at
> > org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactory
> > Bean.java:102)
> > 	at
> > org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.
> > java:115)
> > 	at
> > org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:434)
> > 	at
> > org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
> > 	at
> > org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:299)
> > 	at javax.xml.ws.Service.getPort(Service.java:40)
> > 	at
> > org.servicemix.wsnotification.NotificationBroker.getCxfBinding(Notificat
> > ionBroker.java:63)
> > 	at
> > org.oasis_open.docs.wsn.bw_2.NotificationConsumer_NotificationConsumerPo
> > rt_Server.main(NotificationConsumer_NotificationConsumerPort_Server.java
> > :135)
> >
> > I cannot figure out where this exception comes from. Google turns up a
> > somewhat similar bug, but it was fixed back in CXF 2.0.1. I use Fuse
> > 2.1.3.1
> > and upon appearance of this exception also tried 2.2.0.0 (which is where
> > this stacktrace comes from).
> >
> > Is this a bug, or did I go wrong somewhere?
> >
> > Regards,
> >
> > Anne
> >
> > http://www.nabble.com/file/p24055861/NotificationConsumer_NotificationCo
> > nsumerPort_Server.java
> > NotificationConsumer_NotificationConsumerPort_Server.java
> > http://www.nabble.com/file/p24055861/NotificationBroker.java
> > NotificationBroker.java
> > http://www.nabble.com/file/p24055861/NotificationConsumer.wsdl
> > NotificationConsumer.wsdl
> > --
> > View this message in context:
> > http://www.nabble.com/NullPointerException-creating-service-tp24055861p2
> > 4055861.html
> > Sent from the cxf-user mailing list archive at Nabble.com.


RE: NullPointerException creating service

Posted by Eamonn Dwyer <EA...@progress.com>.
Hi Anne 
Sounds like there is a bug in there somewhere (at very least it should report a better error message than a NullPointerException). Can you file a jira for it?
Thanks
Eamonn

-----Original Message-----
From: Diefenbach Anne [mailto:Diefenbach@fgan.de] 
Sent: 17 June 2009 09:16
To: users@cxf.apache.org
Subject: Re: NullPointerException creating service

Hi Eamonn,

thanks for your answer. It appears you were right. I was using the WSDL which came with the ServiceMix WSN CXF Binding example (broker.wsdl) and was, for whatever reason, able to solve this issue by using the WSDL pointed to by http://localhost:8192/Broker/?wsdl. Maybe the import needed to get resolved first.

Regards,

Anne

> -----Ursprüngliche Nachricht-----
> Von: Eamonn Dwyer [mailto:EAMDWYER@progress.com]
> Gesendet: Dienstag, 16. Juni 2009 17:09
> An: users@cxf.apache.org
> Betreff: RE: NullPointerException creating service
> 
> Hi Anne
> I'm kinda guessing here but anyway -
> 
> I had a quick look at the code and the following line looks like the
> culprit
> MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(),
> MessageInfo.Type.INPUT);
> 
> To get to that stage opInfo must be non null, so it must mean that input
> or the input's message is null. Is there a chance you have an operation
> without an associated input in your wsdl, or an input without a message
> associated with it?
> 
> Regs
> Eamonn
> 
> -----Original Message-----
> From: Diefenbach Anne [mailto:Diefenbach@fgan.de]
> Sent: 16 June 2009 15:44
> To: users@cxf.apache.org
> Subject: NullPointerException creating service
> 
> 
> Hi,
> 
> I am building service which, as far as I can see, is almost exactly the
> same
> as the previous one I built, but suddenly I receive a
> NullPointerException
> retrieving my binding:
> 
> 16.06.2009 16:18:46
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromWSDL
> INFO: Creating Service
> {http://servicemix.org/wsnotification}NotificationBroker from WSDL:
> file:resources/broker.wsdl
> Exception in thread "main" java.lang.NullPointerException
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation(WSDLSer
> viceBuilder.java:573)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface(WSDLServiceBuild
> er.java:557)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
> r.java:328)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
> r.java:184)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
> 129)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
> FromWSDL(ReflectionServiceFactoryBean.java:328)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
> rviceModel(ReflectionServiceFactoryBean.java:436)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
> ctionServiceFactoryBean.java:194)
> 	at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
> FactoryBean.java:164)
> 	at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
> AbstractWSDLBasedEndpointFactory.java:100)
> 	at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:
> 52)
> 	at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactory
> Bean.java:102)
> 	at
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.
> java:115)
> 	at
> org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:434)
> 	at
> org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
> 	at
> org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:299)
> 	at javax.xml.ws.Service.getPort(Service.java:40)
> 	at
> org.servicemix.wsnotification.NotificationBroker.getCxfBinding(Notificat
> ionBroker.java:63)
> 	at
> org.oasis_open.docs.wsn.bw_2.NotificationConsumer_NotificationConsumerPo
> rt_Server.main(NotificationConsumer_NotificationConsumerPort_Server.java
> :135)
> 
> I cannot figure out where this exception comes from. Google turns up a
> somewhat similar bug, but it was fixed back in CXF 2.0.1. I use Fuse
> 2.1.3.1
> and upon appearance of this exception also tried 2.2.0.0 (which is where
> this stacktrace comes from).
> 
> Is this a bug, or did I go wrong somewhere?
> 
> Regards,
> 
> Anne
> 
> http://www.nabble.com/file/p24055861/NotificationConsumer_NotificationCo
> nsumerPort_Server.java
> NotificationConsumer_NotificationConsumerPort_Server.java
> http://www.nabble.com/file/p24055861/NotificationBroker.java
> NotificationBroker.java
> http://www.nabble.com/file/p24055861/NotificationConsumer.wsdl
> NotificationConsumer.wsdl
> --
> View this message in context:
> http://www.nabble.com/NullPointerException-creating-service-tp24055861p2
> 4055861.html
> Sent from the cxf-user mailing list archive at Nabble.com.


Re: NullPointerException creating service

Posted by Diefenbach Anne <Di...@fgan.de>.
Hi Eamonn,

thanks for your answer. It appears you were right. I was using the WSDL which came with the ServiceMix WSN CXF Binding example (broker.wsdl) and was, for whatever reason, able to solve this issue by using the WSDL pointed to by http://localhost:8192/Broker/?wsdl. Maybe the import needed to get resolved first.

Regards,

Anne

> -----Ursprüngliche Nachricht-----
> Von: Eamonn Dwyer [mailto:EAMDWYER@progress.com]
> Gesendet: Dienstag, 16. Juni 2009 17:09
> An: users@cxf.apache.org
> Betreff: RE: NullPointerException creating service
> 
> Hi Anne
> I'm kinda guessing here but anyway -
> 
> I had a quick look at the code and the following line looks like the
> culprit
> MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(),
> MessageInfo.Type.INPUT);
> 
> To get to that stage opInfo must be non null, so it must mean that input
> or the input's message is null. Is there a chance you have an operation
> without an associated input in your wsdl, or an input without a message
> associated with it?
> 
> Regs
> Eamonn
> 
> -----Original Message-----
> From: Diefenbach Anne [mailto:Diefenbach@fgan.de]
> Sent: 16 June 2009 15:44
> To: users@cxf.apache.org
> Subject: NullPointerException creating service
> 
> 
> Hi,
> 
> I am building service which, as far as I can see, is almost exactly the
> same
> as the previous one I built, but suddenly I receive a
> NullPointerException
> retrieving my binding:
> 
> 16.06.2009 16:18:46
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromWSDL
> INFO: Creating Service
> {http://servicemix.org/wsnotification}NotificationBroker from WSDL:
> file:resources/broker.wsdl
> Exception in thread "main" java.lang.NullPointerException
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation(WSDLSer
> viceBuilder.java:573)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface(WSDLServiceBuild
> er.java:557)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
> r.java:328)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
> r.java:184)
> 	at
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
> 129)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
> FromWSDL(ReflectionServiceFactoryBean.java:328)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
> rviceModel(ReflectionServiceFactoryBean.java:436)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
> ctionServiceFactoryBean.java:194)
> 	at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
> FactoryBean.java:164)
> 	at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
> AbstractWSDLBasedEndpointFactory.java:100)
> 	at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:
> 52)
> 	at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactory
> Bean.java:102)
> 	at
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.
> java:115)
> 	at
> org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:434)
> 	at
> org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
> 	at
> org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:299)
> 	at javax.xml.ws.Service.getPort(Service.java:40)
> 	at
> org.servicemix.wsnotification.NotificationBroker.getCxfBinding(Notificat
> ionBroker.java:63)
> 	at
> org.oasis_open.docs.wsn.bw_2.NotificationConsumer_NotificationConsumerPo
> rt_Server.main(NotificationConsumer_NotificationConsumerPort_Server.java
> :135)
> 
> I cannot figure out where this exception comes from. Google turns up a
> somewhat similar bug, but it was fixed back in CXF 2.0.1. I use Fuse
> 2.1.3.1
> and upon appearance of this exception also tried 2.2.0.0 (which is where
> this stacktrace comes from).
> 
> Is this a bug, or did I go wrong somewhere?
> 
> Regards,
> 
> Anne
> 
> http://www.nabble.com/file/p24055861/NotificationConsumer_NotificationCo
> nsumerPort_Server.java
> NotificationConsumer_NotificationConsumerPort_Server.java
> http://www.nabble.com/file/p24055861/NotificationBroker.java
> NotificationBroker.java
> http://www.nabble.com/file/p24055861/NotificationConsumer.wsdl
> NotificationConsumer.wsdl
> --
> View this message in context:
> http://www.nabble.com/NullPointerException-creating-service-tp24055861p2
> 4055861.html
> Sent from the cxf-user mailing list archive at Nabble.com.


RE: NullPointerException creating service

Posted by Eamonn Dwyer <EA...@progress.com>.
Hi Anne
I'm kinda guessing here but anyway -

I had a quick look at the code and the following line looks like the
culprit
MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(),
MessageInfo.Type.INPUT);

To get to that stage opInfo must be non null, so it must mean that input
or the input's message is null. Is there a chance you have an operation
without an associated input in your wsdl, or an input without a message
associated with it?

Regs
Eamonn

-----Original Message-----
From: Diefenbach Anne [mailto:Diefenbach@fgan.de] 
Sent: 16 June 2009 15:44
To: users@cxf.apache.org
Subject: NullPointerException creating service


Hi,

I am building service which, as far as I can see, is almost exactly the
same
as the previous one I built, but suddenly I receive a
NullPointerException
retrieving my binding:

16.06.2009 16:18:46
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service
{http://servicemix.org/wsnotification}NotificationBroker from WSDL:
file:resources/broker.wsdl
Exception in thread "main" java.lang.NullPointerException
	at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterfaceOperation(WSDLSer
viceBuilder.java:573)
	at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildInterface(WSDLServiceBuild
er.java:557)
	at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
r.java:328)
	at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
r.java:184)
	at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
129)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
FromWSDL(ReflectionServiceFactoryBean.java:328)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
rviceModel(ReflectionServiceFactoryBean.java:436)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
ctionServiceFactoryBean.java:194)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
FactoryBean.java:164)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
AbstractWSDLBasedEndpointFactory.java:100)
	at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:
52)
	at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactory
Bean.java:102)
	at
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.
java:115)
	at
org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:434)
	at
org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:312)
	at
org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:299)
	at javax.xml.ws.Service.getPort(Service.java:40)
	at
org.servicemix.wsnotification.NotificationBroker.getCxfBinding(Notificat
ionBroker.java:63)
	at
org.oasis_open.docs.wsn.bw_2.NotificationConsumer_NotificationConsumerPo
rt_Server.main(NotificationConsumer_NotificationConsumerPort_Server.java
:135)

I cannot figure out where this exception comes from. Google turns up a
somewhat similar bug, but it was fixed back in CXF 2.0.1. I use Fuse
2.1.3.1
and upon appearance of this exception also tried 2.2.0.0 (which is where
this stacktrace comes from).

Is this a bug, or did I go wrong somewhere?

Regards,

Anne

http://www.nabble.com/file/p24055861/NotificationConsumer_NotificationCo
nsumerPort_Server.java
NotificationConsumer_NotificationConsumerPort_Server.java 
http://www.nabble.com/file/p24055861/NotificationBroker.java
NotificationBroker.java 
http://www.nabble.com/file/p24055861/NotificationConsumer.wsdl
NotificationConsumer.wsdl 
-- 
View this message in context:
http://www.nabble.com/NullPointerException-creating-service-tp24055861p2
4055861.html
Sent from the cxf-user mailing list archive at Nabble.com.