You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Grzegorz Grzybek (Jira)" <ji...@apache.org> on 2020/03/26 06:09:00 UTC

[jira] [Commented] (CAMEL-14792) ClassNotFoundException for onException(Class) in Java DSL in OSGi

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

Grzegorz Grzybek commented on CAMEL-14792:
------------------------------------------

Because the initial reason I've created this issue is some exotic OSGi use case (helper methods to construct routes in one bundle, actual route constructed in another one), and because in Camel 3 exception names are used additionally in {{org.apache.camel.processor.errorhandler.ExceptionPolicy}} (names only, no classes), I'm fixing this problem only in 2.25.x.

> ClassNotFoundException for onException(Class) in Java DSL in OSGi
> -----------------------------------------------------------------
>
>                 Key: CAMEL-14792
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14792
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Grzegorz Grzybek
>            Assignee: Grzegorz Grzybek
>            Priority: Major
>             Fix For: 2.25.1
>
>
> With CAMEL-13468, {{OnExceptionDefinition.java}} lost {{exceptionClasses}} field and actual exception classes where converted in Java DSL into String objects - resolved later when exception processor was created.
> This could (and actually did) cause problems in OSGi, when route was defined from different bundle (which had correct {{Import-Package}} headers generated by maven-bundle-plugin) than the bundle with actual route.
> I have a fix that both keeps class names (for marshalling purpose) and actual classes (for OSGi).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)