[ 
https://issues.apache.org/jira/browse/CAMEL-8748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-8748:
-------------------------------
    Assignee:     (was: Claus Ibsen)

> DozerBeanMapper cannot instantiate DozerThreadContextClassLoader 
> -----------------------------------------------------------------
>
>                 Key: CAMEL-8748
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8748
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-dozer
>    Affects Versions: 2.15.3
>            Reporter: Thomas Diesler
>            Priority: Minor
>
> {code}
> 15:26:16,518 SEVERE [org.jboss.arquillian.protocol.jmx.JMXTestRunner] 
> (pool-2-thread-1) Failed: 
> org.wildfly.camel.test.csv.CSVIntegrationTest.testMarshal: 
> org.dozer.MappingException: java.lang.InstantiationException: 
> org.apache.camel.converter.dozer.DozerThreadContextClassLoader
>       at 
> org.dozer.util.MappingUtils.throwMappingException(MappingUtils.java:82) 
> [dozer-5.5.1.jar:]
>       at org.dozer.util.ReflectionUtils.newInstance(ReflectionUtils.java:366) 
> [dozer-5.5.1.jar:]
>       at 
> org.dozer.DozerInitializer.registerClassLoader(DozerInitializer.java:118) 
> [dozer-5.5.1.jar:]
>       at org.dozer.DozerInitializer.initialize(DozerInitializer.java:98) 
> [dozer-5.5.1.jar:]
>       at org.dozer.DozerInitializer.init(DozerInitializer.java:79) 
> [dozer-5.5.1.jar:]
>       at org.dozer.DozerInitializer.init(DozerInitializer.java:64) 
> [dozer-5.5.1.jar:]
>       at org.dozer.DozerBeanMapper.init(DozerBeanMapper.java:173) 
> [dozer-5.5.1.jar:]
>       at org.dozer.DozerBeanMapper.<init>(DozerBeanMapper.java:99) 
> [dozer-5.5.1.jar:]
>       at 
> org.apache.camel.converter.dozer.DozerTypeConverterLoader.createDozerBeanMapper(DozerTypeConverterLoader.java:232)
>  [camel-dozer-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]
>       at 
> org.apache.camel.converter.dozer.DozerTypeConverterLoader.<init>(DozerTypeConverterLoader.java:118)
>  [camel-dozer-2.16-SNAPSHOT.jar:2.16-SNAPSHOT]
>       at 
> org.wildfly.camel.test.csv.CSVIntegrationTest.testMarshal(CSVIntegrationTest.java:68)
>  [csv-dataformat-tests:]
> ...
> Caused by: java.lang.InstantiationException: 
> org.apache.camel.converter.dozer.DozerThreadContextClassLoader
>       at java.lang.Class.newInstance(Class.java:423) [rt.jar:1.8.0_31]
>       at org.dozer.util.ReflectionUtils.newInstance(ReflectionUtils.java:364) 
> [dozer-5.5.1.jar:]
>       ... 150 more
> Caused by: java.lang.NoSuchMethodException: 
> org.apache.camel.converter.dozer.DozerThreadContextClassLoader.<init>()
>       at java.lang.Class.getConstructor0(Class.java:3074) [rt.jar:1.8.0_31]
>       at java.lang.Class.newInstance(Class.java:408) [rt.jar:1.8.0_31]
>       ... 151 more
> {code}
> The {{org.dozer.DozerInitializer}} does
> {code}
>   private void registerClassLoader(GlobalSettings globalSettings, ClassLoader 
> classLoader, BeanContainer beanContainer) {
>     String classLoaderName = globalSettings.getClassLoaderName();
>     if (!DozerConstants.DEFAULT_CLASS_LOADER_BEAN.equals(classLoaderName)) {
>       DefaultClassLoader defaultClassLoader = new 
> DefaultClassLoader(classLoader);
>       Class<? extends DozerClassLoader> classLoaderType = 
> loadBeanType(classLoaderName, defaultClassLoader, DozerClassLoader.class);
>       DozerClassLoader classLoaderBean = 
> ReflectionUtils.newInstance(classLoaderType);
>       beanContainer.setClassLoader(classLoaderBean);
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to