Skip to content

Forbidden attempt to set different raw URI for given request context #10700

@AntoineDuComptoirDesPharmacies

Description

Tracer Version(s)

1.59.0

Java Version(s)

21

JVM Vendor

Eclipse Adoptium / Temurin

Bug Report

In our Play Java Project, we sometimes get the following trace error in our datadog logs.
Do you know whete it can come from please ?

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518835191Z lcdp-monolith-service 1177 	at java.base/java.lang.Thread.run(Unknown Source)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518824674Z lcdp-monolith-service 1177 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518810403Z lcdp-monolith-service 1177 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518802054Z lcdp-monolith-service 1177 	at org.apache.pekko.dispatch.TaskInvocation.run(AbstractDispatcher.scala:59)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.51879225Z lcdp-monolith-service 1177 	at org.apache.pekko.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:110)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518780129Z lcdp-monolith-service 1177 	at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.51877047Z lcdp-monolith-service 1177 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518761714Z lcdp-monolith-service 1177 	at org.apache.pekko.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:110)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.51875175Z lcdp-monolith-service 1177 	at org.apache.pekko.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:73)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518741237Z lcdp-monolith-service 1177 	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:484)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518731282Z lcdp-monolith-service 1177 	at org.apache.pekko.http.scaladsl.util.FastFuture$.$anonfun$transformWith$3(FastFuture.scala:59)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518720692Z lcdp-monolith-service 1177 	at org.apache.pekko.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:49)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518708343Z lcdp-monolith-service 1177 	at play.core.server.PekkoHttpServer.$anonfun$runAction$3(PekkoHttpServer.scala:467)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518695329Z lcdp-monolith-service 1177 	at play.api.libs.streams.StrictAccumulator.run(Accumulator.scala:198)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518685067Z lcdp-monolith-service 1177 	at scala.Function1.$anonfun$andThen$1(Function1.scala:87)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518675389Z lcdp-monolith-service 1177 	at scala.Function1.$anonfun$andThen$1(Function1.scala:87)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518665432Z lcdp-monolith-service 1177 	at play.api.libs.streams.StrictAccumulator.$anonfun$mapFuture$3(Accumulator.scala:167)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518656437Z lcdp-monolith-service 1177 	at scala.util.Try$.apply(Try.scala:210)

Feb 27 10:52:01.519
lcdp-monolith
2026-02-27T09:52:01.518641645Z lcdp-monolith-service 1177 	at play.api.libs.streams.StrictAccumulator.$anonfun$mapFuture$4(Accumulator.scala:167)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518450234Z lcdp-monolith-service 1177 	at play.api.mvc.BodyParser$.$anonfun$runParserThenInvokeAction$1(Action.scala:260)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518442054Z lcdp-monolith-service 1177 	at play.api.mvc.Action.$anonfun$apply$6(Action.scala:83)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518432933Z lcdp-monolith-service 1177 	at play.core.j.JavaAction.apply(JavaAction.scala:117)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518423785Z lcdp-monolith-service 1177 	at datadog.trace.instrumentation.play26.PlayHttpServerDecorator.onRequest(PlayHttpServerDecorator.java:134)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518414312Z lcdp-monolith-service 1177 	at datadog.trace.bootstrap.instrumentation.decorator.HttpServerDecorator.onRequest(HttpServerDecorator.java:275)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518404227Z lcdp-monolith-service 1177 	at datadog.trace.bootstrap.instrumentation.decorator.HttpServerDecorator.callIGCallbackURI(HttpServerDecorator.java:555)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518394203Z lcdp-monolith-service 1177 	at datadog.trace.api.gateway.InstrumentationGateway$5.apply(InstrumentationGateway.java:252)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518385726Z lcdp-monolith-service 1177 	at datadog.trace.api.gateway.InstrumentationGateway$5.apply(InstrumentationGateway.java:258)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518377349Z lcdp-monolith-service 1177 	at com.datadog.appsec.gateway.GatewayBridge.onRequestMethodUriRaw(GatewayBridge.java:984)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518368027Z lcdp-monolith-service 1177 	at com.datadog.appsec.gateway.AppSecRequestContext.setRawURI(AppSecRequestContext.java:412)

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518342826Z lcdp-monolith-service 1177 java.lang.IllegalStateException: Forbidden attempt to set different raw URI for given request context

Feb 27 10:52:01.518
lcdp-monolith
2026-02-27T09:52:01.518245984Z lcdp-monolith-service 1177 [dd.trace 2026-02-27 09:52:01:517 +0000] [application-pekko.actor.default-dispatcher-59] WARN datadog.trace.api.gateway.InstrumentationGateway - Callback for EventType{name='server.request.method.uri.raw'} threw.

Yours faithfully,
LCDP

Expected Behavior

No error log

Reproduction Code

Do not know what is the cause

Metadata

Metadata

Assignees

Labels

type: bugBug report and fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions