java.lang.IllegalStateException: Could not locate SessionFactory in JNDI

后端 未结 2 1483
鱼传尺愫
鱼传尺愫 2021-01-29 00:15

Good evening, i get the above exception when using Hibernate with JSF, i saw it many times in the past and the root cause was that like this

2条回答
  •  死守一世寂寞
    2021-01-29 00:39

    Sorry to necro this, but I thought that since this wasn't marked as answered perhaps it would be OK. Others may have fallen victim to the same pitfall as I.

    I recently ran into similar problems after merging some HBM's. Subsequently, I had issues regarding JNDI and sessionFactory look-up failures due to duplicate class mappings in the HBM files causing the JNDI/SessionFactory service to be unable to start up..

    So, as a start - make sure you are not declaring duplicate classes in your mapping files :)

    This may or may not be what someone looking at this question needs, but it was my issue :)

提交回复
热议问题