SEVERE: Error executing FreeMarker template
FreeMarker template error:
Template inclusion failed (for parameter value "partials/exceptıon.ftl"):
Template not found for name "spark/partials/exceptıon.ftl".
The name was interpreted by this TemplateLoader: ClassTemplateLoader(resourceLoaderClass=com.aventstack.extentreports.ExtentReports, basePackagePath="templates/" /* relatively to resourceLoaderClass pkg */).
----
FTL stack trace ("~" means nesting-related):
- Failed at: #include "partials/${view.toString()}... [in template "spark/spark.spa.ftl" at line 27, column 36]
----
Java stack trace (for programmers):
----
freemarker.core._MiscTemplateException: [... Exception message was already printed; see it above ...]
at freemarker.core.Include.accept(Include.java:164)
at freemarker.core.Environment.visit(Environment.java:371)
at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:321)
at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:244)
at freemarker.core.Environment.visitIteratorBlock(Environment.java:645)
at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:108)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:94)
at freemarker.core.Environment.visit(Environment.java:335)
at freemarker.core.Environment.visit(Environment.java:341)
at freemarker.core.Environment.process(Environment.java:314)
at freemarker.template.Template.process(Template.java:383)
at com.aventstack.extentreports.templating.FreemarkerTemplate.processTemplate(FreemarkerTemplate.java:52)
at com.aventstack.extentreports.templating.FreemarkerTemplate.getSource(FreemarkerTemplate.java:39)
at com.aventstack.extentreports.templating.FreemarkerTemplate.writeTemplate(FreemarkerTemplate.java:45)
at com.aventstack.extentreports.reporter.AbstractFileReporter.processTemplate(AbstractFileReporter.java:74)
at com.aventstack.extentreports.reporter.ExtentSparkReporter.flush(ExtentSparkReporter.java:149)
at com.aventstack.extentreports.reporter.ExtentSparkReporter$1.onNext(ExtentSparkReporter.java:121)
at com.aventstack.extentreports.reporter.ExtentSparkReporter$1.onNext(ExtentSparkReporter.java:113)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:96)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:279)
at com.hyr.extentreports.Deneme2.main(Deneme2.java:11)
Caused by: freemarker.template.TemplateNotFoundException: Template not found for name "spark/partials/exceptıon.ftl".
The name was interpreted by this TemplateLoader: ClassTemplateLoader(resourceLoaderClass=com.aventstack.extentreports.ExtentReports, basePackagePath="templates/" /* relatively to resourceLoaderClass pkg */).
at freemarker.template.Configuration.getTemplate(Configuration.java:2957)
at freemarker.core.Environment.getTemplateForInclusion(Environment.java:3062)
at freemarker.core.Include.accept(Include.java:162)
... 24 more
Eki 14, 2023 10:57:24 ÖS com.aventstack.extentreports.reporter.ExtentSparkReporter flush
SEVERE: An exception occurred
FreeMarker template error:
Template inclusion failed (for parameter value "partials/exceptıon.ftl"):
Template not found for name "spark/partials/exceptıon.ftl".
The name was interpreted by this TemplateLoader: ClassTemplateLoader(resourceLoaderClass=com.aventstack.extentreports.ExtentReports, basePackagePath="templates/" /* relatively to resourceLoaderClass pkg */).
----
FTL stack trace ("~" means nesting-related):
- Failed at: #include "partials/${view.toString()}... [in template "spark/spark.spa.ftl" at line 27, column 36]
----
Java stack trace (for programmers):
----
freemarker.core._MiscTemplateException: [... Exception message was already printed; see it above ...]
at freemarker.core.Include.accept(Include.java:164)
at freemarker.core.Environment.visit(Environment.java:371)
at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:321)
at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:244)
at freemarker.core.Environment.visitIteratorBlock(Environment.java:645)
at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:108)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:94)
at freemarker.core.Environment.visit(Environment.java:335)
at freemarker.core.Environment.visit(Environment.java:341)
at freemarker.core.Environment.process(Environment.java:314)
at freemarker.template.Template.process(Template.java:383)
at com.aventstack.extentreports.templating.FreemarkerTemplate.processTemplate(FreemarkerTemplate.java:52)
at com.aventstack.extentreports.templating.FreemarkerTemplate.getSource(FreemarkerTemplate.java:39)
at com.aventstack.extentreports.templating.FreemarkerTemplate.writeTemplate(FreemarkerTemplate.java:45)
at com.aventstack.extentreports.reporter.AbstractFileReporter.processTemplate(AbstractFileReporter.java:74)
at com.aventstack.extentreports.reporter.ExtentSparkReporter.flush(ExtentSparkReporter.java:149)
at com.aventstack.extentreports.reporter.ExtentSparkReporter$1.onNext(ExtentSparkReporter.java:121)
at com.aventstack.extentreports.reporter.ExtentSparkReporter$1.onNext(ExtentSparkReporter.java:113)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:96)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:279)
at com.hyr.extentreports.Deneme2.main(Deneme2.java:11)
Caused by: freemarker.template.TemplateNotFoundException: Template not found for name "spark/partials/exceptıon.ftl".
The name was interpreted by this TemplateLoader: ClassTemplateLoader(resourceLoaderClass=com.aventstack.extentreports.ExtentReports, basePackagePath="templates/" /* relatively to resourceLoaderClass pkg */).
at freemarker.template.Configuration.getTemplate(Configuration.java:2957)
at freemarker.core.Environment.getTemplateForInclusion(Environment.java:3062)
at freemarker.core.Include.accept(Include.java:162)
... 24 more
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>5.1.1</version>
</dependency>
public static void main(String[] args) {
ExtentReports extent = new ExtentReports();
ExtentSparkReporter spark = new ExtentSparkReporter("target/Spark.html");
extent.attachReporter(spark);
extent.createTest("MyFirstTest")
.log(Status.PASS, "This is a logging event for MyFirstTest, and it passed!");
extent.flush();
}
我观看了所有大小报告安装录像,但我看不到有任何问题。 奇怪的是,当我安装一个朋友,在我自己的电脑上顺利执行“Extent Report”项目时,我也遇到同样的错误。 因此,我认为这个问题与项目无关,但你可以说出。
I added extentreports adjustments to my project in different ways, both simple and complex, but the result did not change. I created new projects, but the result did not change. I deleted everything, Java, Intellij, Maven, and reinstalled it, but the result was the same. I watched the videos exactly from start to finish and still got the same result. I saw that no one is using the "exception.ftl" file, which was stated to be missing in the error I received.
请帮助我。