cglib是用来做动态生成字节码, 一般用在动态代理和反射上比较多.
你有这个包吗?看看有没有重复的?

解决方案 »

  1.   

    net.sf.cglib.core.CodeGenerationException 希望检查下hibernate 映射文件
      

  2.   

    如果你用的是sqlserver2000的话
    则需要commons-beanutils.jar(191KB)替换为commons-beanutils.jar(184KB)
    commons-beanutils.jar(184KB)这个在迅雷里就可以搜到
      

  3.   

    我用的MyEclipse6.0.0M1 + mysql 
    使用spring2.0和hibernate3.1出现以上异常.楼上各位的方法都试了,还是不行.更为使用Spring1.2和hibernate3.1后.一切正常.各位高手如果知道原因,请指教.
      

  4.   

    cglib换成最新版的再试试,应该就没问题了
      

  5.   

    这个错误: 
    Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: 应该是要在spring的xml文件中要加入这个吧:
    <!-- 配置sessionFactory -->
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    <property name="configLocation">
    <value>classpath:hibernate.cfg.xml</value>
    </property>
    </bean>
      

  6.   

    不一定需要有两种配置方法,除了引用hibernate配置文件外,spring可以自己new出hibernate配置config对象来,这个不是必须的