Hello, i have any problem with tutorial. I'm a new Hibernet's user.
When i run: "ant run -Daction=store" give me this results
Buildfile: build.xml
clean:
[delete] Deleting directory /home/developer/capitolo1/bin
[mkdir] Created dir: /home/developer/capitolo1/bin
copy-resources:
[copy] Copying 3 files to /home/developer/capitolo1/bin
[copy] Copied 2 empty directories to 1 empty directory under /home/developer/capitolo1/bin
compile:
[javac] Compiling 4 source files to /home/developer/capitolo1/bin
[javac] Note: /home/developer/capitolo1/src/events/EventManager.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
run:
[java] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
[java] log4j:WARN Please initialize the log4j system properly.
[java] Initial SessionFactory creation failed.org.hibernate.InvalidMappingException: Could not parse mapping document from resource events/Person.hbm.xml
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at util.HibernateUtil.<clinit>(Unknown Source)
[java] at events.EventManager.createAndStoreEvent(Unknown Source)
[java] at events.EventManager.main(Unknown Source)
[java] Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource events/Person.hbm.xml
[java] at org.hibernate.cfg.Configuration.addResource(Configuration.java:575)
[java] at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1593)
[java] at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1561)
[java] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1540)
[java] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1514)
[java] at org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
[java] at org.hibernate.cfg.Configuration.configure(Configuration.java:1420)
[java] ... 3 more
[java] Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
[java] at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:514)
[java] at org.hibernate.cfg.Configuration.addResource(Configuration.java:572)
[java] ... 9 more
[java] Caused by: org.dom4j.DocumentException: Error on line 14 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
[java] at org.dom4j.io.SAXReader.read(SAXReader.java:482)
[java] at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:505)
[java] ... 10 more
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 9 seconds
I don't understand what is the problem? Before add a collection of events to the person class, i hadn't problem!
Please help me.
|