Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8716015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:58:41+00:00 2026-06-13T05:58:41+00:00

Loading a hibernate based runnable jar on ec2, I am suddenly getting a hibernate.cfg.xml

  • 0

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.
enter image description here

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)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:58:42+00:00Added an answer on June 13, 2026 at 5:58 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Hibernate's lazy loading, and am getting sessionFactory missing exception, even after
I am getting org.hibernate.LazyInitializationException: illegal access to loading collection in my JPA code -
Inspired by the lazy loading abilities of Hibernate I wanted to make the model
I am working on a web project that is Spring+Hibernate+MySQL based. I am stuck
I have a problem with lazy loading in hibernate when dealing with inheritance. I
Does Hibernate 4 bring any improvements regarding lazy loading? We are using Hibernate as
I'm trying to learn Spring+Hibernate and I started using Lazy loading with Hibernate. To
Are there any scenarios where usage of Hibernate's extra lazy loading can be dangerous?
does anyone know how to prevent hibernate from loading a collection or many-to-one assocation?
In hibernate as well as simple ORM strategy,i am normally loading all the values

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.