-->
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.  [ 1 post ] 
Author Message
 Post subject: Configuration Problem? Entity Manager, OutOfMemory
PostPosted: Tue Oct 20, 2009 5:06 am 
Beginner
Beginner

Joined: Sat Feb 16, 2008 3:09 pm
Posts: 24
Hi,
I am trying to access a fairly complicated database (with cyclic dependencies) with Hibernate as JPA provider under JSE.
Even with simple operations I get OutOfMemory errors.
A heap dump analysis shows that
Code:
The classloader/component "sun.misc.Launcher$AppClassLoader @ 0x2fc51b8" occupies 57.874.744 (82,53%) bytes. The memory is accumulated in one instance of "java.util.HashMap$Entry[]" loaded by "<system class loader>".


hibernate.cfg.xml:

Code:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
   <property name="connection.url">jdbc:postgresql://localhost/bla</property>
   <property name="connection.username">postgres</property>
   <property name="connection.driver_class">org.postgresql.Driver</property>
   <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
   <property name="connection.password">bla</property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
   
    <property name="current_session_context_class">thread</property>
    <!-- this will show us all sql statements -->
    <property name="hibernate.show_sql">true</property>
   <property name="hibernate.format_sql">true</property>
   <!--  Achtung nicht in Produktion verwenden, das Schema wird automatisch erzeugt -->
   <property name="hibernate.hbm2ddl.auto">validate</property>
</session-factory>
</hibernate-configuration>


persistence.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
    http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

<persistence-unit name="bafoeg3">
      <properties>
         <property name="hibernate.ejb.cfgfile" value="/hibernate.cfg.xml" />
      </properties>
</persistence-unit>
</persistence>


In the log I see tons of entries like
Code:
10:52:59,560 DEBUG [EntityLoader] Static select for entity bla.dbaccess.domain.KennzeichenFreibetrag: select kennzeiche0_.id as id712_0_, kennzeiche0_.abrev as abrev712_0_, kennzeiche0_.available as available712_0_, kennzeiche0_.mask as mask712_0_, kennzeiche0_.value as value712_0_ from KeyEntity kennzeiche0_ where kennzeiche0_.id=? and kennzeiche0_.TYPE='frb' for update


Any ideas what might going wrong?

Thanks,

Hans


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

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.