You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Thomas Diesler (JIRA)" <ji...@apache.org> on 2019/05/08 07:03:00 UTC

[jira] [Comment Edited] (CAMEL-13487) CNFE with camel-dns, camel-http4

    [ https://issues.apache.org/jira/browse/CAMEL-13487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16835373#comment-16835373 ] 

Thomas Diesler edited comment on CAMEL-13487 at 5/8/19 7:02 AM:
----------------------------------------------------------------

In case this is not clear. If ...

* A uses type from B and C 
* B uses type from C

it would be wrong to define the dependency graph like  this

{code}
A -> B -> C
{code}

instead the dependency graph should be defined like this 

{code}
A -> B,C 
B -> C
{code}

In our case, camel-dns currently says that it uses types from camel-cloud. camel-cloud says that it uses types from camel-api.
In reality camel-dns also uses types from camel-api, but does not says so.

Build and runtime currenly only work because maven flattens the classpath. In OSGi this would be a problem too and I suspect it only works because the OSGi tooling silently adds the missing dependency from camel-dns to camel-api, which is generally incorrect but in most cases not problematic (which does not make it right :-)




was (Author: tdiesler):
In case this is not clear, if ...

* A uses type from B and C 
* B uses type from C

it would be wrong to define the dependency graph like  this

{code}
A -> B -> C
{code}

instead the dependency graph should be defined like this 

{code}
A -> B,C 
B -> C
{code}

In our case, camel-dns currently says that it uses types from camel-cloud. camel-cloud says that it uses types from camel-api.
In reality camel-dns also uses types from camel-api, but does not says so.

Build and runtime currenly only work because maven flattens the classpath. In OSGi this would be a problem too and I suspect it only works because the OSGi tooling silently adds the missing dependency from camel-dns to camel-api, which is generally incorrect but in most cases not problematic (which does not make it right :-)



> CNFE with camel-dns, camel-http4
> --------------------------------
>
>                 Key: CAMEL-13487
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13487
>             Project: Camel
>          Issue Type: Task
>          Components: camel-dns
>    Affects Versions: 3.0.0-M2
>            Reporter: Thomas Diesler
>            Assignee: Thomas Diesler
>            Priority: Major
>             Fix For: 3.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code}
> java.lang.NoClassDefFoundError: Failed to link org/apache/camel/component/dns/types/DnsConverterLoader (Module "org.apache.camel.component.dns" from local module loader @5d740a0f (finder: local module finder @214b199c (roots: /Users/tdiesler/git/wildfly-camel/itests/standalone/smoke/target/wildfly-16.0.0.Final/modules,/Users/tdiesler/git/wildfly-camel/itests/standalone/smoke/target/wildfly-16.0.0.Final/modules/system/layers/fuse,/Users/tdiesler/git/wildfly-camel/itests/standalone/smoke/target/wildfly-16.0.0.Final/modules/system/layers/base))): org/apache/camel/spi/TypeConverterLoader
> {code}
> Components should define their direct dependencies as such. i.e. In this case camel-api is trasitively reachable through camel-cloud, which would not work in a modular environment.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)