reset password
Author Message
Sanaz_6101
Posts: 40
Posted 12:40 Oct 18, 2009 |

Hi Dr Sun

under csns/src I can not find hibernate.cfg.xml sicne this file is exist under buil/classes so in buil.xml should I change <hibernatetool>
            <configuration configurationfile="${class.dir}/hibernate.cfg.xml" /> ???

Please let me know how Im able to access hibernate.xml under src

Thanks

 

cysun
Posts: 2935
Posted 12:41 Oct 18, 2009 |

It's under /conf.

Sanaz_6101
Posts: 40
Posted 12:54 Oct 18, 2009 |

Thanks

Can I delete all other mapping inside it because iy seems conflict with my hbm.xml files .some of my files have the same name as the csns files ?

cysun
Posts: 2935
Posted 15:26 Oct 18, 2009 |
Sanaz_6101 wrote:

Thanks

Can I delete all other mapping inside it because iy seems conflict with my hbm.xml files .some of my files have the same name as the csns files ?

You are supposed to put your mapping files under src/hbm/assignment as required by the homework assignment. There should not be any name conflicts, but you can try deleting some files and see what happens.

Sanaz_6101
Posts: 40
Posted 16:54 Oct 18, 2009 |
cysun wrote:
Sanaz_6101 wrote:

Thanks

Can I delete all other mapping inside it because iy seems conflict with my hbm.xml files .some of my files have the same name as the csns files ?

You are supposed to put your mapping files under src/hbm/assignment as required by the homework assignment. There should not be any name conflicts, but you can try deleting some files and see what happens.

 

uder hibernate.cgf.xml there is some other mapping files that would be conflict with my mapping .my hbm is in a correct place src/hbm/assignment,but once I want to run as hbm2ddl Ant task some errors will come up

here is my error :

[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] org.hibernate.InvalidMappingException: Could not parse mapping document from resource hbm/Assignment.hbm.xml
[hibernatetool] org.hibernate.DuplicateMappingException: duplicate import: Assignment refers to both csns.model.Assignment and csns.model.assignment.Assignment (try using auto-import="false")

BUILD FAILED
/Workspace520/csns/build.xml:209: org.hibernate.InvalidMappingException: Could not parse mapping document from resource hbm/Assignment.hbm.xml

 

cysun
Posts: 2935
Posted 19:00 Oct 18, 2009 |
Sanaz_6101 wrote:
cysun wrote:
Sanaz_6101 wrote:

Thanks

Can I delete all other mapping inside it because iy seems conflict with my hbm.xml files .some of my files have the same name as the csns files ?

You are supposed to put your mapping files under src/hbm/assignment as required by the homework assignment. There should not be any name conflicts, but you can try deleting some files and see what happens.

 

uder hibernate.cgf.xml there is some other mapping files that would be conflict with my mapping .my hbm is in a correct place src/hbm/assignment,but once I want to run as hbm2ddl Ant task some errors will come up

here is my error :

[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] org.hibernate.InvalidMappingException: Could not parse mapping document from resource hbm/Assignment.hbm.xml
[hibernatetool] org.hibernate.DuplicateMappingException: duplicate import: Assignment refers to both csns.model.Assignment and csns.model.assignment.Assignment (try using auto-import="false")

BUILD FAILED
/Workspace520/csns/build.xml:209: org.hibernate.InvalidMappingException: Could not parse mapping document from resource hbm/Assignment.hbm.xml

It's a problem in your mapping. Understand what each element/attribute in your mapping does and fix it.