Invalid property 'annotatedClasses' of bean class

在整合Hibernate和Spring时出现,Invalid property 'annotatedClasses' of bean class

<bean id="factory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
  <property name="dataSource" ref="myDataSource"></property>
  <property name="hibernateProperties">
   <props>
    <prop key="hibernate.dialect">
     org.hibernate.dialect.SQLServerDialect
    </prop>
   </props>
  </property>
  <property name="annotatedClasses">
   <list>
    <value>org.yinpan.hibernate.GuestBook</value>
   </list>
  </property>
 </bean>

<bean id="factory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  <property name="dataSource" ref="myDataSource"></property>
  <property name="hibernateProperties">
   <props>
    <prop key="hibernate.dialect">
     org.hibernate.dialect.SQLServerDialect
    </prop>
   </props>
  </property>
  <property name="mappingResources">
   <list>
    <value>org/yinpan/hibernate/GuestBook.hbm.xml</value>
   </list>
  </property>
 </bean>

上面只需要注意红色部分就行了

来自:http://blog.csdn.net/a9529lty/article/details/8480655

Invalid property 'annotatedClasses' of bean class的更多相关文章

  1. Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]

    linux中的JDK为JDK8,tomcat为tomcat8 加入dubbo.war包 启动报错! Caused by: org.springframework.beans.factory.BeanC ...

  2. Invalid property 'url' of bean class [com.mchange.v2.c3p0.ComboPooledDataSource]

    1.错误描述 INFO:2015-05-01 13:13:05[localhost-startStop-1] - Initializing c3p0-0.9.2.1 [built 20-March-2 ...

  3. Invalid property 'driver_class' of bean class

    1.错误描述 INFO:2015-05-01 13:06:07[localhost-startStop-1] - Initializing c3p0-0.9.2.1 [built 20-March-2 ...

  4. 使用springmvc时报错org.springframework.beans.NullValueInNestedPathException: Invalid property 'department' of bean class [com.atguigu.springmvc.crud.entities.Employee]:

    使用springmvc时报错 org.springframework.beans.NullValueInNestedPathException: Invalid property 'departmen ...

  5. Invalid property 'sentinels' of bean class redis spring 错误修改

    /* * Copyright 2014-2015 the original author or authors. * * Licensed under the Apache License, Vers ...

  6. Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException: Invalid property 'dataSource' of bean class [com.liuyang.jdbc.PersonDao]: No property 'dataSource

    这个错误是说我的启动失败了.这类问题要从配置文件中开始找原因,我用的是spring框架,所以我从application.中找的原因 然后对比路径,对比文件的命名和id,都没有问题,为什么会在启动的时候 ...

  7. Invalid property 'driverClassName' of bean class [com.mchange.v2.c3p0.ComboPooledDataSource]

    spring配置文件中配置c3p0错误,错误原因在于c3p0连接池与DBCP连接池在驱动.连接.数据库用户名这些属性名称的差别

  8. Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class

    查阅了资料原始JDK的问题.解决方法 1.重新安装JDK为1.7版本 2.修改配置 1.webx的依赖改为3.1.6版: <dependency> <groupId>com.a ...

  9. 使用jeesite org.springframework.beans.NotReadablePropertyException: Invalid property 'tfxqCmsAccount.id' of bean class

    一对多 对子表添加时在form表单 path="tfxqCmsAccount.id"页面报错,对比了下其他可行的,发现其自动生成的子类少了个构造方法 加上 public TfxqC ...

随机推荐

  1. Aspose.Cells相应操作及下载

    Aspose.Cells相应操作 1,上传 1.1 Workbook Workbook workBook = new Workbook(); 属性: 名称 值类型 说明 Colors Color[] ...

  2. 联想M4600 (110主板),安装正版win7 ,进入桌面后鼠标无法使用

    问题:联想M4600 (110主板),安装正版win7 ,进入桌面后鼠标无法使用 原因: 110主板和win7系统问题,具体网上查询 处理: 修改bios 中 “USB Virtual KBS Sup ...

  3. zip-tar

    1.zip 制作压缩文件 (1)格式:zip 压缩文件名 文件1 文件2... zip文件不能用cat查看 (2)选项: -r:用来压缩目录 2.unzip 解压缩文件 (1)格式:unzip 压缩文 ...

  4. 今日SGU 5.22

    SGU 296 题意:给你一个最多1000位的数,让你删除k位使得剩下的数最大 收获:贪心 #include<bits/stdc++.h> #define de(x) cout<&l ...

  5. 【Henu ACM Round#17 A】Simple Game

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 肯定是放在m-1或者m+1的. (m-1是左边的点都离a最近,而m+1则是右边的点都离他最近. 看看哪个更好就行 [代码] #inc ...

  6. Android 4.4 Fence在SurfaceFlinger中的应用

    网上关于android.fence的资料好少啊.差点儿没有,可是这个机制又在GUI系统中起着关键的数据,于是自己通读源代码和凝视.与大家分享下Fence究竟是怎么回事? Fence即栅栏.栅栏的角色与 ...

  7. zoj 2778 - Triangular N-Queens Problem

    题目:在三角形的棋盘上放n皇后问题. 分析:找规律题目.依照题目的输出,能够看出构造法则: 先填奇数,后填偶数.以下我们仅仅要证明这样的构造的存在性就可以. 解法:先给出集体构造方法,从(1.n-f( ...

  8. vue中关于prop

    组件之间的项目通信在vue中十分常见,父组件的数据传到子组件需要prop的支持,我们来看下prop 1.html的特性名大小写不敏感,浏览器会把所有大写字母解释为小写字母,使用dom模板时,使用等价的 ...

  9. 设计模式之禅——模板方法模式&钩子方法

    ** **板方法模式的定义: 定义一个操作的算法的框架,而将一些步骤延迟到子类中.使得子类可以不改变一个算法的框架即可重定义该算法的某些特定步骤. 例子:做一个简单的悍马车的模型 见UML图 一个抽象 ...

  10. Wget使用

    http://www.tuicool.com/articles/A7BRny wget / curl 是两个比较方便的测试http功能的命令行工具,大多数情况下,测试http功能主要是查看请求响应 头 ...