Peter Hermsdorf created CAMEL-17015:
---------------------------------------
Summary: Issue with REST Service after Camel update
Key: CAMEL-17015
URL: https://issues.apache.org/jira/browse/CAMEL-17015
Project: Camel
Issue Type: Bug
Components: rest
Affects Versions: 3.11.2
Reporter: Peter Hermsdorf
After updating from Camel 3.4.4 to 3.11.2 our REST Services aren'T working
anymore.
Already discussed here:
https://camel.zulipchat.com/#narrow/stream/257298-camel/topic/Problem.20with.20REST.20services.20after.20upgrading.20to.20Camel.203.2E11.2E2/near/255227937
Debugging revealed the following:
we create a Osgi Camel Context and register Routes like this:
{code:java}
camelContext = new OsgiDefaultCamelContext(bundleContext) {
@Override
public void init() {
final RouteBuilder routes =
createRoutes();
routes.restConfiguration().componentProperty("servletName",
"my.custom.servletName").clientRequestValidation(true);
this.addRoutes(routes);
super.init();
}
{code}
In org.apache.camel.component.servlet.ServletComponent.connect(HttpConsumer)
{code}
sc.getEndpoint().getServletName()
{code}
returns the Default Servlet Name {code}CamelServlet{code} and not my
{code}my.custom.servletName{code} because
{code}org.apache.camel.component.servlet.ServletEndpoint.setServletName(String){code}
is called with {code}CamelServlet{code} and not with my custom servletname.
Seems like no one is setting the correct value on
{code}org.apache.camel.component.servlet.ServletComponent.setServletName(String){code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)