i tried to * add camel-platform-http-starter and camel-platform-http => this causes the same behavior * replace camel-servlet-starter with platform-http-* => this causes a 404 as the endpoint apparently is not properly registered
> Am 18.02.2024 um 15:11 schrieb Claus Ibsen <claus.ib...@gmail.com>: > > Hi > > You can try using platform-http-starter instead of servlets > > On Sun, Feb 18, 2024 at 3:09 PM Alphonse Bendt <alphonse.be...@gmail.com> > wrote: > >> Hi folks, >> >> There is an issue when running tests for a SpringBoot application that >> uses camel-rest. >> >> When there are multiple tests that use a different configuration (e.g., >> different properties), we run into this error: >> >> Caused by: >> jakarta.servlet.ServletException: Duplicate >> ServletName detected: CamelServlet. Existing: >> CamelHttpTransportServlet[name=CamelServlet] This: >> CamelHttpTransportServlet[name=CamelServlet]. Its advised to use unique >> ServletName per Camel application. >> at >> app//org.apache.camel.component.servlet.CamelHttpTransportServlet.init(CamelHttpTransportServlet.java:68) >> >> >> I have created a standalone example to demonstrate the issue: >> https://github.com/abendt/camel-rest >> >> To reproduce: >> ./gradlew -i test >> >> The project contains two tests with different configurations (one has an >> additional active profile). >> I would expect the build to pass; however, it fails with the mentioned >> exception. >> >> As a workaround, it's possible to add @DirtiesContext. However, this hurts >> test performance and should be avoided if possible. >> >> Am i missing something or is this a current limitation of camel-rest? >> >> thanks, >> Alphonse > > > > -- > Claus Ibsen > ----------------- > @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2