Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[management] error on page template because of virtual hosting #2719

Closed
NicolasGeraud opened this issue Oct 7, 2019 · 0 comments

Comments

@NicolasGeraud
Copy link
Member

@NicolasGeraud NicolasGeraud commented Oct 7, 2019

the issue #1594 introduces a regression on page transformation :

GRAVE: Error executing FreeMarker template
FreeMarker template error:
The following has evaluated to null or missing:
==> api.proxy.contextPath  [in template "0efc10c9-edc6-4c77-bc10-c9edc6cc778e" at line 18, column 55]

----
Tip: It's the step after the last dot that caused this error, not those before it.
----
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)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${api.proxy.contextPath}  [in template "0efc10c9-edc6-4c77-bc10-c9edc6cc778e" at line 18, column 53]
----

Java stack trace (for programmers):
----
freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
	at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
	at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:467)
	at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:389)
	at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:358)
	at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:100)
	at freemarker.core.DollarVariable.accept(DollarVariable.java:63)
	at freemarker.core.Environment.visit(Environment.java:330)
	at freemarker.core.Environment.visit(Environment.java:336)
	at freemarker.core.Environment.process(Environment.java:309)
	at freemarker.template.Template.process(Template.java:384)
	at org.springframework.ui.freemarker.FreeMarkerTemplateUtils.processTemplateIntoString(FreeMarkerTemplateUtils.java:50)
	at io.gravitee.management.service.impl.PageServiceImpl.transformWithTemplate(PageServiceImpl.java:182)
	at io.gravitee.management.service.impl.PageServiceImpl.transformSwagger(PageServiceImpl.java:143)
	at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
@NicolasGeraud NicolasGeraud added this to the APIM - 1.29.x milestone Oct 7, 2019
@NicolasGeraud NicolasGeraud changed the title [management] error on page [management] error on page template because of virtual hosting Oct 7, 2019
NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Nov 6, 2019
NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Nov 6, 2019
NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Nov 7, 2019
aelamrani added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Nov 7, 2019
@aelamrani aelamrani closed this Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
API Management
Awaiting triage
2 participants
You can’t perform that action at this time.