[Hibernate] java.lang.OutOfMemoryError: PermGen space

2007-06-04 Thread John Mitchell

Hi,

I have been having to restart Apache Tomcat as frequently as once a day and
I suspect the problem is related to hibernate.

I have attached an error log from apache tomcat:

I get the following error below

ERROR BasicLazyInitializer:105 - CBLIB Enhancement failed:
com.insequence.gv.ProductOrder

then further down the log file

java.lang.OutOfMemoryError: PermGen space

I also noticed towards the beginning of the log file

13:26:55,625  INFO DriverManagerConnectionProvider:41 - Using Hibernate
built-in connection pool (not for production use!)
13:26:55,640  INFO DriverManagerConnectionProvider:42 - Hibernate connection
pool size: 1

Do I need to switch to a different connection pool and if so what?
Should I change the "Hibernate connection pool size: 1"  to a number higher
than 1 for better stability and if so what number?

Thanks,

--
John J. Mitchell
13:26:55,609  INFO HbmBinder:311 - Mapping class: com.insequence.gv.Product -> 
gv_suppliers
13:26:55,609  INFO Configuration:460 - Reading mappings from resource: 
ProductOrder.hbm.xml
13:26:55,609  INFO HbmBinder:311 - Mapping class: 
com.insequence.gv.ProductOrder -> gv_product_order
13:26:55,609  INFO Configuration:460 - Reading mappings from resource: 
SupplierCustomerAccess.hbm.xml
13:26:55,625  INFO HbmBinder:311 - Mapping class: 
com.insequence.gv.SupplierCustomerAccess -> gv_supplier_customer_access
13:26:55,625  INFO Configuration:460 - Reading mappings from resource: 
User.hbm.xml
13:26:55,625  INFO HbmBinder:311 - Mapping class: com.insequence.gv.User -> 
gv_user
13:26:55,625  INFO Configuration:460 - Reading mappings from resource: 
Structure.hbm.xml
13:26:55,625  INFO HbmBinder:311 - Mapping class: com.insequence.gv.Structure 
-> gv_structure
13:26:55,625  INFO Configuration:1350 - Configured SessionFactory: null
13:26:55,625  INFO Configuration:996 - processing extends queue
13:26:55,625  INFO Configuration:1000 - processing collection mappings
13:26:55,625  INFO Configuration:1009 - processing association property 
references
13:26:55,625  INFO Configuration:1031 - processing foreign key constraints
13:26:55,625  INFO DriverManagerConnectionProvider:41 - Using Hibernate 
built-in connection pool (not for production use!)
13:26:55,640  INFO DriverManagerConnectionProvider:42 - Hibernate connection 
pool size: 1
13:26:55,640  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
13:26:55,640  INFO DriverManagerConnectionProvider:80 - using driver: 
org.postgresql.Driver at URL: jdbc:postgresql://localhost:5432/gvdb
13:26:55,640  INFO DriverManagerConnectionProvider:86 - connection properties: 
{user=postgres, password=}
13:26:55,703  INFO SettingsFactory:77 - RDBMS: PostgreSQL, version: 8.1.4
13:26:55,703  INFO SettingsFactory:78 - JDBC driver: PostgreSQL Native Driver, 
version: PostgreSQL 8.0 JDBC3 with SSL (build 311)
13:26:55,703  INFO Dialect:100 - Using dialect: 
org.hibernate.dialect.PostgreSQLDialect
13:26:55,703  INFO TransactionFactoryFactory:31 - Using default transaction 
strategy (direct JDBC transactions)
13:26:55,703  INFO TransactionManagerLookupFactory:33 - No 
TransactionManagerLookup configured (in JTA environment, use of read-write or 
transactional second-level cache is not recommended)
13:26:55,703  INFO SettingsFactory:125 - Automatic flush during 
beforeCompletion(): disabled
13:26:55,703  INFO SettingsFactory:129 - Automatic session close at end of 
transaction: disabled
13:26:55,718  INFO SettingsFactory:136 - JDBC batch size: 15
13:26:55,718  INFO SettingsFactory:139 - JDBC batch updates for versioned data: 
enabled
13:26:55,718  INFO SettingsFactory:144 - Scrollable result sets: enabled
13:26:55,718  INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): disabled
13:26:55,718  INFO SettingsFactory:160 - Connection release mode: null
13:26:55,718  INFO SettingsFactory:184 - Maximum outer join fetch depth: 1
13:26:55,718  INFO SettingsFactory:187 - Default batch fetch size: 1
13:26:55,718  INFO SettingsFactory:191 - Generate SQL with comments: disabled
13:26:55,718  INFO SettingsFactory:195 - Order SQL updates by primary key: 
disabled
13:26:55,718  INFO SettingsFactory:338 - Query translator: 
org.hibernate.hql.ast.ASTQueryTranslatorFactory
13:26:55,718  INFO ASTQueryTranslatorFactory:21 - Using 
ASTQueryTranslatorFactory
13:26:55,718  INFO SettingsFactory:203 - Query language substitutions: 
{yes='Y', no='N'}
13:26:55,718  INFO SettingsFactory:209 - Second-level cache: enabled
13:26:55,718  INFO SettingsFactory:213 - Query cache: disabled
13:26:55,718  INFO SettingsFactory:325 - Cache provider: 
org.hibernate.cache.HashtableCacheProvider
13:26:55,718  INFO SettingsFactory:228 - Optimize cache for minimal puts: 
disabled
13:26:55,718  INFO SettingsFactory:233 - Cache region prefix: hibernate.test
13:26:55,718  INFO SettingsFactory:237 - Structured second-level cache entries: 
disabled
13:26:55,718  INFO SettingsFactory:257 - Echoing all SQL to stdout
13:26:55,718  INFO SettingsFactory:264 - Statisti

Re: [Hibernate] java.lang.OutOfMemoryError: PermGen space

2007-06-04 Thread Jeoff Wilks

Every time the CGLIB Enhancer generates a new class, that generated class
jumps straight to the PermGen (permanent generation) of your java heap.
CGLIB Enhancers are faster in terms of performance, but more dangerous in
terms of memory consumption. (I ran into this same problem with another
product that uses CGLIB.)

Try turning off CGLIB and just have hibernate use reflection. If that solves
the problem, then you can always work on tuning CGLIB later.


On 6/4/07, John Mitchell <[EMAIL PROTECTED]> wrote:


Hi,

I have been having to restart Apache Tomcat as frequently as once a day
and I suspect the problem is related to hibernate.

I have attached an error log from apache tomcat:

I get the following error below

ERROR BasicLazyInitializer:105 - CBLIB Enhancement failed:
com.insequence.gv.ProductOrder

then further down the log file

java.lang.OutOfMemoryError: PermGen space

I also noticed towards the beginning of the log file

13:26:55,625  INFO DriverManagerConnectionProvider:41 - Using Hibernate
built-in connection pool (not for production use!)
13:26:55,640  INFO DriverManagerConnectionProvider:42 - Hibernate
connection pool size: 1

Do I need to switch to a different connection pool and if so what?
Should I change the "Hibernate connection pool size: 1"  to a number
higher than 1 for better stability and if so what number?

Thanks,

--
John J. Mitchell
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel