0

Currently I have a problem during migrating a Java Enterprise project form old WAS-8 to Liberty Profile 17. In my case the environment cannto find a bunch of css/js files in the richfaces jar. Loading a page in the browser, WLP17 writes warnings like this into the logfile:

[WARNING ] SRVE0190E: File not found: /org.richfaces.resources/javax.faces.resource/org.richfaces.staticResource/4.5.17.Final/PackedCompressed/org.richfaces/jquery.js

I build the project using maven and I defined the richfaces dependency in the parent pom like this:

<dependency>
    <groupId>org.richfaces</groupId>
    <artifactId>richfaces</artifactId>
    <version>4.5.17.Final</version>
</dependency>

Then, I have several EJB and WAR projects that are packed together into an EAR file. The WAR projects using richfaces contain a richfaces dependency with scope provided:

<dependency>
    <groupId>org.richfaces</groupId>
    <artifactId>richfaces</artifactId>
    <scope>provided</scope>
</dependency>

Finally, the EAR pom has the dependency on richfaces to ensure that the library is included in the EAR file. For any reason the liberty is not able to find resources located in the richfaces jar.

I inspected the created EAR file, it contains the richfaces libraries. Then, I inspected the richfaces libraries, the also contain the files that are not found.

Is there any more configuration I have to do?

4

2 回答 2

1

预期从 META-INF/resources/ 提供静态文件的 Jar 库应捆绑在 Web 应用程序 WAR 中。Servlet 3.0 规范中的第 4.6 节是相关的:

getResource 和 getResourceAsStream 方法采用带有前导“/”的字符串作为参数,该参数给出资源相对于上下文根目录或相对于Web 应用程序 WEB中 JAR 文件的 META-INF/resources 目录的路径-INF/lib 目录...

于 2017-11-22T19:42:19.240 回答
0

@wtlucy 的评论确实解决了我的问题。谢谢你。

我已将richfaces 库放入需要这些库的WAR 文件中。

于 2017-11-22T11:12:47.377 回答