尝试在Win XP 32位操作系统(4GB)计算机上的OC4J 10.1.3上部署War文件时,我得到OutOfMemoryError。在Sun Solaris上使用相同的OC4J 10.1.3配置正确部署war文件。
我确实尝试了以下链接中提供的建议:
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
真的很感激任何建议。
谢谢
答案 0 :(得分:0)
java.lang.OutOfMemoryError
通常表示您尝试运行的程序需要的RAM多于分配给它的RAM。尝试将XX:MaxPermSize=128M
扩展为类似XX:MaxPermSize=1G
之类的内容,看看它是否有帮助。