unknown Oracle major version [11]

今天练习搭建SSH时,出现一个这样的错误:Error creating bean with name 'sessionFactory' defined in file [C:\Users\Workspaces\MyEclipse 8.x Latest\.metadata\.me_tcat\webapps\PetShop\WEB-INF\classes\applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: unknown Oracle major version [11]

首先看到这个异常信息,就会明白,hibernate不认识Oracle 11g。这并不是说hibernate就不支持Oracle 11g,而是需要在hibernate的配置文件hibernate.cfg.xml中加入:
<property name="dialect">
    org.hibernate.dialect.OracleDialect
</property>

你可能感兴趣的:(version)