Re: Tomcat 11.0.18 - java.lang.AssertionError in Mapper#internalMap
Christopher Schultz <[email protected]> Fri, 27 Mar 2026 17:44:15 -0400
| Newsgroups | gmane.comp.jakarta.tomcat.user |
|---|---|
| Message-ID | <[email protected]> |
Torsten,
On 3/24/26 9:42 AM, Torsten Krah wrote:
> eventually while reading logs from my container I stumbled over this
> one:
>
>
> Exception in thread "https-jsse-nio-8443-exec-18" java.lang.AssertionError
> at org.apache.catalina.mapper.Mapper.internalMap(Mapper.java:713)
> at org.apache.catalina.mapper.Mapper.map(Mapper.java:675)
> at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:692)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
> at org.apache.coyote.http2.StreamProcessor.service(StreamProcessor.java:459)
> at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
> at org.apache.coyote.http2.StreamProcessor.process(StreamProcessor.java:102)
> at org.apache.coyote.http2.StreamRunnable.run(StreamRunnable.java:35)
> at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:946)
> at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:480)
> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:57)
> at java.base/java.lang.Thread.run(Unknown Source)
>
>
> Anyone an idea how this would happen, what might have gone wrong?
That error message was only very recently switched from an
AssertionError to a more descriptive message:
throw new IllegalStateException(sm.getString("mapper.alreadyDone",
mappingData));
The message is "Mapping was already done on this request on [{0}]".
> It did just happen only once, I have no reproducer and no idea which
> request might have triggered this, but I am curious about that trace.
The code path seems to indicate that Tomcat was trying to figure out how
to route the request, but that the work had already been done on the
request. That might point to some odd application behavior where request
objects are being used in very unusual ways, or not properly recycled.
Do you have a setting for discardFacades on your <Connector> element in
server.xml? It shouldn't matter as the facades are not where the real
data are stored, but I'm just curious.
-chris