-->
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: Bug? Secondray table doesn't work with Mapped Superclass?
PostPosted: Mon May 14, 2007 5:40 am 
Newbie

Joined: Fri May 11, 2007 9:52 pm
Posts: 4
Hello,

I work with the actual version of hibernate.

I t´ry to use the secondary table annotation in my entities and have a problem that in some cases hibernate works and in some cases I get an error.

Error:


Code:
11:33:10 [DEBUG] l.SessionFactoryImpl#<init>                   : Session factory constructed with filter configurations : {}
11:33:10 [DEBUG] l.SessionFactoryImpl#<init>                   : instantiating session factory with properties: {hibernate.connection.username=rudi, hibernate.connection.password=ratlos, hibernate.connection.url=jdbc:oracle:thin:@thomaspc:1521:td10g, hibernate.connection.internal_logon=NORMAL}
11:33:10 [ERROR] ate.AssertionFailure#<init>                   : an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: Table I$SDD_OBJECT_VERSIONS not found
   at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:461)
   at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:240)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
   at de.archtech.oracle.designer.generator.application.Main.main(Main.java:66)
11:33:10 [ERROR] tor.application.Main#main                     : Hibernate configuration failed!
org.hibernate.AssertionFailure: Table I$SDD_OBJECT_VERSIONS not found
   at org.hibernate.persister.entity.JoinedSubclassEntityPersister.getTableId(JoinedSubclassEntityPersister.java:461)
   at org.hibernate.persister.entity.JoinedSubclassEntityPersister.<init>(JoinedSubclassEntityPersister.java:240)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:58)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
   at de.archtech.oracle.designer.generator.application.Main.main(Main.java:66)



What I have figured out.
I have tested a bit around found out, that in my case the following rules applay. :-)

1. If I have a MappedSuperclass as parent class and use in the child class the secondary table annotation, it works.
2. If I have a MappedSuperclass and try to use the secondary table annotation in a child class which uses a joined inheritance it will throw the shown runtime error.

I have looked into the unit tests and found, that my case isn't tested, as it seems.
The unit test just use the secondary table annotation and a joined inheritance but without a MappedSuperclass.

Could this be a bug or what I am doing wrong here?

Thanx a lot
Matthias


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.