-->
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.  [ 2 posts ] 
Author Message
 Post subject: hbm2ddl failes with eclipse but passed with ant
PostPosted: Tue May 03, 2005 3:22 pm 
Newbie

Joined: Mon May 02, 2005 3:31 pm
Posts: 4
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?

_________________
/~


Top
 Profile  
 
 Post subject: Re: hbm2ddl failes with eclipse but passed with ant
PostPosted: Tue May 03, 2005 4:16 pm 
Regular
Regular

Joined: Mon Apr 25, 2005 9:22 am
Posts: 62
Location: Bucharest/Romania
imo the classpathes used are different and you may have different SAXParsers.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.