You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2017/04/03 13:21:41 UTC

[jira] [Updated] (CXF-7311) Null pointer in WSDLServiceFactory

     [ https://issues.apache.org/jira/browse/CXF-7311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-7311:
-----------------------------
    Fix Version/s: NeedMoreInfo

> Null pointer in WSDLServiceFactory
> ----------------------------------
>
>                 Key: CXF-7311
>                 URL: https://issues.apache.org/jira/browse/CXF-7311
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.10
>            Reporter: Pram
>             Fix For: NeedMoreInfo
>
>
> Facing the same issue as mentioned here : https://issues.apache.org/jira/browse/CXF-2171
> spring configuration contains
> <bean id="testProxy" class="test.TestProxyImpl">
>     <property name="testEndPoint" ref="testService"/>
> </bean>
> <bean id="testService" class="test.jaxws.testServiceImpl">
>        <property name="serviceInterface" value="test.jaxws.testServiceEndPoint"/>
>         <property name="wsdlDocumentUrl" value="${test.service.URL}"/>
>         <property name="username" value="${test.username}"/>
>         <property name="password" value="${test.password}"/>
>     </bean>
> which loads the wsdl from remote webservice, everything works fine here Issue occurs when in another configuration file , try to create a new cxf webservice. Configuration below:
> <import resource="classpath:META-INF/cxf/cxf.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> 
> <jaxws:endpoint
>        id="HelloWorld"
>        implementor="test.ws.HelloWorldImpl"
>        address="/hello" />
> Now I get error:
>  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testService' defined in ServletContext resource [/WEB-INF/classes/spring/adptContext.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
> at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
> ... 55 more
>     Caused by: java.lang.NullPointerException
> at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
> at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:299)
> at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:392)
> at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:180)
> at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:163)
> at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:79)
> at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
> at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:97)
> at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:89)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)
> Here I want to consume external webservice and also create new web service using apache cxf. Any suggestions?
> Note: it is not a maven project. As everything was working well with first configuration file , changing cxf lib versions is not an option.
> Running in tomcat 6 and cxf libs in classpath are : 
> cxf-2.1.0.jar, cxf-core-3.1.2.jar
>  
> Tried changing the sequence of both xml configurations , but of no use.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)