Hi Team,
I have upgraded CXF version in our working application from 3.3.4 to 3.3.5
but after upgrading not able to access any URL.
we have OsgiCxfNonSpringJaxrsServlet which extends CXFNonSpringJaxrsServlet
and override below method
protected void createServerFromApplication(String cName, ServletConfig
servletConfig) throws ServletException {
JAXRSServerFactoryBean bean =
ResourceUtils.createApplication(odataApplication,
MessageUtils.isTrue(ignoreParam),
getStaticSubResolutionValue(servletConfig), false,null);
String splitChar = getParameterSplitChar(servletConfig);
setAllInterceptors(bean, servletConfig, splitChar);
setInvoker(bean, servletConfig);
setExtensions(bean, servletConfig);
setDocLocation(bean, servletConfig);
setSchemasLocations(bean, servletConfig);
bean.setBus(getBus());
bean.create();
}
in 3.3.4 it was working fine but in 3.3.5 servlet init failed and giving
below error
used by: org.apache.felix.log.LogException:
org.apache.cxf.service.factory.ServiceConstructionException: There is an
endpoint already running on /.
solved above issue by providing diffrent address like below
bean.setAddress(address);
Not all the servlet showing registered but not able to access any of the
URL getting 404
Please find proxy servlet snippet from web.xml
<listener>
<listener-class>org.apache.felix.http.proxy.ProxyListener</listener-class>
</listener>
<filter>
<filter-name>WebConsoleFilter</filter-name>
<filter-class>com.sap.banking.web.console.filter.WebConsoleFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>WebConsoleFilter</filter-name>
<url-pattern>/system/console/*</url-pattern>
<url-pattern>/system/console</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>proxy</servlet-name>
<servlet-class>org.apache.felix.http.proxy.ProxyServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>proxy</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
application is working fine with cxf 3.3.4 but in 3.3.5 it's breaking, is
there any changes related to proxy servlet or whiteboarding in 3.3.5?
also observed org.apache.cxf.transport.servlet.CXFNonSpringServlet with
path '/cxf' get registred by default in Servlet Context
'org.osgi.service.http' Registered Servlet Services
which might causing this issue.
Please help me with this upgrade.
Thanks & Regards,
Sandeep Ambule