WebLogic 10.3.6 升级到 12c,从 JSF 1.1 迁移到 1.2 导致错误,特别是在尝试查找 JSF 1.2 库时

WebLogic 10.3.6 Upgrade to 12c, Migration from JSF 1.1 to 1.2 results in errors specifically when trying to find the JSF 1.2 library

如标题所述,我们最近从 WebLogic 10.3.6 升级到了 12c。我们的应用程序使用的是 JSF 1.1,但对于 12c,您必须使用 1.2 或 2.0。我 运行 遇到的问题是将应用程序更新到 1.2,在 WebLogic 中部署 1.2,然后还更新 weblogic.xml 错误不会消失,并且在前端返回 500 错误.

正在更新应用程序和 weblogic.xml: 首先从 WEB-INF/lib.

中删除 jsf-api.jar 和 jsf-impl.jar

weblogic.xml:

    <?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
     <wls:container-descriptor>
        <wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled>
     </wls:container-descriptor>
     <wls:library-ref>
        <wls:library-name>jsf</wls:library-name>
        <wls:specification-version>1.2</wls:specification-version>
        <wls:implementation-version>1.2.9.0</wls:implementation-version>
        <wls:exact-match>false</wls:exact-match>
     </wls:library-ref>
</wls:weblogic-web-app>

JSF Deployed to server

收到错误:

“WebAppModule(ExampleDeployment)”的未解析 Webapp 库引用,在 weblogic.xml [Extension-Name: jsf, Specification-Version: 1.2, Implementation-Version: 1.2.9.0 中定义, exact-match: 假]

TagExtraInfo class: 无法实例化此标记指定的“com.sun.faces.taglib.FacesTagExtraInfo”。

这可能是也可能不是一个独特的场景,但 weblogic.xml 仅位于我的一个 ear 文件中,其他文件中未使用。第一个错误来自带有 weblogic.xml 的耳朵,第二个错误来自没有的耳朵。我假设这是由于在我接管之前 WEB-INF/lib 中使用了 jsf jar。

感谢您的任何回复!

编辑 2/3: 在 html_basic.tld 和 jsf_core.tld 中注释掉 com.sun.faces.taglib.FacesTagExtraInfo。这消除了我收到的 com.sun.faces.taglib.FacesTagExtraInfo 错误。现在我得到:

java.lang.ClassCastException: 无法转换“显示:内联;”为属性“style”键入“javax.el.ValueExpression”

编辑 2/4:

发现即使部署了我的库,我的 J2EE 应用程序也没有在任何库下的“引用此库的应用程序”部分中弹出。

通过向每个没有它们的项目添加 weblogic.xml 并在其中添加过滤以使用项目本地库而不是服务器提供的内容,最终解决了这个问题。这可能不是最佳实践,但也是 Oracle 的建议。已经具有 weblogic.xml 的项目刚刚更新为包含过滤。

     <?xml version="1.0" encoding="UTF-8"?> 
     <wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd"> 
    
     <wls:container-descriptor> 
     <wls:prefer-application-packages> 
     <wls:package-name>javax.faces.*</wls:package-name> 
     <wls:package-name>com.sun.faces.*</wls:package-name> 
     <wls:package-name>com.bea.faces.*</wls:package-name> 
     </wls:prefer-application-packages> 
    
     <wls:prefer-application-resources> 
     <wls:resource-name>javax.faces.*</wls:resource-name> 
     <wls:resource-name>com.sun.faces.*</wls:resource-name> 
     <wls:resource-name>com.bea.faces.*</wls:resource-name> 
     <wls:resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</wls:resource-name> 
     <wls:resource-name>META-INF/services/com.sun.faces.*</wls:resource-name> 
     </wls:prefer-application-resources> 
     </wls:container-descriptor> 
     </wls:weblogic-web-app

>