This is that I get when try to generate pojo's using ant.
E:\TrueDemand_USA\tools\hibernate-tools-sqlsvr>ant -verbose gen
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.5.
0_08\lib\tools.jar
Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: build.xml
Detected Java version: 1.5 in: C:\Program Files\Java\jre1.5.0_08
Detected OS: Windows XP
parsing buildfile E:\TrueDemand_USA\tools\hibernate-tools-sqlsvr\build.xml with
URI = file:///E:/TrueDemand_USA/tools/hibernate-tools-sqlsvr/build.xml
Project base dir set to: E:\TrueDemand_USA\tools\hibernate-tools-sqlsvr
[property] Loading E:\TrueDemand_USA\tools\hibernate-tools-sqlsvr\build.propert
ies
Build sequence for target(s) `gen' is [gen]
Complete build sequence is [gen, build, package, clean, build2, package2, usage,
]
gen:
[mkdir] Created dir: C:\tdemand\hibernate-gen\gen
[hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse
engineering)
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)
[hibernatetool] log4j:WARN No appenders could be found for logger (org.hibernate
.cfg.Environment).
[hibernatetool] log4j:WARN Please initialize the log4j system properly.
BUILD FAILED
E:\TrueDemand_USA\tools\hibernate-tools-sqlsvr\build.xml:41: org.hibernate.Mappi
ngException: Could not configure overrides from file: E:\TrueDemand_USA\tools\hi
bernate-tools-sqlsvr\hibernate.reveng.xml
at org.apache.tools.ant.Task.perform(Task.java:373)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: org.hibernate.MappingException: Could not configure overrides from fi
le: E:\TrueDemand_USA\tools\hibernate-tools-sqlsvr\hibernate.reveng.xml
at org.hibernate.cfg.reveng.OverrideRepository.addFile(OverrideRepositor
y.java:61)
at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConf
igurationTask.java:61)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(Configurati
onTask.java:50)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateTo
olTask.java:158)
at org.hibernate.tool.ant.GeneratorTask.configureExporter(GeneratorTask.
java:73)
at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.configureExporter(Hbm2Ja
vaGeneratorTask.java:37)
at org.hibernate.tool.ant.GeneratorTask.execute(GeneratorTask.java:31)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.ja
va:122)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
... 10 more
Caused by: org.hibernate.MappingException: invalid override definition
at org.hibernate.cfg.reveng.OverrideRepository.addInputStream(OverrideRe
pository.java:90)
at org.hibernate.cfg.reveng.OverrideRepository.addFile(OverrideRepositor
y.java:57)
... 19 more
Caused by: org.xml.sax.SAXParseException: Element type "primary-key" must be dec
lared.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Sourc
e)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.reveng.OverrideRepository.addInputStream(OverrideRe
pository.java:89)
... 20 more
--- Nested Exception ---
org.hibernate.MappingException: Could not configure overrides from file: E:\True
Demand_USA\tools\hibernate-tools-sqlsvr\hibernate.reveng.xml
at org.hibernate.cfg.reveng.OverrideRepository.addFile(OverrideRepositor
y.java:61)
at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConf
igurationTask.java:61)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(Configurati
onTask.java:50)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateTo
olTask.java:158)
at org.hibernate.tool.ant.GeneratorTask.configureExporter(GeneratorTask.
java:73)
at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.configureExporter(Hbm2Ja
vaGeneratorTask.java:37)
at org.hibernate.tool.ant.GeneratorTask.execute(GeneratorTask.java:31)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.ja
va:122)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: org.hibernate.MappingException: invalid override definition
at org.hibernate.cfg.reveng.OverrideRepository.addInputStream(OverrideRe
pository.java:90)
at org.hibernate.cfg.reveng.OverrideRepository.addFile(OverrideRepositor
y.java:57)
... 19 more
Caused by: org.xml.sax.SAXParseException: Element type "primary-key" must be dec
lared.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Sourc
e)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.reveng.OverrideRepository.addInputStream(OverrideRe
pository.java:89)
... 20 more
Total time: 1 second
E:\TrueDemand_USA\tools\hibernate-tools-sqlsvr>
|