-->
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.  [ 4 posts ] 
Author Message
 Post subject: Rebuilding after disk crash has left me a little short...
PostPosted: Mon Oct 13, 2008 9:14 pm 
Newbie

Joined: Tue Nov 06, 2007 6:51 pm
Posts: 4
I had a completely working Eclipse3.3/Hibernate (3.2.0.beta9a w/annotations) development environment right in my hand, then came the crash.

Fortunately, I had saved the Eclipse folder to a backup CD, which I restored. And most of the project source code could be retrieved from source control. And most of the project setup steps had been recorded. Given all that, I expected to be back up in no time. But it was not to be.

org.hibernate.AnnotationException: No identifier specified for entity: com.myCompany.MyClass

Searchs for this error string (in this forum and elsewhere) states that this problem is caused by a missing "@Id" annotation.
Since this was a fully functional enviroment just last week, obviously MyClass is not missing this annotation.
Therefore, this error is a symptom of something else that is wrong.

- The Eclipse projects have been "cleaned", so old class files are not an issue.
- Hibernate 3 Support is enabled, using a simple console pointing to the hibernate.cfg.xml file.
- The hibernate.cfg.xml (which hasn't changed in months) is being found and used (I'd get a different error if that were not the case).
- The deployed applcation, for which I also had a backup, runs just fine using the newly installed DB.


I'm pretty sure it's something real simple, like a checkbox or path that's not set. After all, I must have figured it out the first time around. But I've already spent a solid day on this, trying just about every permutation I could think of. I'd be highly appreciative if someone could lend me a clue.

Thanks,
Clueless


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 17, 2008 2:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
When and where are you getting the error ?

for me it does not sound to be related to tooling, but pure runtime issue ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 17, 2008 1:33 pm 
Newbie

Joined: Tue Nov 06, 2007 6:51 pm
Posts: 4
max wrote:
When and where are you getting the error ?

for me it does not sound to be related to tooling, but pure runtime issue ?


First, thanks for responding.
And yes. As an exception thrown from:

new AnnotationConfiguration().configure().buildSessionFactory();

As stated originally, the reported error is clearly not the actual one. Most likely it seems that, as configured, the annotated POJO classes are not being found. And that would most likely be caused by improper configuration of Eclipse or the Hibernate plugin.

As a deployment requirement, my main app is in one Eclipse project, and the POJO's are in another Eclipse "required project", where Eclipse adds the "required project" to the build path.

After spending much of the week trying to solve this in the way it was working previously, I went with a temporary workaround that combines the two projects. While this allows me to continue developing, I'm still pretty much screwed when I need to deploy (like for a customer demo I have coming up.)

As a last resort my plan is to bring in the Hibernate source and debug the real problem from there.

Note: if this is not the right forum topic, which might it be?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 17, 2008 1:42 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I'm quite sure *something* is different from before your diskcrash and i'm also quite sure nothing in eclipse will cause this ;)

I think this is a pure packaging issue.

I would ask in the user/jpa forums.

_________________
Max
Don't forget to rate


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