-->
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: Unable to get a working annotation configuration
PostPosted: Thu May 08, 2008 8:37 am 
Newbie

Joined: Thu Apr 06, 2006 2:09 pm
Posts: 14
Hi,

I'm trying the last version of Hibernate tools (3.2.2beta1) and I'm not able to get a working configuration with my project.

My mapping are annotation based, so I'm using the Annotation configuration. The tools finds my hibenate.cfg.xml and my hibernate.properties from my project classpath (I left the default classpath of my project selected by the tool). But when I try to load my config, the tool is not able to find the classes for the mappings configured in hibernate.cfg.xml. I don't understand, as those classes are in the classpath (my project is working perfectly with it).

Any thoughts?


Aymeric


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 08, 2008 11:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Any errors in the log ?

Is the project built ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 08, 2008 12:07 pm 
Newbie

Joined: Thu Apr 06, 2006 2:09 pm
Posts: 14
Thank you for answering.

Yes, the project is built and the only error I get is a ClassNotFoundException on the first declared entity in the hibernate.cfg.xml.

I even tried to make a custom classpath with the required stuffs only : same problem.

Here is the error: (xxx is my class)
Code:
org.hibernate.console.HibernateConsoleRuntimeException: Could not load AnnotationConfiguration
Could not load AnnotationConfiguration
  org.hibernate.MappingException: Unable to load class declared as <mapping class="xxx"/> in the configuration:
  Unable to load class declared as <mapping class="xxx"/> in the configuration:
    org.hibernate.MappingException: Unable to load class declared as <mapping class="xxx"/> in the configuration:
    Unable to load class declared as <mapping class="xxx"/> in the configuration:
    java.lang.ClassNotFoundException: xxx
    xxx


Thanks,

Aymeric


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 08, 2008 1:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
well the .class file is clearly not available on the classpath as otherwise it should work.

Can you try and create a *minimal* test project that fails for you ?

It should just have one cfg.xml with one class entry and lets see if you can show me it failing there ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 08, 2008 3:00 pm 
Newbie

Joined: Thu Apr 06, 2006 2:09 pm
Posts: 14
Mmmh... It looks like it is a problem with WTP dynamics web project.
I made one from scratch with just one simple entity and an hibernate.cfg.xml and I have the exact same issue.
Is there any way for me to upload the project zip? (Other than Jira?)


Aymeric


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 08, 2008 6:07 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i only have jira available for doing uploads to...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 09, 2008 4:36 am 
Newbie

Joined: Thu Apr 06, 2006 2:09 pm
Posts: 14
I uploaded a test project on Jira : http://opensource.atlassian.com/project ... e/HBX-1060

Thanks,


Aymeric


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.