weblogic10.3 JSF2 built in jars

时光毁灭记忆、已成空白 提交于 2019-12-02 12:07:47

问题


In our application ,we are using JSF2 with weblogin10.3.4,

The weblogic10.3.4 comes with JSF 2.0 ..We deployed JSF2.0 as library in weblogic.

But when we deploy the jsf application,weblogic reports the ClassNotFound for JSF specific classes.

Any one has tried this before...

Thanks Vijay


回答1:


Create a weblogic-application.xml like below. This forces to load classes under application library instead of weblogic jars.

WebContent->META-INF->weblogic-application.xml

<weblogic-application xmlns="http://www.bea.com/ns/weblogic/90"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <prefer-application-packages>
        <package-name>javax.faces.*</package-name>
        <package-name>com.sun.faces.*</package-name>
    </prefer-application-packages>
</weblogic-application>

And if you want to use EL2.2 you will need to add el 2.2 jars to setDomainEnv file where it is located at "bea11\user_projects\domains\base_domain\bin"

Add the following line:

set PATCH_CLASSPATH=D:\dev\lib\el-impl-2.2.jar;D:\dev\lib\el-api-2.2.jar;

edited file looks like below:

if "%PRODUCTION_MODE%"=="true" (
    set debugFlag=false
    set testConsoleFlag=false
    set iterativeDevFlag=false
    set logErrorsToConsoleFlag=false
)

    @REM If you want to override the default Patch Classpath, Library Path and Path for this domain,
    @REM Please uncomment the following lines and add a valid value for the environment variables
    @REM set PATCH_CLASSPATH=[myPatchClasspath] (windows)
    @REM set PATCH_LIBPATH=[myPatchLibpath] (windows)
    @REM set PATCH_PATH=[myPatchPath] (windows)
    @REM PATCH_CLASSPATH=[myPatchClasspath] (unix)
    @REM PATCH_LIBPATH=[myPatchLibpath] (unix)
    @REM PATCH_PATH=[myPatchPath] (unix)

    set PATCH_CLASSPATH=D:\dev\lib\el-impl-2.2.jar;D:\dev\lib\el-api-2.2.jar;

    call "%WL_HOME%\common\bin\commEnv.cmd"

    set WLS_HOME=%WL_HOME%\server

Good luck




回答2:


Adding the below in web-inf/weblogic.xml solves the issue

<wls:weblogic-version>10.3.4</wls:weblogic-version>

    <wls:context-root>/</wls:context-root>

<wls:library-ref>
    <wls:library-name>jsf</wls:library-name>
<wls:specification-version>2.0</wls:specification-version>
<wls:implementation-version>1.0.0.0_2-0-2</wls:implementation-version>
    <wls:exact-match>true</wls:exact-match>
    </wls:library-ref>   


来源:https://stackoverflow.com/questions/8884906/weblogic10-3-jsf2-built-in-jars

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!