有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

hibernate Java Netbeans BeanCreationException

我正在尝试在glassfish上部署NetBeansJavaEE项目(maven+hibernate+JSF)

我得到下面的错误。我的数据库配置正常(通过几个应用程序进行了双重检查),数据库本身也正常且在线

SEVERE: WebModule[/web-0.1-SNAPSHOT]PWC1275: 
  Exception sending context initialized event to listener
  instance of class org.springframework.web.context.ContextLoaderListener 
  org.springframework.beans.factory.BeanCreationException: Error creating bean with
  name 'txManager' defined in ServletContext resource 
  [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed;
  nested exception is java.lang.IllegalArgumentException: 
      Property 'sessionFactory' is required

共 (2) 个答案

  1. # 1 楼答案

    看起来您需要在applicationContext中定义sessionFactory。xml。有关更多详细信息,请参见此forum post

  2. # 2 楼答案

    我通过在glassfish属性中设置正确的java可执行文件解决了这个问题。我需要帮助