Discussion:
[Middlegen-user] error java.lang.OutOfMemoryError for Running weblogic.ejbc
qiang
2003-06-11 00:35:07 UTC
Permalink
Hi guys,
I'm trying to use middlegen to generate my ejb jar.My database is sqlserver,Application
server is weblogic7. Database has 42 tables. It's all right for generating entity bean,
generating interface, generating ejb jar.But at last when running weblogic.ejbc ,
It runs for some time and then throws a java.lang.OutOfMemoryError.
My computer's CPU is Pentium IV 2.4G,Memmery is 256M.I increase the JVM heap,
and it just takes longer.Show same error.


----------------------------------------------
Óµ±§ÀËÂþ£¬³¢ÊÔŒ€Ç飬ŒÓÈë¿¡ÄÐÃÀÅ®µÄŒ€Ç霻ÓÑÀÖÔ°
http://y.21cn.com
È«Çò»ªÓïÁåÉùÁ÷Ðаñ
http://sms.21cn.com/ring
¹ºÂòÓÊÏ䣬¶ÌÐÅ¡¢ÓÎÏ·¡¢¿íŽøµçÓ°Ãâ·ÑÏí
http://mail.21cn.com/huodong/0304/wlxs
ÃÜÂë±£»€Æ÷£¬ÁîÓÊÏäžü°²È«
http://mail.21cn.com/bijiao/15.html
Eivind Waaler
2003-06-11 04:36:06 UTC
Permalink
Hi, I've had that same problem with a database with around 100
tables. There are two different things I've tried, that at least got the
process a bit further (before I switched to JBoss - no problems of
course..!):

1. Allocate more memory to ant:

set ANT_OPTS=3D-mx640m

2. Try splitting the build in several tasks (call tasks one by one, you
might have to add the ejbdoclet.skip property in build.xml):

ant middlegen
ant -Dmiddlegen.skip=3Dtrue ejbdoclet
ant -Dmiddlegen.skip=3Dtrue -Dejbdoclet.skip=3Dtrue ear

Seems to me this is really a problem with ejbc not handling large number
of beans. You might want to check with bea about it. Let us know if you
figure out.

=2Eeivind
Post by qiang
Hi guys,
I'm trying to use middlegen to generate my ejb jar.My database is sqlse=
rver,Application=20
Post by qiang
server is weblogic7. Database has 42 tables. It's all right for generat=
ing entity bean,=20
Post by qiang
generating interface, generating ejb jar.But at last when running weblo=
gic.ejbc ,
Post by qiang
It runs for some time and then throws a java.lang.OutOfMemoryError.=20
My computer's CPU is Pentium IV 2.4G,Memmery is 256M.I increase the JV=
M heap,=20
Post by qiang
and it just takes longer.Show same error.
=20
=20
----------------------------------------------
=D3=B5=B1=A7=C0=CB=C2=FE=A3=AC=B3=A2=CA=D4=BC=A4=C7=E9=A3=AC=BC=D3=C8=EB=
=BF=A1=C4=D0=C3=C0=C5=AE=B5=C4=BC=A4=C7=E9=BD=BB=D3=D1=C0=D6=D4=B0=20
Post by qiang
http://y.21cn.com=20
=C8=AB=C7=F2=BB=AA=D3=EF=C1=E5=C9=F9=C1=F7=D0=D0=B0=F1=20
http://sms.21cn.com/ring=20
=B9=BA=C2=F2=D3=CA=CF=E4=A3=AC=B6=CC=D0=C5=A1=A2=D3=CE=CF=B7=A1=A2=BF=ED=
=B4=F8=B5=E7=D3=B0=C3=E2=B7=D1=CF=ED=20
Post by qiang
http://mail.21cn.com/huodong/0304/wlxs=20
=C3=DC=C2=EB=B1=A3=BB=A4=C6=F7=A3=AC=C1=EE=D3=CA=CF=E4=B8=FC=B0=B2=C8=AB=
=20
Post by qiang
http://mail.21cn.com/bijiao/15.html=20
=20
=20
=20
=20
=20
=20
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
=20
qiang
2003-06-11 23:48:04 UTC
Permalink
Thank you for your reply.

