Loading a hibernate based runnable jar on ec2, I am suddenly getting a hibernate.cfg.xml not found exception.
233 [main] FATAL com.mcruiseon.server.hibernate.ReadOnlyOperations - Unable to create SessionFactory for Hibernate
233 [main] FATAL com.mcruiseon.server.hibernate.ReadOnlyOperations - ./hibernate.cfg.xml not found
234 [main] FATAL com.mcruiseon.server.hibernate.ReadOnlyOperations - org.hibernate.HibernateException: ./hibernate.cfg.xml not found
org.hibernate.HibernateException: ./hibernate.cfg.xml not found
at org.hibernate.internal.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:173)
at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1929)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1910)
Here is a snapshot of the folder containing the cfg.xml file.

I am trying to initialize hibernate using the following code snippet. It was working with just configure(), for some reason it just stopped working.
Configuration configuration = new Configuration().configure("./hibernate.cfg.xml");
sessionFactory = configuration.buildSessionFactory(new ServiceRegistryBuilder().buildServiceRegistry());
Edit : Even worse, I started getting a log4j issue now. I am just having a bad day.
INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@480457
Exception in thread "main" java.lang.NoSuchFieldError: TRACE
at org.jboss.logging.Log4jLogger.translate(Log4jLogger.java:58)
at org.jboss.logging.Log4jLogger.isEnabled(Log4jLogger.java:39)
at org.jboss.logging.Logger.tracev(Logger.java:197)
Root cause : When we move from Hibernate 3.5 to 4.0, we should not replace the jpa library from 3.5. I also had a clash in using incorrect log4j. I had to use a “under development” log4j 1.2.12, instead of 1.2.9 (stable) release to get this working. All in all upgrades are painful and give all kinds of crazy side effects.
Thankyou @Arham and @Raunak, you have been most useful. Good hints.