Jow dudes,
I'm running hibernate 2 with eclipse 3. If i do a schemaexport with ant from commandline it build succesful. But when i invoke ant from eclipse it gives the following error:
Code:
Buildfile: C:\Programming\stones-workspace\stones\build.xml
prepare:
codegen:
[hbm2java] Processing 1 mapping files.
[hbm2java] 21:09:08,590 WARN CodeGenerator:54 - Warning parsing XML: file:/C:/Programming/stones-workspace/stones/src/com/meller/stones/models/User.hbm.xml(1)
[hbm2java] 21:09:08,680 ERROR CodeGenerator:48 - Error parsing XML: file:/C:/Programming/stones-workspace/stones/src/com/meller/stones/models/User.hbm.xml(1)
[hbm2java] org.xml.sax.SAXParseException: Document root element is missing.
[hbm2java] at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.parse(Unknown Source)
[hbm2java] at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689)
[hbm2java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:100)
[hbm2java] at net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.processFile(Hbm2JavaTask.java:145)
[hbm2java] at net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.execute(Hbm2JavaTask.java:93)
[hbm2java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hbm2java] at org.apache.tools.ant.Task.perform(Task.java:364)
[hbm2java] at org.apache.tools.ant.Target.execute(Target.java:341)
[hbm2java] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hbm2java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[hbm2java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[hbm2java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:633)
[hbm2java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:412)
[hbm2java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hbm2java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[hbm2java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[hbm2java] at java.lang.reflect.Method.invoke(Unknown Source)
[hbm2java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:350)
[hbm2java] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:182)
[hbm2java] at java.lang.Thread.run(Unknown Source)
[hbm2java] org.jdom.JDOMException: Error on line 1 of document file:/C:/Programming/stones-workspace/stones/src/com/meller/stones/models/User.hbm.xml: Document root element is missing.
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:363)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689)
[hbm2java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:100)
[hbm2java] at net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.processFile(Hbm2JavaTask.java:145)
[hbm2java] at net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.execute(Hbm2JavaTask.java:93)
[hbm2java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hbm2java] at org.apache.tools.ant.Task.perform(Task.java:364)
[hbm2java] at org.apache.tools.ant.Target.execute(Target.java:341)
[hbm2java] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hbm2java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[hbm2java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[hbm2java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:633)
[hbm2java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:412)
[hbm2java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hbm2java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[hbm2java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[hbm2java] at java.lang.reflect.Method.invoke(Unknown Source)
[hbm2java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:350)
[hbm2java] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:182)
[hbm2java] at java.lang.Thread.run(Unknown Source)
[hbm2java] Caused by: org.xml.sax.SAXParseException: Document root element is missing.
[hbm2java] at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.parse(Unknown Source)
[hbm2java] at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
[hbm2java] ... 20 more
[hbm2java] Caused by: org.xml.sax.SAXParseException: Document root element is missing.
[hbm2java] at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.parse(Unknown Source)
[hbm2java] at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689)
[hbm2java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:100)
[hbm2java] at net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.processFile(Hbm2JavaTask.java:145)
[hbm2java] at net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.execute(Hbm2JavaTask.java:93)
[hbm2java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hbm2java] at org.apache.tools.ant.Task.perform(Task.java:364)
[hbm2java] at org.apache.tools.ant.Target.execute(Target.java:341)
[hbm2java] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hbm2java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[hbm2java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[hbm2java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:633)
[hbm2java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:412)
[hbm2java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hbm2java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[hbm2java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[hbm2java] at java.lang.reflect.Method.invoke(Unknown Source)
[hbm2java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:350)
[hbm2java] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:182)
[hbm2java] at java.lang.Thread.run(Unknown Source)
[hbm2java] Caused by: org.xml.sax.SAXParseException: Document root element is missing.
[hbm2java] at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
[hbm2java] at org.apache.crimson.parser.Parser2.parse(Unknown Source)
[hbm2java] at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:354)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:707)
[hbm2java] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:689)
[hbm2java] at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:100)
[hbm2java] at net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.processFile(Hbm2JavaTask.java:145)
[hbm2java] at net.sf.hibernate.tool.hbm2java.Hbm2JavaTask.execute(Hbm2JavaTask.java:93)
[hbm2java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hbm2java] at org.apache.tools.ant.Task.perform(Task.java:364)
[hbm2java] at org.apache.tools.ant.Target.execute(Target.java:341)
[hbm2java] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hbm2java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[hbm2java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[hbm2java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:633)
[hbm2java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:412)
[hbm2java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hbm2java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[hbm2java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[hbm2java] at java.lang.reflect.Method.invoke(Unknown Source)
[hbm2java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:350)
[hbm2java] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:182)
[hbm2java] at java.lang.Thread.run(Unknown Source)
Any idea's?