camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcuk <>
Subject Re: java.lang.ClassCastException: Not instanceof org.apache.camel.TypeConverter value: org.apache.camel.converter.jaxb.FallbackTypeConverter
Date Wed, 20 Aug 2014 11:22:15 GMT
Yes, this is definitely a class loader issue. In DefaultfactoryFinder:

    private <T> T newInstance(String key, Injector injector, String
propertyPrefix, Class<T> expectedType)
        throws IOException, ClassNotFoundException {
        Class<?> type = findClass(key, propertyPrefix);
        Object value = injector.newInstance(type);
        if (expectedType.isInstance(value)) {
            return expectedType.cast(value);
        } else {
            throw new ClassCastException("Not instanceof " +
expectedType.getName() + " value: " + value);

Stepping through the code, the Object 'value' created by the injector has
the classloader from the Maven Jetty plugin, whereas the 'expectedType'
classloader is null (the bootstrap class loader I assume), so isInstance is
always going to be false.

I'll look more closely at the web app and see why this is the case.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message