Deploying multiple OSGi bundles with Dozer mapping files into JBoss Fuse/Fuse ESB has unexpected results

Solution Unverified - Updated -

Issue

When there are multiple OSGi bundles containing Dozer mapping files, these will end up in exceptions such as:

Caused by: org.dozer.MappingException: Unable to locate dozer mapping file [OSGI-INF/dozer/*/Whatever-mapping.xml] in the classpath!
    at org.dozer.util.MappingUtils.throwMappingException(MappingUtils.java:87)[581:net.sf.dozer.dozer-osgi:5.3.2]
    at org.dozer.util.MappingValidator.validateURL(MappingValidator.java:63)[581:net.sf.dozer.dozer-osgi:5.3.2]
    at org.dozer.loader.CustomMappingsLoader.loadFromFiles(CustomMappingsLoader.java:101)[581:net.sf.dozer.dozer-osgi:5.3.2]
    at org.dozer.loader.CustomMappingsLoader.load(CustomMappingsLoader.java:56)[581:net.sf.dozer.dozer-osgi:5.3.2]
    at org.dozer.DozerBeanMapper.loadCustomMappings(DozerBeanMapper.java:213)[581:net.sf.dozer.dozer-osgi:5.3.2]
    at org.dozer.DozerBeanMapper.getMappingProcessor(DozerBeanMapper.java:186)[581:net.sf.dozer.dozer-osgi:5.3.2]
    at org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:111)[581:net.sf.dozer.dozer-osgi:5.3.2]
    at org.apache.camel.converter.dozer.DozerTypeConverter.convertTo(DozerTypeConverter.java:46)[577:org.apache.camel.camel-dozer:2.10.0.fuse-71-047]
    at org.apache.camel.converter.dozer.DozerTypeConverter.convertTo(DozerTypeConverter.java:50)[577:org.apache.camel.camel-dozer:2.10.0.fuse-71-047]
    at org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:253)[81:org.apache.camel.camel-core:2.10.0.fuse-71-047]
    at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:155)[81:org.apache.camel.camel-core:2.10.0.fuse-71-047]
    ... 42 more

This happens randomly for random bundles, some of them get deployed fine, some not.

Environment

  • JBoss Fuse 6.0
  • Fuse ESB 7.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content