'hibernate.dialect' must be set when no Connection avalable

当连接不可用时,必须要设置Hibernate方言

搜索大多数的解决办法是:首先查看是否是数据库没启动,能不能正常连接上。启动数据库,正常连接就可以了。
 
当然我遇到的原因不是这个,因为我搭建的这个项目根本就没有用到数据库。
 
所有我就添加了一个MySQL方言,嘿,没想到这么着就成了:
 
 <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
</props>
</property>
</bean>

'hibernate.dialect' must be set when no Connection avalable的更多相关文章

  1. 'hibernate.dialect' must be set when no Connection avalable’

    一个错误'hibernate.dialect' must be set when no Connection avalable ‘ 网上也有不少人遇到这种问题,看上去好像是跟Hibernate的方言有 ...

  2. 正确决解Hibernate4.*中:Connection cannot be null when 'hibernate.dialect' not set

    <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hi ...

  3. Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set

    docs.jboss.org文档示例代码:(http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html_single/) sta ...

  4. Connection cannot be null when 'hibernate.dialect' not set

    严重: Exception sending context initialized event to listener instance of class [org.springframework.w ...

  5. &#39;hibernate.dialect&#39; must be set when no Connection available

    今天碰到的这个问题,非常无厘头.网上搜索了非常多.都不靠谱,还是靠自己 解决方法是在hibernate.cfg.xml中加入 <property name="dialect" ...

  6. 【方言】Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

    Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set 几种 方言配置差异 <?xml v ...

  7. Hibernate问题之'hibernate.dialect' not set

    继前文:Hibernate4中buildSessionFactory方法废弃问题.后 继续有问题.本来之前好好的项目,用了这种新的方法后发现问题. 出现  Connection cannot be n ...

  8. 【Hibernate】Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

    今天用hibernate框架写crm项目时遇到报错: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' n ...

  9. Hibernate SQL方言 (hibernate.dialect) Spring配置文件applicationContext.xml

    转自:http://www.cnblogs.com/wj-wangjun/archive/2009/10/21/1587624.html Hibernate SQL方言 (hibernate.dial ...

随机推荐

  1. iOS开发——UI篇Swift篇&玩转UItableView(四)自定义&封装

    UItableView自定义&封装 一:Model class AppsModel: NSObject { //定义模型的三个属性 var imageName:String! //图片名称 v ...

  2. Ogre Addon之Paged Geometry

    还是OGRE好啊,无尽的Addon,无尽的宝藏.既有SkyX,Hydrx这样的天空水体渲染库可供学习,还有Paged Geometry这样的“大规模海量geometry管理系统”.它通过batch,s ...

  3. because it is not a variable 编译错误解决方案

    1,将Stuct换为class 2,使用中间变量, 如Point p=new Point(x,y); this.Location=p; 而不能直接给struct赋值,因为值类型是不能改变的,必须生成新 ...

  4. Debian中编译内核

    转载: http://blog.163.com/libo_5/blog/static/156968520101016102051580/ http://hi.baidu.com/wg_wang/ite ...

  5. mybatis 关于 Parameter Maps collection does not contain value for

    当*mapper.XML 文件中出现任何错误,该xml文件都不能使用.也就是说不管出错的那个标签是不是你当前调用的,都会报错误 .Parameter Maps collection does not ...

  6. 虚拟机+ubuntu 图形界面和终端界面的切换

    虚拟机环境,在图形界面和文本界面间切换:1  VMWare虚拟机下,由图形界面切换到文本界面,和虚拟机设置有关,默认VM占用Ctrl+Alt为热键,所以由图形界面切换到文本界面的组合键为: Ctrl+ ...

  7. iOS 关于UIscrollView

    设置 滚动起始位置 [scrollView setContentOffset:CGPointMake(0, 0) animated:YES];

  8. mongodb 操作语句与sql操作语句对比

    上行:SQL 操作语句 下行:Mongo 操作语句 CREATE TABLE USERS (a Number, b Number) db.createCollection("mycoll&q ...

  9. Windows配置端口转发

    windows命令行下用netsh实现端口转发 微软Windows的netsh是一个命令行脚本实用工具.使用netsh工具 ,可以查看或更改本地计算机或远程计算机的网络配置.不仅可以在本地计算机上运行 ...

  10. C# 使用代码来操作 IIS

    由于需要维护网站的时候,可以自动将所有的站点HTTP重定向到指定的静态页面上. 要操作 IIS 主要使用到的是“Microsoft.Web.Administration.dll”. 该类库不可以在引用 ...