E
E
Evgeny Kolman2017-02-16 20:53:35
Java
Evgeny Kolman, 2017-02-16 20:53:35

Problem getting sessionFactory!?

The bottom line is this:
1. when the program starts, NPE pops up in the line "bookDao.addBook(book);" c89552901cf74f4a9a19c7b5c1839252.png
Here is the log: 3190c6f710bc4b9e87f40f1d9ae59590.png
2. following the link indicates that the error pops up in the line "session = HibernateUtil.getSessionFactory().openSession(); 10c12442f7c747e09445bfbc68afd70d.png"
3. here is the implementation of the method itself 594761b1b4bb4e748fd703be7611a318.png"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2017-02-16
@Evgeny_13

obviously, catch needs throw new ExceptionInInitializerError(). well, the exception there should not be suppressed, but thrown further

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question