File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Hibernate issue while loading config file - Caused by: java.lang.OutOfMemoryError: PermGen space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply locked New topic
Author

Hibernate issue while loading config file - Caused by: java.lang.OutOfMemoryError: PermGen space

Duke Thomas
Greenhorn

Joined: Jul 24, 2011
Posts: 1
Hi guys,

Can you just take a look at this OutOfMemoryError while trying to load Hibernate config files ? This program run in separate Java program instead of Tomcat server where war is deployed. If any one faced this issue before can you please recommend me a quick fix ? Enclosing JProfiler screen shot.

~ Duke

MESSAGE RECEIVED:||||||||||||||||||||||| 3333
MESSAGE RECEIVED:|||||||||||||||||||||||
TRANSACTIONTYPE:||||||||||||||||||||||| D
<20110724-17:50:22, FIX.4.2:WCFIX->OMEX, outgoing> (8=FIX.4.2☺9=142☺35=D☺34=530☺49=WCFIX☺52=20110724-17:50:22.282☺56=OMEX☺11=ICMFX-



201107240002☺21=1☺38=10☺40=1☺54=5☺55=ZVZZT☺59=0☺60=20110724-17:50:22.279☺114=N☺10=1
<20110724-17:50:22, FIX.4.2:WCFIX->OMEX, incoming> (8=FIX.4.2☺9=214☺35=8☺49=OMEX☺56=WCFIX☺34=1026☺52=20110724-17:50:37☺1=ICMC_WCFIX☺37=200030☺11=ICMFX-201107240002☺17=0200030164438275☺20=0☺39=0☺150=0☺151=10☺55=ZVZZ
Jul 24, 2011 1:50:22 PM quickfix.api.equityportal.FixApplication send
INFO: Message sent successfully
ORDER SENT:||||||||||||||||||||||| quickfix.api.equityportal.Order@41a7c484
Order SENT Status:trueJul 24, 2011 1:50:22 PM quickfix.api.equityportal.SendingMessage run
INFO: Message sent successfully
HIIIIIIIIIIIIIIIIIII
IAM HERE......
IM INSIDE...
IAM INSIDE ER...
message :::::: 8=FIX.4.2☺9=214☺35=8☺34=1026☺49=OMEX☺52=20110724-17:50:37☺56=WCFIX☺1=ICMC_WCFIX☺6=0☺11=ICMFX-201107240002☺14=0☺17=0200030164438275☺20=0☺31=0☺32=0☺37=200030☺38=10☺39=0☺40=1☺47=A☺54=5☺55=ZVZZT☺59=0☺60=
OrdStatus :::::: 0
OrdTag :::::: 39
OrdField :::::: 39
ordStatus :::::: 39=0
Order NEW .............
ID :::::::: ICMFX-201107240002
Symbol ZVZZT
Hi Im here 1
companyTickerSymbol :+++ ZVZZT

ConnStr=jdbc:mysql://<<snip>>
Connection available: jdbc:mysql://<<snip>>
dbConnectionDetails :+++ jdbc:mysql://<<snip>>
CONNECTED::::::::::::::::::
Current time before connecting to the database...Sun Jul 24 13:50:23 EDT 2011
get wc_order_details...
ORDER DETAILS FOUND...........................
Current time after disconnect the database...Sun Jul 24 13:50:23 EDT 2011
Current time before connecting to the database...Sun Jul 24 13:50:23 EDT 2011
get wc_order_status...
ORDER STATUS FOUND================
Current time after disconnect the database...Sun Jul 24 13:50:23 EDT 2011
Hi Im here 2
wcOrderStatus = quickfix.api.equityportal.WcOrderStatus@78d23e53
wcOrderDetails = quickfix.api.equityportal.WcOrderDetails@32f9f91d
Hi Im here 3
Hi Im here 4
Hi Im here 7
Company Ticker: ZVZZT
Current time before connecting to the database...Sun Jul 24 13:50:23 EDT 2011
I am here to insert wc_order_status...
MAX ORDER STATUS ID ::::::: 825
Current time after disconnect the database...Sun Jul 24 13:50:23 EDT 2011
Hi Im here 13
flagInsertExercise:false
<20110724-17:50:24, FIX.4.2:WCFIX->OMEX, incoming> (8=FIX.4.2☺9=245☺35=8☺49=OMEX☺56=WCFIX☺34=1027☺52=20110724-17:50:38☺1=ICMC_WCFIX☺37=200030☺11=ICMFX-201107240002☺17=02000303597151535☺20=0☺39=2☺150=2☺151=0☺55=ZVZZ
HIIIIIIIIIIIIIIIIIII
IAM HERE......
IM INSIDE...
IAM INSIDE ER...
message :::::: 8=FIX.4.2☺9=245☺35=8☺34=1027☺49=OMEX☺52=20110724-17:50:38☺56=WCFIX☺1=ICMC_WCFIX☺6=10.4192☺11=ICMFX-201107240002☺14=10☺17=02000303597151535☺20=0☺31=10.4192☺32=10☺37=200030☺38=10☺39=2☺40=1☺47=A☺54=5☺55
OrdStatus :::::: 2
OrdTag :::::: 39
OrdField :::::: 39
ordStatus :::::: 39=2
Order FILLED .............
ID :::::::: ICMFX-201107240002
Symbol ZVZZT
Hi Im here 1
companyTickerSymbol :+++ ZVZZT

ConnStr=jdbc:mysql://<<snip>>
Connection available: jdbc:mysql://<<snip>>
dbConnectionDetails :+++ jdbc:mysql://<<snip>>
CONNECTED::::::::::::::::::
Current time before connecting to the database...Sun Jul 24 13:50:25 EDT 2011
get wc_order_details...
ORDER DETAILS FOUND...........................
Current time after disconnect the database...Sun Jul 24 13:50:25 EDT 2011
Current time before connecting to the database...Sun Jul 24 13:50:25 EDT 2011
get wc_order_status...
ORDER STATUS FOUND================
Current time after disconnect the database...Sun Jul 24 13:50:25 EDT 2011
Hi Im here 2
wcOrderStatus = quickfix.api.equityportal.WcOrderStatus@59a02097
wcOrderDetails = quickfix.api.equityportal.WcOrderDetails@1fbbc779
Hi Im here 3
Hi Im here 4
Hi Im here 7
Hi Im here 8
Hi Im here 10
Hi Im here 11
Heap Size = 514523136
CumQty :::::: 10
AvgPx :::::: 10.4192
Hi Im here 12
Company Ticker: ZVZZT
Current time before connecting to the database...Sun Jul 24 13:50:25 EDT 2011
I am here to insert wc_order_status...
MAX ORDER STATUS ID ::::::: 826
Current time after disconnect the database...Sun Jul 24 13:50:25 EDT 2011
Hi Im here 13
flagInsertExercise:true
recentOrderStatusId:826
Hi Im here 14
Current time before connecting to the database...Sun Jul 24 13:50:25 EDT 2011
get wc_order_detail...
CONN : +++++++ com.mysql.jdbc.JDBC4Connection@5043153c
Current time after disconnect the database...Sun Jul 24 13:50:25 EDT 2011
Current time before connecting to the database...Sun Jul 24 13:50:25 EDT 2011
get Settings...
Current time after disconnect the database...Sun Jul 24 13:50:25 EDT 2011
Current time before connecting to the database...Sun Jul 24 13:50:26 EDT 2011
get wc_order_status...
Current time after disconnect the database...Sun Jul 24 13:50:26 EDT 2011
Jul 24, 2011 1:50:26 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.3.2.GA
Jul 24, 2011 1:50:26 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Jul 24, 2011 1:50:26 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : javassist
Jul 24, 2011 1:50:26 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
ConnStr=jdbc:mysql://<<snip>>
Connection available: jdbc:mysql://<<snip>>
Jul 24, 2011 1:50:26 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: hibernate.cfg.xml
Jul 24, 2011 1:50:26 PM org.hibernate.cfg.Configuration getConfigurationInputStream

<<snip>> lots and lots of mappings

INFO: Configured SessionFactory: connect-SessionFactory
Jul 24, 2011 1:50:29 PM org.hibernate.cfg.HbmBinder bindCollectionSecondPass

<<snip>> lots of collection mappings>>

Jul 24, 2011 1:50:29 PM org.hibernate.connection.ConnectionProviderFactory newConnectionProvider
INFO: Initializing connection provider: org.hibernate.connection.C3P0ConnectionProvider
Jul 24, 2011 1:50:29 PM org.hibernate.connection.C3P0ConnectionProvider configure
INFO: C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://96.242.155.156:3306/ZVZZT
Jul 24, 2011 1:50:29 PM org.hibernate.connection.C3P0ConnectionProvider configure
INFO: Connection properties: {autoReconnect=true, is-connection-validation-required=true, user=mohammed, password=****, autoReconnectForPools=true}
Jul 24, 2011 1:50:29 PM org.hibernate.connection.C3P0ConnectionProvider configure
INFO: autocommit mode: false
INFO MLog(<clinit>:80) - MLog clients using log4j logging.
INFO C3P0Registry(banner:204) - Initializing c3p0-0.9.1 [built 16-January-2007 14:46:42; debug? true; trace: 10]
INFO AbstractPoolBackedDataSource(getPoolManager:462) - Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@f2e4f750 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: RDBMS: MySQL, version: 5.5.10-log
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} )
Jul 24, 2011 1:50:31 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.MySQL5Dialect
Jul 24, 2011 1:50:31 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
INFO: Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
Jul 24, 2011 1:50:31 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch size: 15
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch updates for versioned data: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: enabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): enabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: auto
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Maximum outer join fetch depth: 2
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL inserts for batching: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Jul 24, 2011 1:50:31 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JPA-QL strict compliance: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory createRegionFactory
INFO: Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
Jul 24, 2011 1:50:31 PM org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge <init>
INFO: Cache provider: org.hibernate.cache.NoCacheProvider
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
Jul 24, 2011 1:50:31 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Named query checking : enabled
Jul 24, 2011 1:50:31 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.getStackTrace(Throwable.java:582)
at org.slf4j.impl.JDK14LoggerAdapter.fillCallerData(JDK14LoggerAdapter.java:601)
at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:586)
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)
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)
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)



[Thumbnail for memory.png]

Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Hi and welcome to the JavaRanch!

I've removed the connection details from your post. These are irrelevant for your program and only increase the risk of a potential security breach. Check again if I maybe mist one.

I've also reduced the size of your post. All the details of those mappings don't help to fix your problem. It will only get in the way as people are sceared by the size of your post and skip it. It is still very big. Be selective about what you post. If you want to change any thing you can do that with the button.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

I'm closing this topic. The reason behind that is that in this topic the same question was asked including the exact same screenshot. I'm assuming that you're working in a team or something like that. Communicate with each other and try to solve the problem together.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate issue while loading config file - Caused by: java.lang.OutOfMemoryError: PermGen space
 
Similar Threads
Transaction is not being committed
Can't connect to MySQL database with Hibernate
error connecting to SQL Server 2005
Problem using hibernate
Hibernate OutOfMemory Error