jeesite部署到weblogic12.1.3問題解決紀要

********************問題1*****************************
問題描述:
  <2017-10-31 10?5540 CST> <Error> <HTTP> <BEA-101104> <Servlet execution in servlet context "ServletContext@512841600[app:nafmiiSIS module:nafmiiSIS.war path:null spec-version:3.0]" failed, java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '16855' bytes instead of stated: '17481' bytes..
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '16855' bytes instead of stated: '17481' bytes.
        at weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:481)
        at weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1549)
        at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1623)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1582)
        at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
        Truncated. see log file for complete stacktrace
>
問題解釋:引發此問題的根本原因在於jeesite返回的頁面亂碼所致

第一種解決辦法:修改執行文件 setDomainEnv.cmd 參考路徑(D:\IDETools\Oracle_WebLogic\user_projects\domains\base_domain\bin\setDomainEnv.cmd)
		修改前(在369行處):set JAVA_OPTIONS=%JAVA_OPTIONS% 
		修改後:set JAVA_OPTIONS=%JAVA_OPTIONS%-Dfile.encoding=utf-8 
		
第二種解決辦法:修改執行文件 setDomainEnv.cmd 參考路徑(D:\IDETools\Oracle_WebLogic\user_projects\domains\base_domain\bin\setDomainEnv.cmd)
		修改前(在268-273間的270行):
		if "%ADMIN_URL%"=="" (
			@REM The then part of this block is telling us we are either starting an admin server OR we are non-clustered
			set CLUSTER_PROPERTIES=
		) else (
			set CLUSTER_PROPERTIES=-Dweblogic.management.server=%ADMIN_URL%
		)
		修改後:
		if "%ADMIN_URL%"=="" (
			@REM The then part of this block is telling us we are either starting an admin server OR we are non-clustered
			set CLUSTER_PROPERTIES=-Dfile.encoding=utf-8
		) else (
			set CLUSTER_PROPERTIES=-Dweblogic.management.server=%ADMIN_URL%
		)
總結: 其實都是修改文件的字符編碼 -Dfile.encoding=utf-8

********************問題2*****************************
問題描述: cmd 控制檯窗口亂碼
	le_WebLogic\wlserver\server   -Dfile.encoding=utf-8   weblogic.Server
<2017-10-31 涓婂崍11鏃?3鍒?4縐?CST> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.>
<2017-10-31 涓婂崍11鏃?3鍒?4縐?CST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.>
<2017-10-31 涓婂崍11鏃?3鍒?4縐?CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 23.7-b01 from Oracle Corporation.>
<2017-10-31 涓婂崍11鏃?3鍒?5縐?CST> <Info> <Management> <BEA-141297> <Could not get the server file lock. Ensure that an

問題解釋: cmd命令窗口默認GBK編碼,與問題1修改處衝突。
解決辦法: 打開startWebLogic.cmd(參考問題1中目錄) 在文件最頂部加上 chcp 65001 設置窗口編碼爲UTF-8


********************問題3*****************************
問題描述:eclipse 控制檯亂碼
解決辦法:eclipse 菜單欄Run - Run Configurations - 選中Oracle WebLogic Server實例 - Common - Encoding 選擇UTF-8


	

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章