Quantcast

Error creating bean with name 'RetrievalSoapJms': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error creating bean with name 'RetrievalSoapJms': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException

rahulsharma
This post was updated on .
Hi,

I have an application where it uses CXF 2.2.6 jars, Now I am upgrading cxf jars from 2.2.6 to 3.1.11 where I am getting the below exception

Error creating bean with name 'EquipmentInventoryRetrievalSoapJms' (EndpointName): Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException

My new files are as follows

cxf.xml :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:amq="http://activemq.apache.org/schema/core"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:foo="http://cxf.apache.org/configuration/foo" xmlns:ct="http://cxf.apache.org/configuration/types"
        xmlns:jms="http://cxf.apache.org/transports/jms" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:p="http://www.springframework.org/schema/p" xmlns:sec="http://cxf.apache.org/configuration/security"
        xsi:schemaLocation=" http://www.springframework.org/schema/beans 
                                                        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
            http://cxf.apache.org/configuration/security       
            http://cxf.apache.org/schemas/configuration/security.xsd
                        http://cxf.apache.org/transports/http-jetty/configuration
            http://cxf.apache.org/schemas/configuration/http-jetty.xsd                                                       
                                                        http://cxf.apache.org/jaxws 
                                                        http://cxf.apache.org/schemas/jaxws.xsd 
                                                        http://cxf.apache.org/transports/jms 
                                                        http://cxf.apache.org/schemas/configuration/jms.xsd
                            http://activemq.apache.org/schema/core 
                                                        http://activemq.apache.org/schema/core/activemq-core.xsd">

        <import resource="file:/beans.xml" />

       
        <httpj:engine-factory bus="cxf">
               
                <httpj:engine port="0">
                       
                        <httpj:threadingParameters minThreads="15" maxThreads="50" />
                </httpj:engine>
        </httpj:engine-factory>

        <bean id="cxf" class="org.apache.cxf.bus.extension.ExtensionManagerBus">
                <property name="inInterceptors">
                        <list>
                                <ref bean="logInbound" />
                        </list>
                </property>
                <property name="outInterceptors">
                        <list>
                                <ref bean="logOutbound" />
                        </list>
                </property>
                <property name="outFaultInterceptors">
                        <list>
                                <ref bean="logOutbound" />
                        </list>
                </property>
        </bean> 
       
       
  <bean id="cxf" class="org.apache.cxf.bus.spring.SpringBus" destroy-method="shutdown"/>       
        <bean id="org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor" class="org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor" />
        <bean id="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor" class="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor" />
        <bean id="org.apache.cxf.bus.spring.BusExtensionPostProcessor" class="org.apache.cxf.bus.spring.BusExtensionPostProcessor" />


My beans.xml file is as follows:

<beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:amq="http://activemq.apache.org/schema/core"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:foo="http://cxf.apache.org/configuration/foo"
       xmlns:ct="http://cxf.apache.org/configuration/types"
           xmlns:jms="http://cxf.apache.org/transports/jms"
           xmlns:jaxws="http://cxf.apache.org/jaxws"
           xmlns:p="http://www.springframework.org/schema/p"
       xsi:schemaLocation=" http://www.springframework.org/schema/beans 
                                                        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                                                        http://cxf.apache.org/jaxws 
                                                        http://cxf.apache.org/schemas/jaxws.xsd 
                                                        http://cxf.apache.org/transports/jms 
                                                        http://cxf.apache.org/schemas/configuration/jms.xsd
                            http://activemq.apache.org/schema/core 
                                                        http://activemq.apache.org/schema/core/activemq-core.xsd">
       
       
 
     
        <bean id="EIR_EP" class="endpoints.EquipmentInventoryRetrievalImpl">
                <constructor-arg><ref bean="EIR_DELEGATE"/></constructor-arg>
        </bean>


the Endpoint-jms.xml file is:

