-->
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: Hibernate exception saving
PostPosted: Tue Sep 13, 2005 7:32 am 
Newbie

Joined: Tue Sep 13, 2005 7:22 am
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
Hibernate 3.0
Mapping documents:

Code between sessionFactory.openSession() and session.close():
Session session = SessionManager.createSessionFactory().openSession();
Connection conn = session.connection();

session.save(message);
Transaction tran = session.beginTransaction();
tran.commit();
Full stack trace of any exception that occurs:
[junit] 1) addMessagesTest(com.buffering.DatabaseSenderBufferTest)org.hibernate.HibernateException: could not determine type of dynamic entity
[junit] at org.hibernate.impl.SessionImpl.guessEntityName(SessionImpl.java:1472)
[junit] at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1086)
[junit] at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:83)
[junit] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
[junit] at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
[junit] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
[junit] at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
[junit] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
[junit] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:481)
[junit] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:476)
[junit] at com.buffering.DatabaseSenderBuffer.add(Unknown Source)
[junit] at com.buffering.DatabaseSenderBufferTest.addMessage(Unknown Source)
[junit] at com.buffering.DatabaseSenderBufferTest.addMessagesTest(Unknown Source)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at com.buffering.DatabaseSenderBufferTest.main(Unknown Source)
[junit] FAILURES!!!
[junit] Tests run: 1, Failures: 0, Errors: 1
Name and version of the database you are using:
PostgreSQL 8.0.3

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:
---------------

I'm trying to save a Hashtable (message) wich extends from hashtable and an own interface. I have this "could not determine type of dynamic entity" Exception. By the way I can save other instances, from other classes without problems and even I can't save the Instance of message I can use the load method to recover instances from the database without problems.
I search Internet and this forums and I can't find a solution, any idea?¿
The mapping file is correct.


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.