A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
Ant, Maven and Other Build Tools
org.hibernate.MappingNotFoundException: resource: edu/hib/pojo/Employee.orm.xml not found
Prakash Mani - Attur
Joined: Oct 08, 2009
May 23, 2011 04:28:54
I am trying to configure hbm2java for my sample hibernate project. When i am adding the task in build.xml and ran it getting the below error.
Buildfile: D:\Laboratory\myfirstorm\build.xml [hibernatetool] Executing Hibernate Tool with a Standard Configuration [hibernatetool] 1. task: hbm2java (Generates a set of .java files) [hibernatetool] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment). [hibernatetool] log4j:WARN Please initialize the log4j system properly. [hibernatetool] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files) [hibernatetool] To get the full stack trace run ant with -verbose [hibernatetool] org.hibernate.MappingNotFoundException: resource: edu/hib/pojo/Employee.orm.xml not found [hibernatetool] A resource located at edu/hib/pojo/Employee.orm.xml was not found. [hibernatetool] Check the following: [hibernatetool] [hibernatetool] 1) Is the spelling/casing correct ? [hibernatetool] 2) Is edu/hib/pojo/Employee.orm.xml available via the classpath ? [hibernatetool] 3) Does it actually exist ? BUILD FAILED D:\Laboratory\myfirstorm\build.xml:17: org.hibernate.MappingNotFoundException: resource: edu/hib/pojo/Employee.orm.xml not found Total time: 1 second
I have also checked the three points which
suggested... The file Employee.orm.xml actually exists in the specified directory.. can anybody help me on this ?
Joined: Jun 25, 2001
May 23, 2011 05:32:23
Is edu/hib/pojo/Employee.orm.xml available via the classpath?
It's not sufficient that the file exists. It has to exist in the classpath for hbm2java. That's because it isn't being read "as a file", but instead is being read via the classloader as a resource.
An IDE is no substitute for an Intelligent Developer.
subject: org.hibernate.MappingNotFoundException: resource: edu/hib/pojo/Employee.orm.xml not found
problem at using hibernate extension to build *java from *.hbm.xml
hibernate with HSQL db - Acquisition Attempt Failed Error
Hibernate with HSQLdb - SQLException requires collation in statement
hibernate, ant task, hbm2java, code generation and circular dendency?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015