-->
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: help! about schemaexport @hibernate3.2.5
PostPosted: Tue Dec 18, 2007 2:44 am 
Newbie

Joined: Tue Dec 18, 2007 12:52 am
Posts: 2
environment:
hibernate:3.2.5
_____________________________

ant:1.6
_______________________________

java:
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)
________________________________________________________
Example used is the tutorial in hibernate3.2.5 package.
_________________________________________________________
problem:
BUILD FAILED
E:\hibernate-3.2\doc\tutorial\build.xml:67: Schema text failed: Could not parse
mapping document from file E:\hibernate-3.2\doc\tutorial\bin\events\Event.class
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.
java:151)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping docume
nt from file E:\hibernate-3.2\doc\tutorial\bin\events\Event.class
at org.hibernate.cfg.Configuration.addFile(Configuration.java:319)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:287)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaEx
portTask.java:204)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.
java:148)
... 17 more
Caused by: org.dom4j.DocumentException: Invalid byte 2 of 2-byte UTF-8 sequence.
Nested exception: Invalid byte 2 of 2-byte UTF-8 sequence.
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:305)
... 20 more
--- Nested Exception ---
org.hibernate.InvalidMappingException: Could not parse mapping document from fil
e E:\hibernate-3.2\doc\tutorial\bin\events\Event.class
at org.hibernate.cfg.Configuration.addFile(Configuration.java:319)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:287)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaEx
portTask.java:204)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.
java:148)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: org.dom4j.DocumentException: Invalid byte 2 of 2-byte UTF-8 sequence.
Nested exception: Invalid byte 2 of 2-byte UTF-8 sequence.
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:305)
... 20 more

Total time: 1 second
_________________________________________________________
I have examined the mapping file exactly and found no error about character encoding exists!
So discouraged about the problems for two days, hopefully to get an answer. help me ,many thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 18, 2007 9:23 pm 
Newbie

Joined: Tue Dec 18, 2007 12:52 am
Posts: 2
Is there anyone help me?


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.