-->
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: Does Hibernate have a limit on extending inherited Entities
PostPosted: Wed Jun 24, 2015 11:14 pm 
Newbie

Joined: Wed Jun 24, 2015 11:04 pm
Posts: 1
I have "entity-d" that extends "entity-c" that extends "entity-b" that extends "entity-a". The inheritance goes 4 levels deep, and Hibernate throws an Exception when I start the application. If I remove the last Entity (entity-d) so that it is only 3 levels deep, then the application starts without the Exception.

Here's the exception:

java.lang.ArrayIndexOutOfBoundsException: 2
at org.hibernate.persister.entity.JoinedSubclassEntityPersister.isNullableTable(JoinedSubclassEntityPersister.java:800)
at org.hibernate.persister.entity.AbstractEntityPersister.determineSubclassTableJoinType(AbstractEntityPersister.java:3814)
at org.hibernate.persister.entity.AbstractEntityPersister.createJoin(AbstractEntityPersister.java:3787)
at org.hibernate.persister.entity.AbstractEntityPersister.fromJoinFragment(AbstractEntityPersister.java:3739)
at org.hibernate.persister.entity.AbstractEntityPersister.generateSnapshotSelectString(AbstractEntityPersister.java:1791)
at org.hibernate.persister.entity.AbstractEntityPersister.doLateInit(AbstractEntityPersister.java:3991)
at org.hibernate.persister.entity.AbstractEntityPersister.postInstantiate(AbstractEntityPersister.java:4015)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:481)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844)

For more detail, see: http://stackoverflow.com/questions/31040108/does-hibernate-have-a-limit-on-extending-inherited-entity-classes


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.