Molko
asked on
OutOfMemory Excpetion when deploying ejb.jar
Hi i have problem deploying EJB, i wonder if someone can help.
Iam using Weblogic 7 SP 1, after i have compiled and built my project, i go to
deploy it and i get the following error message !! I have tried increasing memory
allocated to EJBC to 512Mb, but this made no difference.
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
<java classname="weblogic.ejbc" fork="true" failonerror="yes">
<classpath refid="classpath"/>
<!--INCREASED MEMORY ALLOCATED HERE -->
<arg line="-J-mx512M"/>
<arg value="${build.classes}\ej b-temp.jar "/>
<arg value="${dist.dir}\ejb.jar "/>
</java>
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Below is the error message i get.
Can someone please advise as to what the
problem might be, and how i can resolve it !!!
Thanks
<25-Oct-03 13:43:28 BST> <Notice> <Application Poller> <149404> <Activate applic
ation _appsdir_molko_ear on molko_server - Running>
<25-Oct-03 13:43:30 BST> <Notice> <Application Poller> <149404> <Activate applic
ation _appsdir_molko_ear on molko_server - Running>
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError
<<no stack trace available>>
<25-Oct-03 13:43:31 BST> <Error> <EJB> <010069> <Error preparing EJB Module : ej
b.jar
Exception is :
Unable to deploy EJB: ejb.jar from ejb.jar:
Compiler failed executable.exec(java.lang. String[C:\ bea\jdk131 _03\bin\ja vac.exe,
-nowarn, -classpath, C:\bea\user_projects\molko _domain\tm p_ejbhomep c-f43w7e9r 70
01molko_server\-slhln7dvzv jt;C:\bea\ user_proje cts\molko_ domain\.\m olko_serve r\st
age\_appsdir_molko_ear\ejb .jar;C:\be a\user_pro jects\molk o_domain\. \molko_ser ver\
stage\_appsdir_molko_ear\l og4j-1_2_6 .jar;C:\be a\user_pro jects\molk o_domain\. \oas
ys_server\stage\_appsdir_m olko_ear\c ommons-log ging.jar;C :\bea\user _projects\ oasy
s_domain\.\molko_server\st age\_appsd ir_molko_e ar\ftp.jar;C:\bea\user_projects\oa
sys_domain\.\molko_server\ stage\_app sdir_molko _ear\jdom. jar;C:\bea \user_proj ects
\molko_domain\.\molko_serv er\stage\_ appsdir_mo lko_ear\co nnxjdbc.ja r;C:\bea\u ser_
projects\molko_domain\.\mo lko_server \stage\_ap psdir_molk o_ear\jaka rta-regexp -1.2
.jar;C:\bea\user_projects\ molko_doma in\.\molko _server\st age\_appsd ir_molko_e ar\l
og4j.jar;C:\bea\user_proje cts\molko_ domain\.\m olko_serve r\stage\_a ppsdir_mol ko_e
ar\log4j-core.jar;C:\bea\u ser_projec ts\molko_d omain\.\mo lko_server \stage\_ap psdi
r_molko_ear\..\lib\xerces. jar;C:\bea \user_proj ects\molko _domain\.\ molko_serv er\s
tage\_appsdir_molko_ear\xe rces.jar;C :\bea\jdk1 31_03\jre\ lib\rt.jar ;C:\bea\jd k131
_03\jre\lib\i18n.jar;C:\be a\jdk131_0 3\jre\lib\ sunrsasign .jar;C:\be a\jdk131_0 3\jr
e\classes;C:\bea\jdk131_03 \lib\tools .jar;C:\be a\weblogic 700\server \lib\weblo gic_
sp.jar;C:\bea\weblogic700\ server\lib \weblogic. jar;, -d, tmp_ejbhomepc-f43w7e9r70
01molko_server\-slhln7dvzv jt, tmp_ejbbonnar-f43w7e9r7001 molko_serv er\-slhln7 dvzv
jt\com\eds\molko\ejb\appli cation\*.j ava, tmp_ejbhomepc-f43w7e9r7001 molko_serv er\
-slhln7dvzvjt\com\eds\molk o\ejb\pers istence\*. java])
at weblogic.ejb20.ejbc.EJBCom piler.doCo mpile(EJBC ompiler.ja va:301)
at weblogic.ejb20.ejbc.EJBCom piler.comp ileEJB(EJB Compiler.j ava:396)
at weblogic.ejb20.deployer.EJ BDeployer. runEJBC(EJ BDeployer. java:490)
at weblogic.ejb20.deployer.EJ BDeployer. compileEJB (EJBDeploy er.java:79 3)
at weblogic.ejb20.deployer.EJ BDeployer. prepare(EJ BDeployer. java:1242)
at weblogic.ejb20.deployer.EJ BModule.pr epare(EJBM odule.java :242)
at weblogic.j2ee.J2EEApplicat ionContain er.prepare Module(J2E EApplicati onC
ontainer.java:1504)
at weblogic.j2ee.J2EEApplicat ionContain er.prepare (J2EEAppli cationCont ain
er.java:690)
at weblogic.j2ee.J2EEApplicat ionContain er.prepare (J2EEAppli cationCont ain
er.java:576)
at weblogic.management.deploy .slave.Sla veDeployer .processPr epareTask( Sla
veDeployer.java:1064)
at weblogic.management.deploy .slave.Sla veDeployer .prepareUp date(Slave Dep
loyer.java:732)
at weblogic.drs.internal.Slav eCallbackH andler$1.e xecute(Sla veCallback Han
dler.java:24)
at weblogic.kernel.ExecuteThr ead.execut e(ExecuteT hread.java :153)
at weblogic.kernel.ExecuteThr ead.run(Ex ecuteThrea d.java:134 )
Iam using Weblogic 7 SP 1, after i have compiled and built my project, i go to
deploy it and i get the following error message !! I have tried increasing memory
allocated to EJBC to 512Mb, but this made no difference.
--------------------------
<java classname="weblogic.ejbc" fork="true" failonerror="yes">
<classpath refid="classpath"/>
<!--INCREASED MEMORY ALLOCATED HERE -->
<arg line="-J-mx512M"/>
<arg value="${build.classes}\ej
<arg value="${dist.dir}\ejb.jar
</java>
--------------------------
Below is the error message i get.
Can someone please advise as to what the
problem might be, and how i can resolve it !!!
Thanks
<25-Oct-03 13:43:28 BST> <Notice> <Application Poller> <149404> <Activate applic
ation _appsdir_molko_ear on molko_server - Running>
<25-Oct-03 13:43:30 BST> <Notice> <Application Poller> <149404> <Activate applic
ation _appsdir_molko_ear on molko_server - Running>
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError
<<no stack trace available>>
<25-Oct-03 13:43:31 BST> <Error> <EJB> <010069> <Error preparing EJB Module : ej
b.jar
Exception is :
Unable to deploy EJB: ejb.jar from ejb.jar:
Compiler failed executable.exec(java.lang.
-nowarn, -classpath, C:\bea\user_projects\molko
01molko_server\-slhln7dvzv
age\_appsdir_molko_ear\ejb
stage\_appsdir_molko_ear\l
ys_server\stage\_appsdir_m
s_domain\.\molko_server\st
sys_domain\.\molko_server\
\molko_domain\.\molko_serv
projects\molko_domain\.\mo
.jar;C:\bea\user_projects\
og4j.jar;C:\bea\user_proje
ar\log4j-core.jar;C:\bea\u
r_molko_ear\..\lib\xerces.
tage\_appsdir_molko_ear\xe
_03\jre\lib\i18n.jar;C:\be
e\classes;C:\bea\jdk131_03
sp.jar;C:\bea\weblogic700\
01molko_server\-slhln7dvzv
jt\com\eds\molko\ejb\appli
-slhln7dvzvjt\com\eds\molk
at weblogic.ejb20.ejbc.EJBCom
at weblogic.ejb20.ejbc.EJBCom
at weblogic.ejb20.deployer.EJ
at weblogic.ejb20.deployer.EJ
at weblogic.ejb20.deployer.EJ
at weblogic.ejb20.deployer.EJ
at weblogic.j2ee.J2EEApplicat
ontainer.java:1504)
at weblogic.j2ee.J2EEApplicat
er.java:690)
at weblogic.j2ee.J2EEApplicat
er.java:576)
at weblogic.management.deploy
veDeployer.java:1064)
at weblogic.management.deploy
loyer.java:732)
at weblogic.drs.internal.Slav
dler.java:24)
at weblogic.kernel.ExecuteThr
at weblogic.kernel.ExecuteThr
Here is what BEA says about this:
Due to a Sun bug, a java lang.OutOfMemory error my occur when starting WebLogic Server if the number of classes being loaded is too high.
As a workaround, increase the value of the JVM option -XXMaxPermSize when initializing WebLogic Server, using this syntax:
java -XX:MaxPermSize=<value>K
where <value> is some number of kilobytes. The JVM uses a default maximum value of 32 MB.
This problem has been reported to Sun.
Hope this helps you
Due to a Sun bug, a java lang.OutOfMemory error my occur when starting WebLogic Server if the number of classes being loaded is too high.
As a workaround, increase the value of the JVM option -XXMaxPermSize when initializing WebLogic Server, using this syntax:
java -XX:MaxPermSize=<value>K
where <value> is some number of kilobytes. The JVM uses a default maximum value of 32 MB.
This problem has been reported to Sun.
Hope this helps you
ASKER
Its ok now, i found out the problem, i was packing a up a different version of the weblogi.jar (i had two different versions)..
its ok now
its ok now
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<arg line="-J-mx512M"/>
then try to compile.... it will take default memory