在Win XP 32位操作系統(4GB)機器上嘗試在OC4J 10.1.3上部署War文件時,出現OutOfMemoryError。 Sun Solaris上OC4J 10.1.3的配置相同,war文件得到正確部署。OC4J 10.1.3 java.lang.OutOfMemoryError:PermGen空間
我沒試過提供下面的鏈接推薦:
https://community.oracle.com/thread/616067
但是沒能解決問題。請問有人可以就此問題提供更多建議嗎?
的oc4j_opmn.xml是這樣的:
<ias-component id="OC4J">
<process-type id="home" module-id="OC4J" status="enabled">
<module-data>
<category id="start-parameters">
<data id="java-options" value="-server -XX:MaxPermSize=128M -ms512M -mx1024M -XX:AppendRatio=3 -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
</category>
<category id="stop-parameters">
<data id="java-options" value="-Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
</category>
</module-data>
<start timeout="600" retry="2"/>
<stop timeout="120"/>
<restart timeout="720" retry="2"/>
<port id="default-web-site" range="12501-12600" protocol="ajp"/>
<port id="rmi" range="12401-12500"/>
<port id="jms" range="12601-12700"/>
<process-set id="default_group" numprocs="1"/>
</process-type>
</ias-component>
Web控制檯部署日誌:
[Feb 23, 2015 5:52:32 PM] Application Deployer for xxx STARTS.
[Feb 23, 2015 5:52:32 PM] Copy the archive to D:\product\10.1.3\OracleAS_2\j2ee\home\applications\xxx.ear
[Feb 23, 2015 5:52:32 PM] Initialize D:\product\10.1.3\OracleAS_2\j2ee\home\applications\xxx.ear begins...
[Feb 23, 2015 5:52:32 PM] Unpacking xxx.ear
[Feb 23, 2015 5:52:32 PM] Done unpacking xxx.ear
[Feb 23, 2015 5:52:32 PM] Unpacking xxx.war
[Feb 23, 2015 5:52:33 PM] Done unpacking xxx.war
[Feb 23, 2015 5:52:33 PM] Initialize D:\product\10.1.3\OracleAS_2\j2ee\home\applications\xxx.ear ends...
[Feb 23, 2015 5:52:33 PM] Starting application : xxx
[Feb 23, 2015 5:52:33 PM] Initializing ClassLoader(s)
[Feb 23, 2015 5:52:33 PM] Initializing EJB container
[Feb 23, 2015 5:52:33 PM] Loading connector(s)
[Feb 23, 2015 5:52:33 PM] Starting up resource adapters
[Feb 23, 2015 5:52:33 PM] Initializing EJB sessions
[Feb 23, 2015 5:52:33 PM] Committing ClassLoader(s)
[Feb 23, 2015 5:52:33 PM] Initialize xxx begins...
[Feb 23, 2015 5:52:33 PM] Initialize xxx ends...
[Feb 23, 2015 5:52:33 PM] Started application : xxx
[Feb 23, 2015 5:52:33 PM] Binding web application(s) to site default-web-site begins...
[Feb 23, 2015 5:52:33 PM] Binding xxx web-module for application xxx to site default-web-site under context root xxx
錯誤日誌:
15/02/23 15:14:23.817 10.1.3.0.0 Started
15/02/23 15:14:28.98 ascontrol: 10.1.3.0.0 Started
15/02/23 15:19:56.511 ascontrol: Servlet error
java.lang.OutOfMemoryError: PermGen space
15/02/23 15:21:59.982 10.1.3.0.0 Started
15/02/23 15:22:03.341 ascontrol: 10.1.3.0.0 Started
15/02/23 15:41:55.911 ascontrol: 10.1.3.0.0 Stopped
15/02/23 15:42:05.755 10.1.3.0.0 Started
15/02/23 15:42:09.255 ascontrol: 10.1.3.0.0 Started
15/02/23 15:44:42.461 ascontrol: Servlet error
java.lang.OutOfMemoryError: PermGen space
15/02/23 15:44:51.602 ascontrol: Servlet error
java.lang.OutOfMemoryError: PermGen space
15/02/23 16:29:16.453 10.1.3.0.0 Started
15/02/23 16:29:20.749 ascontrol: 10.1.3.0.0 Started
15/02/23 17:51:01.600 ascontrol: 10.1.3.0.0 Stopped
15/02/23 17:51:08.679 10.1.3.0.0 Started
15/02/23 17:51:12.101 ascontrol: 10.1.3.0.0 Started
15/02/23 17:53:11.978 ascontrol: Servlet error
15/02/23 17:53:12.962 ascontrol: Servlet error
15/02/23 17:53:24.166 ascontrol: Servlet error
java.lang.OutOfMemoryError: PermGen space
真的很感激任何形式的建議。
謝謝
那麼,32位Windows機器上的1GB可能還不夠。您在要部署的Web容器上添加或更改哪些參數?如果您修改了JAVA_OPTS,那麼您之後是否重新啓動了容器?有關更多信息,請啓動jconsole並將其瞄準oc4j進程 - 提供所用內存的很好視圖。 – chrisinmtown 2015-02-24 03:05:00
這是較早的java啓動參數: 修飾是添加內存參數: <類別ID =」 啓動參數「> < data id =「java-options」value =「 - server -XX:MaxPermSize = 128M -ms512M -mx1024M -XX:AppendRatio = 3 -Djava.security.policy = $ ORACLE_HOME/j2ee/home/config/java2.policy -Djava .awt.headless = true -Dhttp.webdir.enable = false「/> –
Kannan
2015-02-24 17:12:17
是的,我做了兩次改變後重新啓動。 – Kannan 2015-02-24 17:15:28