<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:foo="http://cxf.apache.org/configuration/foo" xmlns:ct="http://cxf.apache.org/configuration/types"
        xmlns:jms="http://cxf.apache.org/transports/jms" xmlns:jaxws="http://cxf.apache.org/jaxws"
        xmlns:p="http://www.springframework.org/schema/p"
        xsi:schemaLocation=" http://www.springframework.org/schema/beans 
                                                        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                                                        http://cxf.apache.org/jaxws 
                                                        http://cxf.apache.org/schemas/jaxws.xsd 
                                                        http://cxf.apache.org/transports/jms 
                                                        http://cxf.apache.org/schemas/configuration/jms.xsd
                            http://activemq.apache.org/schema/core 
                                                        http://activemq.apache.org/schema/core/activemq-core.xsd">

        <import resource="file:/beans.xml" />

       
        <bean id="placeholderConfig"
                class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
                <property name="location" value="file:common.properties" />
        </bean>

        <bean id="jmsConnectionFactory"
                class="org.springframework.jms.connection.SingleConnectionFactory">
                <property name="targetConnectionFactory">
                        <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                                <property name="brokerURL" value="failover:tcp://${jms-host}" />
                        </bean>
                </property>
        </bean>
       

       
        <jaxws:endpoint xmlns:eir="http://www.tmforum.org/mtop/mri/wsdl/eir/v1-0"
                id="EquipmentInventoryRetrievalSoapJms" address="jms://"
                serviceName="eir:EquipmentInventoryRetrievalJms" endpointName="eir:EquipmentInventoryRetrievalSoapJms"
                implementor="#EIR_EP">
                <jaxws:handlers>
                        <ref bean="MTOSIHandler" />
                        <ref bean="ThreadContextHandler" />
                        <ref bean="ServerSessionHandler" />
                </jaxws:handlers>
                <jaxws:features>
                        <bean class="org.apache.cxf.transport.jms.JMSConfigFeature"
                                p:jmsConfig-ref="EquipmentInventoryRetrievalQueue" />
                </jaxws:features>
        </jaxws:endpoint>


        <bean id="EquipmentInventoryRetrievalQueue" class="org.apache.cxf.transport.jms.JMSConfiguration"
                p:connectionFactory-ref="jmsConnectionFactory" p:targetDestination="${EquipmentInventoryRetrieval.reply}"
        />


But I am getting the error as

Error creating bean with name 'EquipmentInventoryRetrievalSoapJms' (EndpointName): Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException

Could anyone help me with issue. i am struck here from a week...

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error creating bean with name 'RetrievalSoapJms': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException

rahulsharma
Below is the stack trace for the error above


[main].BaseApplication.main:591 {12/05/2017 10:05:19.530} >> ERROR
> EXCEPTION {
>   Cause   : javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
>   Message : Error creating bean with name 'EquipmentInventoryRetrievalSoapJms': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceE
> xception: org.apache.cxf.service.factory.ServiceConstructionException
>   Class   : org.springframework.beans.factory.BeanCreationException
>   Stack   : {
>     [0] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory(initializeBean:1572)
>     [1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory(doCreateBean:539)
>     [2] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory(createBean:476)
>     [3] at org.springframework.beans.factory.support.AbstractBeanFactory$1(getObject:303)
>     [4] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry(getSingleton:230)
>     [5] at org.springframework.beans.factory.support.AbstractBeanFactory(doGetBean:299)
>     [6] at org.springframework.beans.factory.support.AbstractBeanFactory(getBean:194)
>     [7] at org.springframework.beans.factory.support.DefaultListableBeanFactory(preInstantiateSingletons:755)
>     [8] at org.springframework.context.support.AbstractApplicationContext(finishBeanFactoryInitialization:762)
>     [9] at org.springframework.context.support.AbstractApplicationContext(refresh:480)
>     [10] at org.apache.cxf.bus.spring.BusApplicationContext$1(run:107)
>     [11] at org.apache.cxf.bus.spring.BusApplicationContext$1(run:105)
>     [12] at java.security.AccessController(doPrivileged)
>     [13] at org.apache.cxf.bus.spring.BusApplicationContext(<init>:105)
>     [14] at org.apache.cxf.bus.spring.BusApplicationContext(<init>:96)
>     [15] at org.apache.cxf.bus.spring.BusApplicationContext(<init>:78)
>     [16] at com.ericsson.fusion.tmf.mtosi.MTOSIAgent(init:115)
>     [17] at com.marconi.fusion.tmf.Main(initApplication:154)
>     [18] at com.marconi.fusion.base.application.BaseApplication(newApplication:176)
>     [19] at com.marconi.fusion.base.application.BaseApplication(main:567)
>   }
> }
>
Loading...