> My big problem is that it was always working under Eclipse, and now that
> I have to deploy a standalone JAR (built with mvn assembly:single
> instruction), it doesn't work...

It's probably that standalone jar thing.   How are you creating that?   Are 
you unpacking the CXF jars and repacking them?  If so, that's the issue.   
Don't do that.   There are way too many things that don't work when you try 
that.

Dan





On Friday, October 28, 2011 1:20:02 PM Hugo Terelle wrote:
> Hi,
> 
> With cxf 2.4.2 and  2.4.3, I catch the following exception :
> 
> 2011-10-28 13:06:34,830 INFO   [ReflectionServiceFactoryBean] Creating
> Service {http://www.onvif.org/ver10/device/wsdl}DeviceService from WSDL:
> jar:file:/home/terelle/onvif/onvif-srv-0.1-jar-with-dependencies.jar!/META-I
> NF/wsdl/devicemgmt.wsdl
> 
> Exception in thread "main" javax.xml.ws.WebServiceException:
> java.lang.NullPointerException
>      at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
>      at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
>      at eu.acic.onvif.NVTServer.<init>(NVTServer.java:81)
>      at eu.acic.onvif.NVTServer.main(NVTServer.java:127)
> Caused by: java.lang.NullPointerException
>      at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
>      at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
> WSDL(ReflectionServiceFactoryBean.java:369) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
> eModel(ReflectionServiceFactoryBean.java:505) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
> nServiceFactoryBean.java:241) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
> oryBean.java:202) at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
> ractWSDLBasedEndpointFactory.java:101) at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
> at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja
> va:202) at
> org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433) at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
> 
> 
> 
> I'm catching this exception when I do the following instruction:
> 
> DevicePortTypeImpl deviceImplementor = new DevicePortTypeImpl();
> String serviceAddress = "http://0.0.0.0:8080/onvif/device_service";;
> EndpointImpl epDevice = (EndpointImpl) Endpoint.create(serviceAddress,
> deviceImplementor);
> epDevice.publish(serviceAddress);
> 
> OR with
> 
> DevicePortTypeImpl deviceImplementor = new DevicePortTypeImpl();
> String serviceAddress = "http://0.0.0.0:8080/onvif/device_service";;
> EndpointImpl epDevice = (EndpointImpl) Endpoint.publish(serviceAddress,
> deviceImplementor);
> 
> 
> The Java code was generated from a WSDL with cxf-codegen-plugin
> (wsdl2java) and I just changed the wsdlLocation annotation in the
> "DevicePortTypeImpl" class.
> 
> 
> My big problem is that it was always working under Eclipse, and now that
> I have to deploy a standalone JAR (built with mvn assembly:single
> instruction), it doesn't work...
> Even worst, I can put what I want as path in the wsdlLocation
> annotation, it's always working under Eclipse... And I can't deploy
> Eclipse on my customer system :)
> 
> For information, I use Jetty, nothing with JBoss, Glassfish and so on.
> It's a standalone application (the server was also generated with
> wsdl2java).
> 
> Help!!!
> 
> Regards,
> Hugo Terelle
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to