Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Object Relational Mapping
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Object Relational Mapping
Could not parse configuration: /hibernate.cfg.xml
munna next
Ranch Hand
Posts: 46
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello
I am new to Hibernate and started learing with examples.
When I run the
ANT
build script I am getting the following error
I greatly appreciate if you could help me on this.
[B] [java] Initial SessionFactory creation failed.org.hibernate.HibernateExcept ion: Could not parse configuration: /hibernate.cfg.xml[/B] [java] 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.HibernateException: Could not parse configu ration: /hibernate.cfg.xml
My Source Directory structure is
DATA src events (folder) Event.hbm Event.java EventManager.java Util (folder) HibernateUtil.java hibernate.cfg.xml lib All Hibernate JAR files bin (After I run the ANT build script it will put in this folder) events Event.class EventManager.class Event.hbm util HibernateUtil.clss hibernate.cfg build.xml
my ANT Build Script is
<project name="hibernate-tutorial" default="compile"> <property name="sourcedir" value="${basedir}/src"/> <property name="targetdir" value="${basedir}/bin"/> <property name="librarydir" value="${basedir}/lib"/> <path id="libraries"> <fileset dir="${librarydir}"> <include name="*.jar"/> </fileset> </path> <target name="clean"> <delete dir="${targetdir}"/> <mkdir dir="${targetdir}"/> </target> <target name="compile" depends="clean, copy-resources"> <javac srcdir="${sourcedir}" destdir="${targetdir}" classpathref="libraries"/> </target> <target name="run" depends="compile"> <java fork="true" classname="events.EventManager" classpathref="libraries"> <classpath path="${targetdir}"/> <arg value="${action}"/> </java> </target> <target name="copy-resources"> <copy todir="${targetdir}"> <fileset dir="${sourcedir}"> <exclude name="**/*.java"/> </fileset> </copy> </target> </project>
Bougnon Kipre
Greenhorn
Posts: 21
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Not sure, but could you check the package util name case?
Is it uppercase U or lowercase u
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Problem with Ant Build
NoClassDefFoundError
could not find the main class
how to tell ant that some packages are needed?
InvalidMappingException
More...