Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-11283

[camel-olingo4] Wrong module dependency on EAP

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.5-ER1
    • fuse-7.4-GA
    • Camel, WildFly Camel
    • None
    • Fuse 7.5 Sprint 52 - Bug fix

      Camel-olingo4 component depends on org.apache.commons.lang3 (see https://github.com/jboss-fuse/camel/blob/2.21.x.redhat-7-x/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java#L42) but org.apache.camel.component.olingo4 module on EAP is importing
      <module name="org.apache.commons.lang"/>

      jboss-eap-7.2 cat ./modules/system/layers/fuse/org/apache/camel/component/olingo4/main/module.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <module name="org.apache.camel.component.olingo4" xmlns="urn:jboss:module:1.1">
        <resources>
          <resource-root path="camel-olingo4-2.21.0.fuse-740036.jar"/>
          <resource-root path="camel-olingo4-api-2.21.0.fuse-740036.jar"/>
          <resource-root path="camel-olingo4-api-2.21.0.fuse-740036.jar"/>
        </resources>
        <dependencies>
          <module name="org.apache.olingo4" export="true"/>
          <module name="org.slf4j"/>
          <module name="javax.xml.bind.api"/>
          <module name="org.apache.camel.core"/>
          <module name="org.apache.commons.io"/>
          <module name="org.apache.commons.lang"/>
          <module name="org.apache.httpcomponents"/>
          <module name="org.apache.olingo4.server"/>
        </dependencies>
        <exports>
          <exclude path="org/apache/camel/component/olingo4/internal"/>
          <exclude path="com/gc**"/>
        </exports>
      </module>
      

      which leads to

      Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
      	at org.apache.camel.component.olingo4.api.impl.Olingo4AppImpl.createHttpHeader(Olingo4AppImpl.java:639)
      	at org.apache.camel.component.olingo4.api.impl.Olingo4AppImpl.writeHttpHeader(Olingo4AppImpl.java:634)
      	at org.apache.camel.component.olingo4.api.impl.Olingo4AppImpl.serializeBatchRequest(Olingo4AppImpl.java:563)
      	at org.apache.camel.component.olingo4.api.impl.Olingo4AppImpl.writeContent(Olingo4AppImpl.java:540)
      	at org.apache.camel.component.olingo4.api.impl.Olingo4AppImpl.writeContent(Olingo4AppImpl.java:458)
      	... 145 more
      Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils from [Module "org.apache.camel.component.olingo4" version 2.21.0.fuse-740036 from local module loader @2ed94a8b (finder: local module finder @38082d64 (roots: /home/jbouska/servers/eap/7.4_CR1/jboss-eap-7.2/modules,/home/jbouska/servers/eap/7.4_CR1/jboss-eap-7.2/modules/system/layers/fuse,/home/jbouska/servers/eap/7.4_CR1/jboss-eap-7.2/modules/system/layers/base))]
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
      	... 150 more
      

      import module <module name="org.apache.commons.lang3"/> fixed this problem.

            jnethert@redhat.com James Netherton
            jbouska@redhat.com Jan Bouska
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: