-->
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.  [ 7 posts ] 
Author Message
 Post subject: Problems with new Hibernate Annotations version
PostPosted: Sun May 29, 2005 5:55 am 
Beginner
Beginner

Joined: Mon Mar 21, 2005 1:39 pm
Posts: 28
Hi togehter,
a little question to the new hibernate annotations version.
Before upgrading to hibernate 3.0.2 and the new annotations version my whole program worked.
After the update i now geht the following error-message:

Code:
Initial SessionFactory creation failed.java.lang.NoSuchFieldError: sqlResultSetMappings


Do i have to change my SessionFactory?
Mi initialisation now looks like that:
Code:
.
.
.
cfg = new AnnotationConfiguration();     
            cfg.configure();
            new SchemaUpdate(cfg).execute(true, true);
            sessionFactory = cfg.buildSessionFactory(); 

.
.
.


Regards,
Martin


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 29, 2005 6:13 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
As long as you tell nobody which versions you are using, the question is a bit difficult to answer, no?


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 29, 2005 7:35 am 
Beginner
Beginner

Joined: Mon Mar 21, 2005 1:39 pm
Posts: 28
Hi christian,
sorry, my fault!
at the beginning i uses - as i said - hibernate 3.0 and hibernate annotations 3.0 beta 1.
Then i upgraded to the latest hibernate annotations version 3.0 beta 2. And with this version i get the exception.
I also tried hibernate versions 3.0.1, 3.0.2 (with this it should work (see hibernate annotation 3.0beta2 reference)), 3.0.3, 3.0.4 and 3.0.5. Always with the same exception...

Regards,
Martin


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 29, 2005 10:59 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
And after 22 postings you still didn't read this: http://www.hibernate.org/ForumMailingli ... AskForHelp

or did fill in the required information about your issue in the textarea. Again, nobody can help you...


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 29, 2005 1:24 pm 
Beginner
Beginner

Joined: Mon Mar 21, 2005 1:39 pm
Posts: 28
Hallo Christian.
i really don't get your problem at the moment, sorry.
But i wrote , that there is a conflict with the new hibernate annotation verions 3.0 beta 2 and hibernate. Better said i create a conflict in creating a session factory (
Code:
sessionFactory = cfg.buildSessionFactory();     
throws the exception); and i only now, that with hibernate 3.0 and annotations 3.0 beta1 i didn't have the problem.....

I gave you the whole exception excerpt, code how i create the session, the versions i use and with which ones i have the problem (you have asked for them..).

Please don't understand me wrong. I would be glad to get help. But i don't know at the moment, which further information i should post....

Regards,
Martin


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 31, 2005 6:28 pm 
Newbie

Joined: Mon May 30, 2005 5:34 pm
Posts: 1
I had the same exception with schemaupdate after upgrading to hibernate annotations 3 beat 2 (from beta 1) and hibernate 3.0.5 (from 3.0.3).

After a quick look into the jdk javadoc...

Quote:
Thrown if an application tries to access or modify a specified field of an object, and that object no longer has that field.

Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.


...and into org.hibernate.cfg.Configuration CVS Resource History...

Quote:
Add support for SqlResultSetMapping


... and afterwards a version tag v305, v304 - it was clear that the new version 3.0.5 wasn't in the classpath. A quick check of the file timestamp from the two hibernate jars showed me that forgot to replace the main hibernate3.jar. After copying it to its location in the lib folder, everything went smoothly with the schema update.

Perhaps you have another old hibernate version somewhere in your classpath? It seems that with beta 2 you have to run at least hibernate 3.0.4...

bye
Michael


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 01, 2005 9:26 am 
Beginner
Beginner

Joined: Mon Mar 21, 2005 1:39 pm
Posts: 28
Hi mkessler,
thanks for the help!
For the newest hibernate version 3.0.5 i had to add asm.jar and asm-attrs.jar to the classpath. In the older version you needn't the jars....

thanks for helping!

Regards,
Martin


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.