I think I have found the problem: The RegistryBean.getBean() method is not thread safe:
When I was debugging this method i notized that the bean member variable changes every now and then. I think this happens because another thread changes the member. In the last if block of the me method I think the following could happen: The bean member could also be a class, in this case the method tries to get an instance of this class. There is one problem in the line value=bean: What if another thread changes the bean to a class in just this moment? A class will be returned instead of an object, and so I get my ClassCastException later when camel tries to execute methods on the class instead of the object. Could someone check if the assumptions i made are correct? -- View this message in context: http://camel.465427.n5.nabble.com/ClassCastException-using-cxf-bean-tp5599810p5699619.html Sent from the Camel - Users mailing list archive at Nabble.com.