Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate OutOfMemory Error

 
nayan shah
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My application is running out side from any server. It is running in single JVM. My hibernate.cfg.xml file has 170 hbm configuration file and when it is trying to load that file i am getting below error .

Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Jul 24, 2011 2:27:34 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JPA-QL strict compliance: disabled
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory createRegionFactory
INFO: Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
Jul 24, 2011 2:27:34 PM org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge <init>
INFO: Cache provider: org.hibernate.cache.NoCacheProvider
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
Jul 24, 2011 2:27:34 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Named query checking : enabled
Jul 24, 2011 2:27:34 PM org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
%%%% Error Creating HibernateSessionFactory %%%%
org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:110)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:135)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:80)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:323)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:456)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:131)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:267)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
at dao.ConnectDAO.createSessionFactory(ConnectDAO.java:157)
at dao.ConnectDAO.getInstance(ConnectDAO.java:56)
at dao.ConnectDAO.getSessionInstance(ConnectDAO.java:62)
at dao.SoExerciseTypeDAOImpl.findSoExerciseTypeCode(SoExerciseTypeDAOImpl.java:134)
at quickfix.api.equityportal.SoExerciseAdd.saveExercise(SoExerciseAdd.java:225)
at quickfix.api.equityportal.FixApplication.executionReport(FixApplication.java:421)
at quickfix.api.equityportal.FixApplication.access$4(FixApplication.java:222)
at quickfix.api.equityportal.FixApplication$MessageProcessor.run(FixApplication.java:162)
at quickfix.api.equityportal.FixApplication.fromApp(FixApplication.java:123)
at quickfix.Session.fromCallback(Session.java:1647)
at quickfix.Session.verify(Session.java:1566)
at quickfix.Session.verify(Session.java:1677)
at quickfix.Session.next(Session.java:946)
at quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:112)
at quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:75)
at quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:92)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:107)
... 25 more
Caused by: java.lang.OutOfMemoryError: PermGen space
at java.lang.Throwable.getStackTraceElement(Native Method)
at java.lang.Throwable.getOurStackTrace(Throwable.java:591)
at java.lang.Throwable.printStackTraceAsCause(Throwable.java:529)
at java.lang.Throwable.printStackTraceAsCause(Throwable.java:545)
at java.lang.Throwable.printStackTrace(Throwable.java:516)
at java.util.logging.SimpleFormatter.format(Unknown Source)
at java.util.logging.StreamHandler.publish(Unknown Source)
at java.util.logging.ConsoleHandler.publish(Unknown Source)
at java.util.logging.Logger.log(Unknown Source)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:587)
at org.slf4j.impl.JDK14LoggerAdapter.error(JDK14LoggerAdapter.java:566)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:165)
at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:66)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:188)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:151)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:78)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:107)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:135)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:80)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:323)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:456)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:131)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:267)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
at dao.ConnectDAO.createSessionFactory(ConnectDAO.java:157)
at dao.ConnectDAO.getInstance(ConnectDAO.java:56)
at dao.ConnectDAO.getSessionInstance(ConnectDAO.java:62)
org.hibernate.HibernateException: Could not initialize the Hibernate configuration
at dao.ConnectDAO.createSessionFactory(ConnectDAO.java:166)
at dao.ConnectDAO.getInstance(ConnectDAO.java:56)
at dao.ConnectDAO.getSessionInstance(ConnectDAO.java:62)
at dao.SoExerciseTypeDAOImpl.findSoExerciseTypeCode(SoExerciseTypeDAOImpl.java:134)
at quickfix.api.equityportal.SoExerciseAdd.saveExercise(SoExerciseAdd.java:225)
at quickfix.api.equityportal.FixApplication.executionReport(FixApplication.java:421)
at quickfix.api.equityportal.FixApplication.access$4(FixApplication.java:222)
at quickfix.api.equityportal.FixApplication$MessageProcessor.run(FixApplication.java:162)
at quickfix.api.equityportal.FixApplication.fromApp(FixApplication.java:123)
at quickfix.Session.fromCallback(Session.java:1647)
at quickfix.Session.verify(Session.java:1566)
at quickfix.Session.verify(Session.java:1677)
at quickfix.Session.next(Session.java:946)
at quickfix.mina.SingleThreadedEventHandlingStrategy$SessionMessageEvent.processMessage(SingleThreadedEventHandlingStrategy.java:112)
at quickfix.mina.SingleThreadedEventHandlingStrategy.block(SingleThreadedEventHandlingStrategy.java:75)
at quickfix.mina.SingleThreadedEventHandlingStrategy$1.run(SingleThreadedEventHandlingStrategy.java:92)
at java.lang.Thread.run(Unknown Source)


Please find the attached Jprofile view for that error. Please let me know what might be the issue.
memory.png
[Thumbnail for memory.png]
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might need to increase the permgen size. Please refer to URL below for details on increasing permgen size.

http://www.coderanch.com/t/90631/JBoss/java-lang-OutOfMemoryError-PermGen-space
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic