-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: OutOfMemoryError on delpoy with 1975 tables
PostPosted: Mon Jun 06, 2005 9:37 am 
Beginner
Beginner

Joined: Mon Jun 21, 2004 2:41 pm
Posts: 40
Hibernate version: 2.1.8

Mapping documents: 1975 tables mapped

Full stack trace of any exception that occurs:
Code:
09:21:39,182 INFO  [Configuration] Mapping resource: mappings/Sqa.hbm.xml
09:21:39,195 INFO  [Binder] Mapping class: com.relevant.util.dao.Sqa -> sqa
09:21:41,923 WARN  [ServiceController] Problem starting service jboss.jca:service=SessionFactory,                             name=SessionFactory
java.lang.OutOfMemoryError: PermGen space
09:21:42,008 INFO  [EJBDeployer] Deployed: file:/usr/local/export/dev/j2ee/jboss-4.0.1/server/dwilson/tmp/deploy/tmp56295E3.ear-contents/E3ejb.jar
09:21:42,078 INFO  [EARDeployer] Started J2EE application: file:/usr/local/export/dev/j2ee/jboss-4.0.1/server/dwilson/deploy/E3.ear
09:21:42,080 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
MBeans waiting for other MBeans:
ObjectName: jboss.jca:service=SessionFactory,                             name=SessionFactory
state: FAILED
I Depend On:  jboss.jca:service=RARDeployer
jboss.jca:service=LocalTxCM,name=MSSQLDS

Depends On Me: java.lang.OutOfMemoryError: PermGen space

MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
ObjectName: jboss.jca:service=SessionFactory,                             name=SessionFactory
state: FAILED
I Depend On:  jboss.jca:service=RARDeployer
jboss.jca:service=LocalTxCM,name=MSSQLDS

Depends On Me: java.lang.OutOfMemoryError: PermGen space

09:21:42,263 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8180
09:21:44,614 INFO  [Server] JBoss (MX MicroKernel) [4.0.1 (build: CVSTag=JBoss_4_0_1 date=200412230944)] Started in 1m:32s:408ms
09:21:46,884 ERROR [ThreadPool] Caught exception (java.lang.NoClassDefFoundError: org/apache/tomcat/util/buf/UDecoder) executing org.apache.tomcat.util.net.TcpWorkerThread@14bf56d, terminating thread


Debug level Hibernate log excerpt:
Code:
09:21:39,182 WARN  [CustomType] custom type does not implement Serializable: class com.relevant.util.hibernate.IntType
09:21:39,182 DEBUG [Binder] Mapped property: spw_wbsmaxlvlchar -> spw_wbsmaxlvlchar, type: com.relevant.util.hibernate.IntType
09:21:39,182 INFO  [Configuration] Mapping resource: mappings/Sqa.hbm.xml
09:21:39,185 DEBUG [DTDEntityResolver] trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/
09:21:39,185 DEBUG [DTDEntityResolver] found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath
09:21:39,195 INFO  [Binder] Mapping class: com.relevant.util.dao.Sqa -> sqa
09:21:39,195 DEBUG [Binder] Mapped property: sqa_cmpno -> sqa_cmpno, type: integer
09:21:39,195 DEBUG [Binder] Mapped property: sqa_srno -> sqa_srno, type: integer
09:21:39,195 DEBUG [Binder] Mapped property: sqa_seqno -> sqa_seqno, type: integer
09:21:41,939 DEBUG [StatefulSessionContainer] Begin java:comp/env for EJB: BCSessionBean
09:21:41,939 DEBUG [StatefulSessionContainer] TCL: org.jboss.util.loading.DelegatingClassLoader@147bc1
09:21:41,939 DEBUG [StatefulSessionContainer] Unable to retrieve orbjavax.management.InstanceNotFoundException: jboss:service=CorbaORB is not registered.
09:21:41,943 DEBUG [StatefulSessionContainer] Binding securityDomain: java:/jaas/E3Realm to JDNI ENC as: security/security-domain
09:21:41,944 DEBUG [StatefulSessionContainer] End java:comp/env for EJB: BCSessionBean
09:21:41,960 DEBUG [BaseLocalProxyFactory] Bound EJBLocalHome of BCSessionBean to BCSessionLocal
09:21:41,972 DEBUG [ProxyFactory] (re-)Binding Home BCSessionRemote
09:21:42,005 DEBUG [ProxyFactory] Bound BCSessionBean to BCSessionRemote
09:21:42,007 DEBUG [ServiceController] starting service jboss.j2ee:service=EJB,plugin=pool,jndiName=BCSessionRemote
09:21:42,007 DEBUG [StatefulSessionInstancePool] Starting jboss.j2ee:service=EJB,plugin=pool,jndiName=BCSessionRemote
09:21:42,008 DEBUG [StatefulSessionInstancePool] Started jboss.j2ee:service=EJB,plugin=pool,jndiName=BCSessionRemote
09:21:42,008 DEBUG [ServiceController] Starting dependent components for: jboss.j2ee:service=EJB,plugin=pool,jndiName=BCSessionRemote dependent components: []
09:21:42,008 DEBUG [StatefulSessionFilePersistenceManager] Starting StatefulSessionFilePersistenceManager
09:21:42,008 DEBUG [StatefulSessionFilePersistenceManager] Started StatefulSessionFilePersistenceManager
09:21:42,008 DEBUG [CachedConnectionInterceptor] start called in CachedConnectionInterceptor


Here is the setting that I am starting up the JBoss server with
Code:
JBoss JAVA_OPTS="-server -Xms512m -Xmx1024m -Dcom.sun.management.jmxremote -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n -Dprogram.name=$PROGNAME"


Changing the Xmx size from 512 to 1024m had no change on where I got the permGen error. Using the jconsole I was able to see that JBoss was able to get around 67 Meg before getting the error.

What settings can I change to get around my problem?

Thank you,
David


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 06, 2005 10:50 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
-XX:PermSize=128m -XX:MaxPermSize=128m


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 13, 2005 8:42 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 2:41 pm
Posts: 40
That did the trick except for when I redeploy the system. When I redeploy the Perm memory is not getting released or recycled.

Instead it just grows.

Does the SessionFactory need to be closed or release when the ejbRemove() method is called? A reference to SessionFactoryis opened using JDNI inside my stateful session bean.

Thank you,
David


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 14, 2005 2:43 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Register context listener to close factory, probably it will help, but it can take time to find right locations for jars to avoid classloader leak.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 14, 2005 9:55 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 2:41 pm
Posts: 40
I am sorry. I did not follow that. How do you register a listener on the context?

I looked at the context methods and at the session factory's methods but I don't see any methods that are to be used to add a listener.

Is there a Wiki for this or is this in the Hibernate API doc?

Thank you again,
David


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 14, 2005 11:19 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
It is from servlets API.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.