Bad Request Error When Passing a Colon (Or Other Special Characters) to a RESTful WebService (Doc ID 1558693.1)

Last updated on OCTOBER 27, 2016

Applies to:

Oracle Application Express (formerly HTML DB) - Version 4.2 and later
Oracle Application Express Listener - Version 2.0.0.354.17.05 and later
Information in this document applies to any platform.

Symptoms

Passing special characters such as a colon (eg : ) to a RESTful WebService fails with a the following error. 

 

400 - Bad Request
The request path contains illegal characters

The request path contains illegal characters
WebException [statusCode=400, reasons=[The request path contains illegal characters]]
at oracle.dbtools.rt.web.WebException.webException(WebException.java:326)
at oracle.dbtools.rt.web.WebException.badRequest(WebException.java:204)
at oracle.dbtools.rt.web.WebException.badRequest(WebException.java:230)
at oracle.dbtools.rt.web.WebErrorResponse.badRequest(WebErrorResponse.java:42)
at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:190)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3284)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

 Using normal non-special characters works fine.

Changes

 None. Just using special characters.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms