Thank you for your reply.
I solved the issue, it was my fault. I had an old camel-http4 dependency (2.x) 
in the classpath.
I changed this dependency to camel-http (3.x) and worked!

Regards

Riccardo

Il giorno 04/05/21, 18:01 "Daniel Langevin" <[email protected]> 
ha scritto:

    Hi Riccardo,

    URL rewrite is deprecated, last version 2.25

    https://camel.apache.org/manual/latest/camel-3-migration-guide.html 


    you must use real proxy to do that,  like NGINX or HTTPD Apache.


    Hope is help!



    Daniel Langevin
    Direction de l’assistance et des technologies
    Direction des ressources informationnelles et matérielles

    Société d’habitation du Québec
    Édifice Marie-Guyart
    1054, rue Louis-Alexandre-Taschereau
    Aile Jacques-Parizeau, 1er étage
    Québec (Québec) G1R 5E7
    Téléphone : 418 643-4035, poste 1191
    Sans frais : 1 800 463-4315





    >>> 
    De :        "Modanese, Riccardo" <[email protected]>
    À : "[email protected]" <[email protected]>
    Date :      2021-05-04 10:07
    Objet :     Http4 endpoint throws UrlRewrite NoClassDef

    Hi all,

    I’m moving http routes from Camel 2.x to 3.x.
    Main dependencies are
    Camel 3.4
    SpringBoot 2.2.7-RELEASE
    Spring 5.2.6-RELEASE

    The http endpoints are configured at runtime and injected into Spring 
context.

    So, when a message is routed to an http endpoint I get this exception:


    Caused by: java.lang.NoClassDefFoundError: 
org/apache/camel/http/common/UrlRewrite

           at 
org.apache.camel.component.http4.HttpComponent.createEndpoint(HttpComponent.java:237)

           at 
org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:237)

           at 
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:846)

           at 
org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:773)

           at 
org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:73)

           at 
org.apache.camel.support.ExchangeHelper.resolveEndpoint(ExchangeHelper.java:114)

           at 
org.apache.camel.support.ExchangeHelper.resolveEndpoint(ExchangeHelper.java:92)

    I cannot find any UrlRewrite class/interface in Camel 3.x libraries (only 
camel-http-commons 2.x seems to have one)
    Looking at the stacktrace I don’t understand if I have some dirty 
dependency tree since from my understanding http4 package was renamed to http 
right?(https://camel.apache.org/manual/latest/camel-3-migration-guide.html)

    Can someone point me to the right direction to solve this issue?

    Thank you

    Riccardo

Reply via email to