-->
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.  [ 2 posts ] 
Author Message
 Post subject: hibernate property limit of 1000?
PostPosted: Thu Dec 05, 2013 5:12 pm 
Newbie

Joined: Thu Dec 05, 2013 5:02 pm
Posts: 1
This is the first time I have a Java model object with about 1500 properties and I'm getting the following error during compile:

Code:
12:52:53,840 - ERROR [ContainerBackgroundProcessor[StandardEngine[Catalina]]] (LavaBeanUtils.java:24) -
Unable to load bean 'lavaDao' from application contextorg.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'lavaDao' defined in ServletContext resource [/WEB-INF/context/core/core-dao.xml]:
Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource
[/WEB-INF/context/local/pedi/pedi-env-tomcat6.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource
[/WEB-INF/context/core/core-dao.xml]: Invocation of init method failed; nested exception is net.sf.cglib.core.CodeGenerationException:
java.lang.reflect.InvocationTargetException-->null


I know that MySQL InnoDB tables have a 1000 column limit, so I split the model object into two tables, with table 1 having about 960 columns and table 2 having the rest. It appears to be a problem with the number of properties because when I reduce the properties down to below 1000 everything compiles and runs fine, but when I add more I get the above error. The error code suggest the hibernate session and/or transaction can't handle so many properties? But I'm sure someone out there has needed to have a model object with more than 1000 properties. I can't find any attribute in hibernate.properties that would be related to this, either. Or could this be a Spring related issue?

Thanks for any advice/help.


Top
 Profile  
 
 Post subject: Re: hibernate property limit of 1000?
PostPosted: Fri Dec 06, 2013 3:41 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hello,
Hibernate has no specific boundary but many JDBC drivers will not behave correctly with many properties. You're probably hitting a driver or database limitation.

I would advise to refactor your model to not have so many columns.

_________________
Sanne
http://in.relation.to/


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

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.