I have found the error. This is because the address of the cxf endpoint is
defined like this : /incident and not like
http://localhost:8080/camel-exemple/incident


cmoulliard wrote:
> 
> The issue is solved but 
> 
> I have the following error now :
> 
> 2009-03-04 13:25:55,115 DEBUG DefaultListableBeanFactory - Returning
> cached instance of singleton bean
> 'org.apache.cxf.binding.soap.SoapTransportFactory' 
> 04-mars-2009 13:25:55
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> initializeWSDLOperations
> ATTENTION: Could not find a matching method for operation
> {http://reportincident.example.camel.apache.org}ReportIncident. Operation
> will be unavailable.
> 2009-03-04 13:25:55,600 ERROR MainSupport - Failed:
> org.apache.cxf.service.factory.ServiceConstructionException 
> org.apache.cxf.service.factory.ServiceConstructionException
>       at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:139)
>       at
> org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:102)
>       at
> org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:95)
>       at
> org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:62)
>       at org.apache.camel.Route.getServicesForRoute(Route.java:74)
>       at org.apache.camel.impl.RouteService.doStart(RouteService.java:77)
>       at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
>       at
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:743)
>       at
> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:165)
>       at
> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:160)
>       at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
>       at
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:95)
>       at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:114)
>       at
> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
>       at
> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>       at
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
>       at
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
>       at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
>       at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
>       at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>       at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>       at
> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
>       at org.apache.camel.spring.Main.doStart(Main.java:186)
>       at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
>       at org.apache.camel.util.MainSupport.run(MainSupport.java:121)
>       at org.apache.camel.util.MainSupport.run(MainSupport.java:299)
>       at org.apache.camel.spring.Main.main(Main.java:98)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:396)
>       at java.lang.Thread.run(Thread.java:619)
> Caused by: java.net.MalformedURLException: no protocol: /incident
>       at java.net.URL.<init>(URL.java:567)
>       at java.net.URL.<init>(URL.java:464)
>       at java.net.URL.<init>(URL.java:413)
>       at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(JettyHTTPDestination.java:91)
>       at
> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDestination(JettyHTTPTransportFactory.java:116)
>       at
> org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDestination(JettyHTTPTransportFactory.java:103)
>       at 
> org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90)
>       at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:69)
>       at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:118)
>       ... 32 more
> 
> 
> 
> 
> William Tam wrote:
>> 
>> I submitted a fix (Committed revision 749772).  Let me know if you see
>> other issues.  Thanks.
>> 
>> Cheers,
>> William
>> 
>> On Tue, Mar 3, 2009 at 3:36 PM, William Tam <email.w...@gmail.com> wrote:
>>> I'm looking into it.
>>>
>>> https://issues.apache.org/activemq/browse/CAMEL-1416
>>>
>>>
>>> On Tue, Mar 3, 2009 at 12:08 PM, Claus Ibsen <claus.ib...@gmail.com>
>>> wrote:
>>>> Hi
>>>>
>>>> Looks like the # reference failed.
>>>>              serviceClass="#reportIncidentEndpoint"
>>>>
>>>> eg # instructs Camel / CXF to lookup in Spring for a bean with that id.
>>>>
>>>>
>>>> Got the attention of Willem Tam or William Jiang.
>>>>
>>>>
>>>> On Tue, Mar 3, 2009 at 5:46 PM, cmoulliard <cmoulli...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Camel 2.0-SNAPSHOT & Cxf-2.2.-SNAPSHOT returns the following error :
>>>>>
>>>>> 2009-03-03 17:42:06,906 DEBUG DisposableBeanAdapter - Invoking
>>>>> destroy() on
>>>>> bean with name 'camelContext'
>>>>> 2009-03-03 17:42:06,906 ERROR MainSupport - Failed:
>>>>> org.springframework.beans.factory.BeanCreationException: Error
>>>>> creating bean
>>>>> with name 'reportIncident': Initialization of bean failed; nested
>>>>> exception
>>>>> is org.springframework.beans.TypeMismatchException: Failed to convert
>>>>> property value of type
>>>>> [org.apache.camel.example.reportincident.service.ReportIncidentEndpointService]
>>>>> to required type [java.lang.Class] for property 'serviceClass'; nested
>>>>> exception is java.lang.IllegalArgumentException: Cannot convert value
>>>>> of
>>>>> type
>>>>> [org.apache.camel.example.reportincident.service.ReportIncidentEndpointService]
>>>>> to required type [java.lang.Class] for property 'serviceClass':
>>>>> PropertyEditor [org.springframework.beans.propertyeditors.ClassEditor]
>>>>> returned inappropriate value
>>>>> org.springframework.beans.factory.BeanCreationException: Error
>>>>> creating bean
>>>>> with name 'reportIncident': Initialization of bean failed; nested
>>>>> exception
>>>>> is org.springframework.beans.TypeMismatchException: Failed to convert
>>>>> property value of type
>>>>> [org.apache.camel.example.reportincident.service.ReportIncidentEndpointService]
>>>>> to required type [java.lang.Class] for property 'serviceClass'; nested
>>>>> exception is java.lang.IllegalArgumentException: Cannot convert value
>>>>> of
>>>>> type
>>>>> [org.apache.camel.example.reportincident.service.ReportIncidentEndpointService]
>>>>> to required type [java.lang.Class] for property 'serviceClass':
>>>>> PropertyEditor [org.springframework.beans.propertyeditors.ClassEditor]
>>>>> returned inappropriate value
>>>>>        at
>>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
>>>>>        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:222)
>>>>>        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.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
>>>>>        at
>>>>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
>>>>>        at
>>>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
>>>>>        at
>>>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>>>>>        at
>>>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>>>>>        at
>>>>> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:232)
>>>>>        at org.apache.camel.spring.Main.doStart(Main.java:186)
>>>>>        at
>>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50)
>>>>>        at org.apache.camel.util.MainSupport.run(MainSupport.java:121)
>>>>>        at org.apache.camel.util.MainSupport.run(MainSupport.java:299)
>>>>>        at org.apache.camel.spring.Main.main(Main.java:98)
>>>>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>        at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>        at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>        at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:396)
>>>>>        at java.lang.Thread.run(Thread.java:619)
>>>>> Caused by: org.springframework.beans.TypeMismatchException: Failed to
>>>>> convert property value of type
>>>>> [org.apache.camel.example.reportincident.service.ReportIncidentEndpointService]
>>>>> to required type [java.lang.Class] for property 'serviceClass'; nested
>>>>> exception is java.lang.IllegalArgumentException: Cannot convert value
>>>>> of
>>>>> type
>>>>> [org.apache.camel.example.reportincident.service.ReportIncidentEndpointService]
>>>>> to required type [java.lang.Class] for property 'serviceClass':
>>>>> PropertyEditor [org.springframework.beans.propertyeditors.ClassEditor]
>>>>> returned inappropriate value
>>>>>        at
>>>>> org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391)
>>>>>        at
>>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289)
>>>>>        at
>>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250)
>>>>>        at
>>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
>>>>>        at
>>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
>>>>>        ... 25 more
>>>>> Caused by: java.lang.IllegalArgumentException: Cannot convert value of
>>>>> type
>>>>> [org.apache.camel.example.reportincident.service.ReportIncidentEndpointService]
>>>>> to required type [java.lang.Class] for property 'serviceClass':
>>>>> PropertyEditor [org.springframework.beans.propertyeditors.ClassEditor]
>>>>> returned inappropriate value
>>>>>        at
>>>>> org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
>>>>>        at
>>>>> org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
>>>>>        at
>>>>> org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
>>>>>        ... 29 more
>>>>>
>>>>> with my config :
>>>>>
>>>>> <beans xmlns="http://www.springframework.org/schema/beans";
>>>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>>>        xmlns:camel="http://camel.apache.org/schema/spring";
>>>>>        xmlns:cxf="http://camel.apache.org/schema/cxfEndpoint";
>>>>>        xsi:schemaLocation="
>>>>> http://www.springframework.org/schema/beans
>>>>>              
>>>>>  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>>>>>                http://camel.apache.org/schema/osgi
>>>>>              
>>>>>  http://camel.apache.org/schema/osgi/camel-osgi-2.0-SNAPSHOT.xsd
>>>>>                http://camel.apache.org/schema/spring
>>>>>                http://camel.apache.org/schema/spring/camel-spring.xsd
>>>>>                http://camel.apache.org/schema/cxfEndpoint
>>>>>              
>>>>>  http://camel.apache.org/schema/cxf/camel-cxf-2.0-SNAPSHOT.xsd";>
>>>>>
>>>>>        <!-- not required for camel-cxf
>>>>>    <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"/>
>>>>>         -->
>>>>>
>>>>>        <bean id="bindyDataformat"
>>>>>                
>>>>>  class="org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat">
>>>>>             <constructor-arg type="java.lang.String"
>>>>> value="org.apache.camel.example.reportincident.model" />
>>>>>        </bean>
>>>>>
>>>>>        <bean id="csv"
>>>>> class="org.apache.camel.example.reportincident.csv.CsvBean"
>>>>> />
>>>>>
>>>>>        <bean id="reportIncidentEndpoint"
>>>>> class="org.apache.camel.example.reportincident.service.ReportIncidentEndpointService"/>
>>>>>
>>>>>    <!-- webservice endpoint -->
>>>>>    <cxf:cxfEndpoint id="reportIncident"
>>>>>                     address="/incident"
>>>>>                     wsdlURL="/wsdl/report_incident.xml"
>>>>>                     serviceClass="#reportIncidentEndpoint"
>>>>>                     endpointName="s:ReportIncidentPort"
>>>>>                     serviceName="s:ReportIncidentService"
>>>>>
>>>>> xmlns:s="http://reportincident.example.camel.apache.org";
>>>>>     />
>>>>>
>>>>>        <camelContext xmlns="http://camel.apache.org/schema/osgi";>
>>>>>                <camel:route>
>>>>>                        <camel:from uri="cxf:bean:reportIncident" />
>>>>>                        <camel:convertBodyTo
>>>>> type="org.apache.camel.example.reportincident.domain.InputReportIncident"
>>>>> />
>>>>>                        <camel:to uri="log:cxf" />
>>>>>                </camel:route>
>>>>>
>>>>>        </camelContext>
>>>>>
>>>>> What is wrong ?
>>>>>
>>>>> Regards,
>>>>>
>>>>> -----
>>>>> Charles Moulliard
>>>>> SOA Architect
>>>>>
>>>>> My Blog :  http://cmoulliard.blogspot.com/
>>>>> http://cmoulliard.blogspot.com/
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/camel-cxf-endpoint---error-%3A-Failed-to-convert-property-value-of-type--...-tp22312601p22312601.html
>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> Apache Camel Committer
>>>>
>>>> Open Source Integration: http://fusesource.com
>>>> Blog: http://davsclaus.blogspot.com/
>>>>
>>>
>> 
>> 
> 
> 


-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/camel-cxf-endpoint---error-%3A-Failed-to-convert-property-value-of-type--...-tp22312601p22329268.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to