jwenting wrote:
sounds like you're trying to read your entire database in one single operation.
That's most likely what's causing your memory problems.
I would be happy if i would read something from the database. The Exception occurs when he creates the scheme. How else should i create the scheme using JPA Annotations ?
Caused by:
java.lang.OutOfMemoryError: Java heap space
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:393)
at java.lang.StringBuffer.append(StringBuffer.java:225)
at org.hibernate.loader.JoinWalker.selectString(JoinWalker.java:953)
at org.hibernate.loader.collection.OneToManyJoinWalker.initStatementString(OneToManyJoinWalker.java:99)
at org.hibernate.loader.collection.OneToManyJoinWalker.<init>(OneToManyJoinWalker.java:72)
at org.hibernate.loader.collection.OneToManyLoader.<init>(OneToManyLoader.java:53)
at org.hibernate.loader.collection.OneToManyLoader.<init>(OneToManyLoader.java:40)
at org.hibernate.loader.collection.OneToManyLoader.<init>(OneToManyLoader.java:31)
at org.hibernate.loader.collection.BatchingCollectionInitializer.createBatchingOneToManyInitializer(BatchingCollectionInitializer.java:72)
at org.hibernate.persister.collection.OneToManyPersister.createCollectionInitializer(OneToManyPersister.java:319)
at org.hibernate.persister.collection.AbstractCollectionPersister.postInstantiate(AbstractCollectionPersister.java:541)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:294)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)