I try to use your sulution,But it doesn't work.Show same error. Now,I use weblogic.ejbc to resolve this problem directly.It's ok. First add weblogic.jar to classpath ,My command is "java weblogic.ejbc -J-mx640m standard-ecredit-ejb.jar ecredit-ejb.jar".I feel these two sulutions are similar.But result is diffrent.Could you give me some details of your sulution.
----------------------------------------------
Óµ±§ÀËÂþ£¬³¢ÊÔŒ€Ç飬ŒÓÈë¿¡ÄÐÃÀÅ®µÄŒ€Ç霻ÓÑÀÖÔ°
http://y.21cn.com
È«Çò»ªÓïÁåÉùÁ÷Ðаñ
http://sms.21cn.com/ring
¹ºÂòÓÊÏ䣬¶ÌÐÅ¡¢ÓÎÏ·¡¢¿íŽøµçÓ°Ãâ·ÑÏí
http://mail.21cn.com/huodong/0304/wlxs
ÃÜÂë±£»€Æ÷£¬ÁîÓÊÏäžü°²È«
http://mail.21cn.com/bijiao/15.html
Eivind Waaler
2003-06-12 06:02:01 UTC
Permalink
I don't really have a working solution for this. I've switched to JBoss
which verifies and deploys the beans in a fraction of the time Weblogic
uses :-)

Check with BEA why you get that error. Seems to be a common problem:
http://tinyurl.com/e4fh

Regards
=2Eeivind
Post by qiang
Thank you for your reply.
=20
I try to use your sulution,But it doesn't work.Show same error. Now,I use=
weblogic.ejbc to resolve this problem directly.It's ok. First add weblogic=
=2Ejar to classpath ,My command is "java weblogic.ejbc -J-mx640m standard-e=
credit-ejb.jar ecredit-ejb.jar".I feel these two sulutions are similar.But =
result is diffrent.Could you give me some details of your sulution.
Post by qiang
----------------------------------------------
=D3=B5=B1=A7=C0=CB=C2=FE=A3=AC=B3=A2=CA=D4=BC=A4=C7=E9=A3=AC=BC=D3=C8=EB=
=BF=A1=C4=D0=C3=C0=C5=AE=B5=C4=BC=A4=C7=E9=BD=BB=D3=D1=C0=D6=D4=B0=20
Post by qiang
http://y.21cn.com=20
=C8=AB=C7=F2=BB=AA=D3=EF=C1=E5=C9=F9=C1=F7=D0=D0=B0=F1=20
http://sms.21cn.com/ring=20
=B9=BA=C2=F2=D3=CA=CF=E4=A3=AC=B6=CC=D0=C5=A1=A2=D3=CE=CF=B7=A1=A2=BF=ED=
=B4=F8=B5=E7=D3=B0=C3=E2=B7=D1=CF=ED=20
Post by qiang
http://mail.21cn.com/huodong/0304/wlxs=20
=C3=DC=C2=EB=B1=A3=BB=A4=C6=F7=A3=AC=C1=EE=D3=CA=CF=E4=B8=FC=B0=B2=C8=AB=
=20
Post by qiang
http://mail.21cn.com/bijiao/15.html=20
=20
=20
=20
=20
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
=20
Frank Morjan
2003-09-01 13:20:07 UTC
Permalink
Hi !
Post by qiang
I'm trying to use middlegen to generate my ejb jar.My database is sqlserver,Application
server is weblogic7. Database has 42 tables. It's all right for generating entity bean,
generating interface, generating ejb jar.But at last when running weblogic.ejbc ,
It runs for some time and then throws a java.lang.OutOfMemoryError.
My computer's CPU is Pentium IV 2.4G,Memmery is 256M.I increase the JVM heap,
and it just takes longer.Show same error.
the problem is the ant task in config/ejb/weblogic.xml
You must add the parameter "maxmemory" to the call of "java":

<java
classname="weblogic.ejbc"
fork="yes"
failonerror="true"
classpath="${weblogic.jar};${env.JAVA_HOME}/lib/tools.jar"
maxmemory="256m"
I hope this helps,

Frank
Eivind Waaler
2003-09-02 05:48:12 UTC
Permalink
Great! I've been having this same problem too when operating on a large
set of tables..

.eivind
Post by qiang
Hi !
Post by qiang
I'm trying to use middlegen to generate my ejb jar.My database is
sqlserver,Application
Post by qiang
server is weblogic7. Database has 42 tables. It's all right for
generating entity bean,
Post by qiang
generating interface, generating ejb jar.But at last when running
weblogic.ejbc ,
Post by qiang
It runs for some time and then throws a java.lang.OutOfMemoryError.
My computer's CPU is Pentium IV 2.4G,Memmery is 256M.I increase the JVM
heap,
Post by qiang
and it just takes longer.Show same error.
the problem is the ant task in config/ejb/weblogic.xml
<java
classname="weblogic.ejbc"
fork="yes"
failonerror="true"
classpath="${weblogic.jar};${env.JAVA_HOME}/lib/tools.jar"
maxmemory="256m"
I hope this helps,
Frank
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...