camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Dubchak <j...@johndubchak.com>
Subject Re: ClassCastException in blueprint Route
Date Sat, 13 Jun 2015 15:17:17 GMT
Hi Yogesh,

I actually (and accidentally) replied directly to Andy.

Here is the declaration of the bean and the service export in the 
provider's blueprint.xml:

<bean id="configurationService" 
class="com.example.services.configuration.local.LocalConfigurationService">
     <property name="realm" value="local"/>
     <property name="configuration" ref="configuration"/>
     <property name="appName" value="The Process Manager"/>
</bean>

<service ref="configurationService" 
interface="com.example.services.configuration.ConfigurationService">
     <service-properties>
         <entry key="realm" value="local"/>
     </service-properties>
</service>

And here is the consumer's blueprint.xml importing it and referencing it:

<reference id="configurationService" 
interface="com.example.services.configuration.ConfigurationService"
             filter="(realm=local)"/>

John

On 6/12/15 10:08 PM, yogu13 wrote:
> Hello John,
>
> What i am saying is that the problem seems to be with the object returned by
> the getCurrentConfiguration method of your LocalConfigurationService.
>
> based on the trace
>
> Caused by: java.lang.ClassCastException:
> com.example.services.configuration.local.LocalConfigurationService
> cannot be cast to com.example.services.configuration.ConfigurationService
>           at
> Proxy5216067d_ed21_408f_b02b_9397ef0efbb3.getCurrentConfiguration(Unknown
> Source)
>
> Also as Andrew mentions it would be great if you could post how the service
> is being declared along with the service properties
>
> Regards,
> -Yogesh
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/ClassCastException-in-blueprint-Route-tp5768116p5768149.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
View raw message