You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chandru Mariraj <ch...@gmail.com> on 2023/04/09 10:38:46 UTC

java.lang.IllegalStateException: Unable to find match between the canonical context path

 <https://stackoverflow.com/posts/75952377/timeline>

I am migrating some of my spring projects from Spring 2 to spring 3.0.4.
Most of them are communicating within Rest calls. I see for some requests I
am getting the below error .

java.lang.IllegalStateException: Unable to find match between the canonical
context path [/servicename] and the URI presented by the user agent
[_visitor=.......] at
org.apache.catalina.connector.Request.getContextPath(Request.java:2152) at
org.apache.catalina.connector.RequestFacade.getContextPath(RequestFacade.java:784)
at
org.apache.catalina.core.ApplicationDispatcher.wrapRequest(ApplicationDispatcher.java:896)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:341)

If the API is called directly (using postman) it's working. but when called
through another service it fails.

Tomcat version resolved is Apache Tomcat/10.1.5

Could you pls help what could be the issue?

I rolled back to the previous Spring 2.* version and it works fine.

Re: java.lang.IllegalStateException: Unable to find match between the canonical context path

Posted by Mark Thomas <ma...@apache.org>.
On 09/04/2023 11:38, Chandru Mariraj wrote:
>   <https://stackoverflow.com/posts/75952377/timeline>
> 
> I am migrating some of my spring projects from Spring 2 to spring 3.0.4.
> Most of them are communicating within Rest calls. I see for some requests I
> am getting the below error .
> 
> java.lang.IllegalStateException: Unable to find match between the canonical
> context path [/servicename] and the URI presented by the user agent
> [_visitor=.......] at
> org.apache.catalina.connector.Request.getContextPath(Request.java:2152) at
> org.apache.catalina.connector.RequestFacade.getContextPath(RequestFacade.java:784)
> at
> org.apache.catalina.core.ApplicationDispatcher.wrapRequest(ApplicationDispatcher.java:896)
> at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:341)
> 
> If the API is called directly (using postman) it's working. but when called
> through another service it fails.
> 
> Tomcat version resolved is Apache Tomcat/10.1.5
> 
> Could you pls help what could be the issue?
> 
> I rolled back to the previous Spring 2.* version and it works fine.

I think you have hit bug 66488. An update to 10.1.7 will fix that.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org