rty813 opened a new issue, #3290:
URL: https://github.com/apache/hertzbeat/issues/3290
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Current Behavior
I upgraded from 1.6.0 to 1.7.0 and found that the notification did not work
### Expected Behavior
no error
### Steps To Reproduce
_No response_
### Environment
```markdown
HertzBeat version(s):1.7.0
```
### Debug logs
```
2025-04-23 09:34:15.637 [notify-worker-3] ERROR freemarker.runtime Line:60
- Error executing FreeMarker template
freemarker.core.InvalidReferenceException: The following has evaluated to
null or missing:
==> targetLabel [in template "freeMakerTemplate" at line 2, column 11]
----
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: ${targetLabel} [in template "freeMakerTemplate" at
line 2, column 9]
----
at
freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
at
freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:490)
at
freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:410)
at
freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:379)
at
freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:104)
at freemarker.core.DollarVariable.accept(DollarVariable.java:63)
at freemarker.core.Environment.visit(Environment.java:344)
at freemarker.core.Environment.visit(Environment.java:350)
at freemarker.core.Environment.process(Environment.java:323)
at freemarker.template.Template.process(Template.java:383)
at
org.springframework.ui.freemarker.FreeMarkerTemplateUtils.processTemplateIntoString(FreeMarkerTemplateUtils.java:51)
at
org.apache.hertzbeat.alert.notice.impl.AbstractAlertNotifyHandlerImpl.renderContent(AbstractAlertNotifyHandlerImpl.java:76)
at
org.apache.hertzbeat.alert.notice.impl.DingTalkRobotAlertNotifyHandlerImpl.send(DingTalkRobotAlertNotifyHandlerImpl.java:51)
at
org.apache.hertzbeat.alert.notice.AlertNoticeDispatch.sendNoticeMsg(AlertNoticeDispatch.java:87)
at
org.apache.hertzbeat.alert.notice.AlertNoticeDispatch.lambda$sendNotify$3(AlertNoticeDispatch.java:127)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at
org.apache.hertzbeat.alert.notice.AlertNoticeDispatch.lambda$sendNotify$4(AlertNoticeDispatch.java:125)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
2025-04-23 09:34:15.638 [notify-worker-3] WARN
org.apache.hertzbeat.alert.notice.AlertNoticeDispatch Line:130 - DispatchTask
sendNoticeMsg error, message: [DingTalk Notify Error] The following has
evaluated to null or missing:
==> targetLabel [in template "freeMakerTemplate" at line 2, column 11]
----
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: ${targetLabel} [in template "freeMakerTemplate" at
line 2, column 9]
----
```
### Anything else?
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]