hibernate - Getting ExceptionInInitializerError when loading mapping for a resource -


intro:

i've started java web, using jsf 2.2 (mojarra), slf4j logging framework, , implemented simple example called guess number.

i've expanded include database hands on jdbc.
database, i've inserted valid numbers numberdao (not bean of facelet) checks see if guess correct.

i've added new facelet allows user insert new valid number database (using numberdao class).

up now, worked fine.


what need , have done already:

the thing now, want integrate hibernate (version: 4.2).
configuration.

and this mapping resource (numberendity simple pojo created intellij).

this line static code block of numberdao class:
session = hibernateutil.getsessionfactory().getcurrentsession();

and hibernateutil class.


problems:

(edit: last output of hibernate - before errors occur:
2014-08-19 11:33:24 info hhh000221: reading mappings resource: guessnumber/models/numberentity.hbm.xml)

now, i'm getting these exceptions when i'm running (if mapping commented out, loads fine), during initialization phase:
firstly one: stack trace of 1st , 2nd exceptions

and lastly one: (which should related fact during initialization of numberdao there exception)
stacktrace shown @ facelet @ browser, well


i'm @ loss of figuring out how resolve error.
got to:

  1. finding when commenting out mapping @ hibernate.cfg.xml error won't occur
  2. the error occurs in configuration.configure(); of hibernateutil.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -