好的,我有需要就来找你。
我继承了一个带有自定义标记库的项目。该项目在AEM中,但问题更多的是Java方面的问题,我所知道的与AEM无关。AEM构建在OSGI上,因此
能够
是相关的,但这不太可能是答案的一部分。
从本质上讲,我在两台服务器中只有一台出现异常。它说:
组织。阿帕奇。吊索应用程序编程接口。脚本编写。ScriptEvaluationException:组织。阿帕奇。吊索脚本编写。jsp。贾斯珀。JasperException:未找到文件“/META-INF/tags/helloWorld.tagx”
helloWorld.tagx
是模板项目留下的垃圾,但出于某种原因,它是必不可少的。这里有几个问题。
-
标签
是
META-INF/tags/helloWorld.tagx
)我用的是
jsptld-maven-plugin
生成
tld
在我看来正确的文件。
插件的配置(以及
maven-bundle-plugin
<plugin>
<groupId>com.squeakysand.jsp</groupId>
<artifactId>jsptld-maven-plugin</artifactId>
<configuration>
<shortName>myproject</shortName>
<processTagFiles>true</processTagFiles>
</configuration>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Activator>com.rebny.taglib.osgi.Activator</Bundle-Activator>
<Include-Resource>
META-INF/${project.artifactId}-${project.version}.tld=${project.build.outputDirectory}/META-INF/${project.artifactId}-${project.version}.tld,
{maven-resources}
</Include-Resource>
<Sling-Bundle-Resources>
/META-INF/tags
</Sling-Bundle-Resources>
</instructions>
</configuration>
</plugin>
以及生成的tld文件中的段:
<tag-file>
<name>helloWorld</name>
<path>/META-INF/tags/helloWorld.tagx</path>
</tag-file>
所以我觉得它很好,我做了很多搜索,找到了有语法错误的人,等等。但我不认为是这样,尤其是因为它在一台服务器上工作。
-
习惯于
我很乐意提供其他信息。我对这方面的知识相当贫乏,所以我不确定哪些信息是相关的。非常感谢任何帮助或故障排除提示!
完整堆栈跟踪
here