-->
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: Problems using hbm2ddl ant task and Hibernate 3 annotation
PostPosted: Fri Sep 09, 2005 8:02 am 
Newbie

Joined: Thu Sep 08, 2005 12:37 pm
Posts: 10
Hello,

I am unable to use the hbm2ddl Tool to generate my DDL. The error

Code:
Unable to load class declared as <mapping class="de.oc.shipment.entities.GuineaPig"/> in the configuration:

leads me to check my classpath in order to find the indicated class in compilation directory. Everything seems to be configured as it should be.

What can I do to solve this issue?

Oliver-Arne

Hibernate version:
Hibernate-Core 3.1 beta 1, Hibernate-Annotations 3.1 beta 4, Hibernate-Tools 3.1 alpha 5

Full stack trace of any exception that occurs:
Code:
[hibernatetoolAnnot] Executing Hibernate Tool with a Hibernate Annotation/EJB3 Configuration
[hibernatetoolAnnot] 1. task: hbm2ddl (Generates database schema)
[hibernatetoolAnnot] 13:49:18,237  INFO Environment:464 - Hibernate 3.1 beta 1
[hibernatetoolAnnot] 13:49:18,247  INFO Environment:482 - loaded properties from resource hibernate.properties: {hibernate.connection.username=cargo, hibernate.connection.password=****, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=org.hibernate.dialect.Oracle9Dialect, hibernate.connection.url=jdbc:oracle:thin:@laphh09:1521:ORCL, hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver}
[hibernatetoolAnnot] 13:49:18,257  INFO Environment:510 - using CGLIB reflection optimizer
[hibernatetoolAnnot] 13:49:18,267  INFO Environment:540 - using JDK 1.4 java.sql.Timestamp handling
[hibernatetoolAnnot] 13:49:18,408  INFO Configuration:1182 - configuring from file: hibernate.cfg.xml
[hibernatetoolAnnot] 13:49:18,498 DEBUG DTDEntityResolver:42 - trying to locate http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath under org/hibernate/
[hibernatetoolAnnot] 13:49:18,498 DEBUG DTDEntityResolver:53 - found http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd in classpath
[hibernatetoolAnnot] 13:49:18,598 DEBUG Configuration:1100 - show_sql=true
[hibernatetoolAnnot] 13:49:18,608 DEBUG Configuration:1100 - hibernate.format_sql=true
[hibernatetoolAnnot] 13:49:18,608 DEBUG Configuration:1100 - hibernate.max_fetch_depth=1
[hibernatetoolAnnot] 13:49:18,608 DEBUG Configuration:1100 - hibernate.default_batch_fetch_size=8
[hibernatetoolAnnot] 13:49:18,608 DEBUG Configuration:1100 - hibernate.default_schema=CARGO
[hibernatetoolAnnot] 13:49:18,618 DEBUG Configuration:1100 - hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
[hibernatetoolAnnot] 13:49:18,618 DEBUG Configuration:1100 - hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
[hibernatetoolAnnot] 13:49:18,618 DEBUG Configuration:1100 - hibernate.connection.username=cargo
[hibernatetoolAnnot] 13:49:18,628 DEBUG Configuration:1100 - hibernate.connection.password=cargo
[hibernatetoolAnnot] 13:49:18,628 DEBUG Configuration:1100 - hibernate.connection.url=jdbc:oracle:thin:@laphh09:1521:ORCL
[hibernatetoolAnnot] 13:49:18,628 DEBUG AnnotationConfiguration:319 - null<-org.dom4j.tree.DefaultAttribute@513d61 [Attribute: name class value "de.oc.shipment.entities.GuineaPig"]

BUILD FAILED
C:\Dokumente und Einstellungen\oah\workspace\Cargo-Shipment\build.xml:88: org.hibernate.MappingException: Unable to load class declared as <mapping class="de.oc.shipment.entities.GuineaPig"/> in the configuration:



Name and version of the database you are using:
Oracle 10g R1

[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 11, 2005 11:42 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Is GuineaPig abstract?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 4:44 am 
Newbie

Joined: Thu Sep 08, 2005 12:37 pm
Posts: 10
Hello,

no. GuineaPig is a concrete class.

Oliver-Arne


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 5:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
call ant with -debug and you should get the fullstacktrace explaining the underlying cause.

probably just missing the classes in the classpath

_________________
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.