reset password
Author Message
Anna
Posts: 7
Posted 00:12 Apr 28, 2011 |

Hi Dr.Sun,

When I run hbm2ddl target I get the following error.

1. Is there any good way to debug hibernate mapping?..

2. Do we need to configure log file for hibernate?

3.The error message is not clear, I do not understand what exectly it says..Does it say that my Event class is unmapped?...Because I have the mappings...

Thanks in advance.

...........................

build:

hbm2ddl:

[hibernatetool] Executing Hibernate Tool with a Standard Configuration

[hibernatetool] 1. task: hbm2ddl (Generates database schema)

[hibernatetool] An exception occurred while running exporter #2:hbm2ddl (Generates database schema)

[hibernatetool] To get the full stack trace run ant with -verbose

[hibernatetool] org.hibernate.MappingException: Association references unmapped class: csns.model.Event

 

BUILD FAILED

C:\Users\Anna\520workspace\csns\build.xml:156: org.hibernate.MappingException: Association references unmapped class: csns.model.Event

arctica82
Posts: 10
Posted 00:33 Apr 28, 2011 |

First, check if you have included your hibernate xml's in hibernate configuration file.

Second most probably the class name is csns.model.calendar.Event(If you have put your package in calendar package) and not csns.model.Event

Anna
Posts: 7
Posted 00:42 Apr 28, 2011 |

Thank you, I was not giving the right path...Still, I would like to know if there is any way to configure log file ...

alomo
Posts: 70
Posted 01:19 Apr 28, 2011 |

Anna,

As it suggested by hibernatetool: To get the full stack trace run ant with -verbose