'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. birt 批改导出的文件名【转】

    birt 修改导出的文件名 birt 修改导出的文件名分两种实现方法, 第一种:修改 web.xml 中 配置的 BIRT_FILENAME_GENERATOR_CLASS <!-- Filen ...

  2. redhat的启动方式和执行次序

    rc.d的内容如下: init.d/ :各种服务器和程序的二进制文件存放目录. rcx.d/: 各个启动级别的执行程序连接目录.里头的东西都是指向init.d/的一些软连接.具体的后边叙述. 还有三个 ...

  3. scala目录

    1. 使用Scala(构建这样一个应用,它会取回一份列表,其中包括用户持有的股票的代码以及股份,并告知他们在当前日期为止的这些投资的总价.这包含了几件事:获取用户输入.读文件.解析数据.写文件.从We ...

  4. C# 中传递多个参数给多线程

    1.方式一:使用ParameterizedThreadStart委托 如果使用了ParameterizedThreadStart委托,线程的入口必须有一个object类型的参数,且返回类型为void. ...

  5. Golang学习 - unicode 包

    ------------------------------------------------------------ const ( MaxRune = '\U0010FFFF' // Unico ...

  6. 用PredicateBuilder实现Linq动态拼接查询

    在使用Linq查询的时候,特别是如果你在使用Entiry Framwork,有时会遇到动态查询的情况(客户的查询条件是不固定的拼接查询).我们能想到的第一方案应该是拼接SQL,的确这样是可以达到我们的 ...

  7. 512字节纠错1位的ECC校验码生成演示

    Flash型号: NandFlash型号:TC58NVG2S3ETA00 pagesize: 2KB oobsize  : 64B blocksize : 128K 关于ECC可以参考:http:// ...

  8. PowerDesigner 之 PDM建模

    很多码农使用Powerdesigner用来创建数据库,下面来具体记录一下使用该工具创建的过程. 1.首先运行PowerDesigner程序,进入主界面,如下图: 2.菜单栏依次"File→N ...

  9. C. Anya and Smartphone

    C. Anya and Smartphone time limit per test 1 second memory limit per test 256 megabytes input standa ...

  10. 1.4.10 Schemaless模式

    Schemaless模式 schemaless模式是一组solr功能的集合,允许用户通过简单的索引例子数据快速构建一个有效的schema,而不需要手动的编辑schema.这些solr功能都是在solr ...