Home > not found > hibernate cfg xml not found error

Hibernate Cfg Xml Not Found Error

Contents

here for a quick overview of the site Help Center Detailed answers to any questions you hibernate.cfg.xml not found eclipse might have Meta Discuss the workings and policies of this site hibernate.cfg.xml not found maven About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or org.hibernate.hibernateexception hibernate.cfg.xml not found eclipse posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of hibernate.cfg.xml not found in netbeans 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up hibernate.cfg.xml not found up vote 12 down vote favorite 2 I am new to Hibernate, reading this book "Java persistence with Hibernate" and I am trying to implement the example from there. So far my Ant

Caused By: Org.hibernate.hibernateexception: /hibernate.cfg.xml Not Found

build is successful, but when I try to execute the class containing the main method I am getting this error message: 19-Nov-2011 18:40:09 org.hibernate.cfg.Environment INFO: Hibernate 3.2.3 19-Nov-2011 18:40:09 org.hibernate.cfg.Environment INFO: hibernate.properties not found 19-Nov-2011 18:40:09 org.hibernate.cfg.Environment buildBytecodeProvider INFO: Bytecode provider name : cglib 19-Nov-2011 18:40:09 org.hibernate.cfg.Environment INFO: using JDK 1.4 java.sql.Timestamp handling 19-Nov-2011 18:40:09 org.hibernate.cfg.Configuration configure INFO: configuring from resource: /hibernate.cfg.xml 19-Nov-2011 18:40:09 org.hibernate.cfg.Configuration getConfigurationInputStream INFO: Configuration resource: /hibernate.cfg.xml Exception in thread "main" java.lang.ExceptionInInitializerError at persistence.HibernateUtil.(Unknown Source) at hello.Driver.main(Unknown Source) Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147) at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1405) at org.hibernate.cfg.Configuration.configure(Configuration.java:1427) at org.hibernate.cfg.Configuration.configure(Configuration.java:1414) ... 2 more It is clear that hibernate can't find my config file, which is located in the root dir. Project +lib +src +hello HelloWorld.java Message.java message.hbm.xml +persistence HibernateUtil.java build.xml hibernate.cfg.xml My the complete source code can be found here: http://pastebin.com/bGDUrxUf I have a running MySQL server with a database hibernateapp and table messages Thanks :) java hibernate share|impro

here for a

Hibernate.cfg.xml Not Found Maven Project

quick overview of the site Help Center Detailed org.hibernate.internal.util.config.configurationexception: could not locate cfg.xml resource answers to any questions you might have Meta Discuss the workings and policies mapping (resource) not found of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting http://stackoverflow.com/questions/8196370/hibernate-cfg-xml-not-found ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a http://stackoverflow.com/questions/19328614/src-hibernate-cfg-xml-not-found minute: Sign up src/hibernate.cfg.xml not found up vote 1 down vote favorite I am using hiberante 4. when I try to create my Factory connection I get this error. Testlog4j:WARN No appenders could be found for logger (org.jboss.logging). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Failed to create sessionFactory object.org.hibernate.HibernateException: src/hibernate.cfg.xml not found Test my hibernate.cfg.xml looks like this org.Postgresql.Driver jdbc:postgresql://localhost:5432/hibernatedb postgres test 1 org.hibernate.dialect.PostgreSQLDialect thread org.hibernate.cache.NoCacheProvider