You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Daniel Kulp <dk...@apache.org> on 2012/01/04 16:29:54 UTC
Re: Error loading bean definitions
On Wednesday, December 21, 2011 11:33:16 PM prashant wrote:
> [2011-12-22 08:24:54,595] ERROR aanleverserviceClientLogger Error in static
> block: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'cxf.config1': Initialization of bean failed; nested
> exception is java.lang.IllegalStateException: Could not register object
> [org.apache.cxf.bus.CXFBusImpl@2cd728] under bean name 'cxf': there is
> already object [org.apache.cxf.bus.CXFBusImpl@2cd728] bound
What version of CXF are you using? Also, can you provide the full spring
config?
With any recent version of CXF, there shouldn't be any
org.apache.cxf.bus.CXFBusImpl objects defined there. They should be the
specific SpringBus subclass.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Error loading bean definitions
Posted by prashant <pr...@tieto.com>.
http://cxf.547215.n5.nabble.com/file/n5619608/applicationConfig.xml
applicationConfig.xml
Sorry forgot to attached file in my last post . Please find attached
applicationConfig.xml
--
View this message in context: http://cxf.547215.n5.nabble.com/Error-loading-bean-definitions-tp5093853p5619608.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Error loading bean definitions
Posted by Daniel Kulp <dk...@apache.org>.
As long as you are using the
<bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
form, you will get that error with any recent version of CXF (>=2.4.x).
CXFBusImpl is an internal class and should never be referenced directly like
that. You MUST use the <cxf:bus> form at this point or many things will
not properly load.
Dan
On Tuesday, April 03, 2012 10:09:37 PM prashant wrote:
> Hi,
>
> Actually It didn't help me. The issue was I require cxf configuration file
> on classpath and it was missing.
> Now there is no previous bean creation error even though I have following
> in y cxf config file
>
> <cxf:bus>
> <cxf:features>
> <cxf:logging/>
> </cxf:features>
> </cxf:bus>
> and
> <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
>
> <property name="outInterceptors">
> <list>
> <ref bean="mapAggregator"/>
> <ref bean="mapCodec"/>
> </list>
> </property>
> <property name="outFaultInterceptors">
> <list>
> <ref bean="mapAggregator"/>
> <ref bean="mapCodec"/>
> </list>
> </property>
> </bean>
>
> I tried to merge bean CXFBusImpl in cxf:bus but it didn't work, so I have
> kept it as it is.
>
> Now there is new issue
>
>
> [2012-04-04 07:00:42,824] DEBUG org.apache.cxf.phase.PhaseInterceptorChain
> Adding interceptor
> org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@1299
> f7e to phase post-logical
> [2012-04-04 07:00:42,824] DEBUG org.apache.cxf.phase.PhaseInterceptorChain
> Adding interceptor
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@1a631cc to
> phase write
> [2012-04-04 07:00:42,876] ERROR aanleverserviceClientLogger Exception
> occured while processing request :
> javax.xml.ws.soap.SOAPFaultException: Could not find conduit initiator for
> transport http://schemas.xmlsoap.org/soap/http
> at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
> If you have any idea on this issue please reply
>
> Thanks
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Error-loading-bean-definitions-tp5093853p
> 5616925.html Sent from the cxf-user mailing list archive at Nabble.com.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Error loading bean definitions
Posted by prashant <pr...@tieto.com>.
Hi,
Actually It didn't help me. The issue was I require cxf configuration file
on classpath and it was missing.
Now there is no previous bean creation error even though I have following in
y cxf config file
<cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus>
and
<bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
<property name="outInterceptors">
<list>
<ref bean="mapAggregator"/>
<ref bean="mapCodec"/>
</list>
</property>
<property name="outFaultInterceptors">
<list>
<ref bean="mapAggregator"/>
<ref bean="mapCodec"/>
</list>
</property>
</bean>
I tried to merge bean CXFBusImpl in cxf:bus but it didn't work, so I have
kept it as it is.
Now there is new issue
[2012-04-04 07:00:42,824] DEBUG org.apache.cxf.phase.PhaseInterceptorChain
Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@1299f7e
to phase post-logical
[2012-04-04 07:00:42,824] DEBUG org.apache.cxf.phase.PhaseInterceptorChain
Adding interceptor
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@1a631cc to phase
write
[2012-04-04 07:00:42,876] ERROR aanleverserviceClientLogger Exception
occured while processing request :
javax.xml.ws.soap.SOAPFaultException: Could not find conduit initiator for
transport http://schemas.xmlsoap.org/soap/http
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
If you have any idea on this issue please reply
Thanks
--
View this message in context: http://cxf.547215.n5.nabble.com/Error-loading-bean-definitions-tp5093853p5616925.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Error loading bean definitions
Posted by Daniel Kulp <dk...@apache.org>.
I think you need an <import resource="classpath:/META-INF/cxf/cxf.xml"/>
At the very top.
Dan
On Monday, April 02, 2012 06:11:30 AM prashant wrote:
> I did some change in above configuration now my cxf config file is
>
> Please find attached file
>
>
> http://cxf.547215.n5.nabble.com/file/n5612407/cxf-Aanleverservice.xml
> cxf-Aanleverservice.xml
>
> And now exception is
>
>
> [2012-04-02 15:08:35,425] INFO
> org.springframework.beans.factory.support.DefaultListableBeanFactory
> Destroying singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@1dafb
> 4e: defining beans
> [Aanleverservice,AanleverServiceFactory,TimestampSign_Request,cxf.config0,
> mapAggregator,*.http-conduit,mapCodec,cxf.config1,org.springframework.bean
> s.factory.config.PropertyPlaceholderConfigurer#0,tixDigipoortAdapter,xibAa
> nleverserviceClient,propertyHolder]; root of factory hierarchy
> [2012-04-02 15:08:35,438] ERROR aanleverserviceClientLogger Error in
> static block: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'cxf.config1': Initialization of bean
> failed; nested exception is java.lang.IllegalStateException: Could not
> register object [org.apache.cxf.bus.CXFBusImpl@179c7cf] under bean name
> 'cxf': there is already object [org.apache.cxf.bus.CXFBusImpl@179c7cf]
> bound
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Error-loading-bean-definitions-tp5093853p
> 5612407.html Sent from the cxf-user mailing list archive at Nabble.com.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Error loading bean definitions
Posted by prashant <pr...@tieto.com>.
I did some change in above configuration now my cxf config file is
Please find attached file
http://cxf.547215.n5.nabble.com/file/n5612407/cxf-Aanleverservice.xml
cxf-Aanleverservice.xml
And now exception is
[2012-04-02 15:08:35,425] INFO
org.springframework.beans.factory.support.DefaultListableBeanFactory
Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1dafb4e:
defining beans
[Aanleverservice,AanleverServiceFactory,TimestampSign_Request,cxf.config0,mapAggregator,*.http-conduit,mapCodec,cxf.config1,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,tixDigipoortAdapter,xibAanleverserviceClient,propertyHolder];
root of factory hierarchy
[2012-04-02 15:08:35,438] ERROR aanleverserviceClientLogger Error in static
block: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'cxf.config1': Initialization of bean failed; nested
exception is java.lang.IllegalStateException: Could not register object
[org.apache.cxf.bus.CXFBusImpl@179c7cf] under bean name 'cxf': there is
already object [org.apache.cxf.bus.CXFBusImpl@179c7cf] bound
--
View this message in context: http://cxf.547215.n5.nabble.com/Error-loading-bean-definitions-tp5093853p5612407.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Error loading bean definitions
Posted by prashant <pr...@tieto.com>.
Hi Daniel,
As you said I commented
<bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
and add
<cxf:outInterceptors>
<list>
<ref bean="mapAggregator"/>
<ref bean="mapCodec"/>
</list>
</cxf:outInterceptors>
<cxf:outFaultInterceptors>
<list>
<ref bean="mapAggregator"/>
<ref bean="mapCodec"/>
</list>
</cxf:outFaultInterceptors>
in cxf:bus
Now the issue is
Caused by: java.lang.IllegalStateException: Cannot convert value of type
[java.util.ArrayList] to required type
[org.apache.cxf.interceptor.Interceptor] for property 'outInterceptors[0]':
no matching editors or conversion strategy found
Please help me on this.
Thanks
--
View this message in context: http://cxf.547215.n5.nabble.com/Error-loading-bean-definitions-tp5093853p5611559.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Error loading bean definitions
Posted by Daniel Kulp <dk...@apache.org>.
You're main issue is that you have:
<cxf:bus>
<cxf:features>
<cxf:logging/>
</cxf:features>
</cxf:bus>
along with:
<bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
...
that second one will kill a lot of things and shouldn't be there. The
<cxf:bus> can have <cxf:inInterceptors> and outInterceptor right on it.
Dan
On Wednesday, January 04, 2012 9:21:33 PM prashant wrote:
> Hi Daniel,
>
> Thanks for your reply. My problem has been resolved.
> Please find attached configuration files.
> http://cxf.547215.n5.nabble.com/file/n5121794/applicationConfig.xml
> applicationConfig.xml
> http://cxf.547215.n5.nabble.com/file/n5121794/cxf-Aanleverservice.xml
> cxf-Aanleverservice.xml
>
>
> I was trying to import cxf-Aanleverservice.xml in applicationConfig.xml
> using <import resource="classpath*:cxf-Aanleverservice.xml"/> and then I was
> facing above problem. I keep both files separated and then issue resolved.
> This merging of file I was doing to solve one classpath file reading issue.
>
> The issue was here:
>
> XmlBeanFactory factory = new XmlBeanFactory( new
> ClassPathResource(cxfConfigFile));
>
> and it was unable to find cxf config file though it was on classpath.
> The issue solved by using following in my code:
>
> Thread.currentThread().setContextClassLoader(XIBAanleverserviceClient.class.
> getClassLoader()); XmlBeanFactory factory = new XmlBeanFactory( new
> ClassPathResource(cxfConfigFile));
>
>
> Thanks
> Prashant
>
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Error-loading-bean-definitions-tp5093853p51
> 21794.html Sent from the cxf-user mailing list archive at Nabble.com.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Error loading bean definitions
Posted by prashant <pr...@tieto.com>.
Hi Daniel,
Thanks for your reply. My problem has been resolved.
Please find attached configuration files.
http://cxf.547215.n5.nabble.com/file/n5121794/applicationConfig.xml
applicationConfig.xml
http://cxf.547215.n5.nabble.com/file/n5121794/cxf-Aanleverservice.xml
cxf-Aanleverservice.xml
I was trying to import cxf-Aanleverservice.xml in applicationConfig.xml
using <import resource="classpath*:cxf-Aanleverservice.xml"/> and then I was
facing above problem. I keep both files separated and then issue resolved.
This merging of file I was doing to solve one classpath file reading issue.
The issue was here:
XmlBeanFactory factory = new XmlBeanFactory( new
ClassPathResource(cxfConfigFile));
and it was unable to find cxf config file though it was on classpath.
The issue solved by using following in my code:
Thread.currentThread().setContextClassLoader(XIBAanleverserviceClient.class.getClassLoader());
XmlBeanFactory factory = new XmlBeanFactory( new
ClassPathResource(cxfConfigFile));
Thanks
Prashant
--
View this message in context: http://cxf.547215.n5.nabble.com/Error-loading-bean-definitions-tp5093853p5121794.html
Sent from the cxf-user mailing list archive at Nabble.com.