0

Here is the complete error I'am using Spring java as backend (gradle) and ReactJS as frontend.

Here is my docker Gateway logs:

2024-07-05 20:20:32 Jul 05, 2024 6:20:32 PM freemarker.log._JULLoggerFactory$JULLogger error
2024-07-05 20:20:32 SEVERE: Error executing FreeMarker template
2024-07-05 20:20:32 FreeMarker template error:
2024-07-05 20:20:32 The following has evaluated to null or missing:
2024-07-05 20:20:32 ==> log.getClientIdentifier()  [in template "v4-log.ftl" at line 18, column 27]
2024-07-05 20:20:32 
2024-07-05 20:20:32 ----
2024-07-05 20:20:32 Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
2024-07-05 20:20:32 ----
2024-07-05 20:20:32 
2024-07-05 20:20:32 ----
2024-07-05 20:20:32 FTL stack trace ("~" means nesting-related):
2024-07-05 20:20:32     - Failed at: ${log.getClientIdentifier()}  [in template "v4-log.ftl" at line 18, column 25]
2024-07-05 20:20:32     - Reached through: @compress single_line=true  [in template "v4-log.ftl" at line 8, column 1]
2024-07-05 20:20:32 ----
2024-07-05 20:20:32 
2024-07-05 20:20:32 Java stack trace (for programmers):
2024-07-05 20:20:32 ----
2024-07-05 20:20:32 freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
2024-07-05 20:20:32     at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
2024-07-05 20:20:32     at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:481)
2024-07-05 20:20:32     at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:401)
2024-07-05 20:20:32     at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:370)
2024-07-05 20:20:32     at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:100)
2024-07-05 20:20:32     at freemarker.core.DollarVariable.accept(DollarVariable.java:63)
2024-07-05 20:20:32     at freemarker.core.Environment.visit(Environment.java:383)
2024-07-05 20:20:32     at freemarker.core.Environment.visitAndTransform(Environment.java:514)
2024-07-05 20:20:32     at freemarker.core.UnifiedCall.accept(UnifiedCall.java:104)
2024-07-05 20:20:32     at freemarker.core.Environment.visit(Environment.java:347)
2024-07-05 20:20:32     at freemarker.core.Environment.visit(Environment.java:353)
2024-07-05 20:20:32     at freemarker.core.Environment.process(Environment.java:326)
2024-07-05 20:20:32     at freemarker.template.Template.process(Template.java:383)
2024-07-05 20:20:32     at io.gravitee.common.templating.FreeMarkerComponent.generateFromTemplate(FreeMarkerComponent.java:85)
2024-07-05 20:20:32     at io.gravitee.reporter.common.formatter.elasticsearch.ElasticsearchFormatter.generateData(ElasticsearchFormatter.java:422)
2024-07-05 20:20:32     at io.gravitee.reporter.common.formatter.elasticsearch.ElasticsearchFormatter.getSource(ElasticsearchFormatter.java:407)
2024-07-05 20:20:32     at io.gravitee.reporter.common.formatter.elasticsearch.ElasticsearchFormatter.format0(ElasticsearchFormatter.java:112)
2024-07-05 20:20:32     at io.gravitee.reporter.common.formatter.AbstractFormatter.format(AbstractFormatter.java:55)
2024-07-05 20:20:32     at io.gravitee.reporter.elasticsearch.indexer.AbstractIndexer.transform(AbstractIndexer.java:72)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:64)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.subscriptions.ScalarSubscription.request(ScalarSubscription.java:55)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.request(BasicFuseableSubscriber.java:153)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.subscriptions.SubscriptionArbiter.setSubscription(SubscriptionArbiter.java:87)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext$OnErrorNextSubscriber.onSubscribe(FlowableOnErrorNext.java:65)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onSubscribe(BasicFuseableSubscriber.java:67)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.operators.flowable.FlowableJust.subscribeActual(FlowableJust.java:34)
2024-07-05 20:20:32     at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:16144)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:38)
2024-07-05 20:20:32     at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:16144)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnErrorNext.subscribeActual(FlowableOnErrorNext.java:39)
2024-07-05 20:20:32     at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:16144)
2024-07-05 20:20:32     at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:16090)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onNext(FlowableFlatMap.java:161)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:403)
2024-07-05 20:20:32     at io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:178)
2024-07-05 20:20:32     at io.vertx.rxjava3.ContextScheduler$ContextWorker$TimedAction.run(ContextScheduler.java:189)
2024-07-05 20:20:32     at io.vertx.rxjava3.ContextScheduler$ContextWorker$TimedAction.lambda$execute$1(ContextScheduler.java:174)
2024-07-05 20:20:32     at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:191)
2024-07-05 20:20:32     at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)
2024-07-05 20:20:32     at io.vertx.core.impl.ContextImpl.lambda$internalExecuteBlocking$2(ContextImpl.java:210)
2024-07-05 20:20:32     at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
2024-07-05 20:20:32     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2024-07-05 20:20:32     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2024-07-05 20:20:32     at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
2024-07-05 20:20:32     at java.base/java.lang.Thread.run(Unknown Source)
2024-07-05 20:20:32

I've setup my api subscribtion etc... with GraviteeIO but since that my front and my back are having problems to communicate the problem seems to be that my "log.getClientIdentifier() is null or missing" but I don't remember coding such a parameter apparently that is something related to some ftl file? That I don't have as well.

Tried to setup on my templates from gradle a ftl (v4-log.ftl) file such as:

${log.getClientIdentifier()!"Admin"} 

but that's not doing anything.

If anyone had encounter the same problem may you help me please.

PS: I think that information is important but when i'm doing the same http request in postman its working fine.

0

Browse other questions tagged or ask your own question.