Maven を使用してhttp://docs.jboss.org/hibernate/orm/3.3/reference/en/html/tutorial.htmlの hibernate チュートリアルから例をビルドしようとしていますが、次のエラーが発生します。
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ExceptionInInitializerError
at org.hibernate.tutorial.util.HibernateUtil.buildSessionFactory(HibernateUtil.java:18)
at org.hibernate.tutorial.util.HibernateUtil.<clinit>(HibernateUtil.java:8)
at org.hibernate.tutorial.EventManager.createAndStoreEvent(EventManager.java:23)
at org.hibernate.tutorial.EventManager.main(EventManager.java:16)
... 6 more
Caused by: org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2014)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1926)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1905)
at org.hibernate.tutorial.util.HibernateUtil.buildSessionFactory(HibernateUtil.java:13)
... 9 more
Caused by: org.dom4j.DocumentException: http://hibernate.sourceforge.net/hibernate-configuration-%0A3.0.dtd Nested exception: http://hibernate.sourceforge.net/hibernate-configuration-%0A3.0.dtd
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2006)
... 12 more
hibernate.cfg.xml で「http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd」を「http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd」に置き換えましたしかし、それでも機能しません。