1. Caused by: org.hibernate.cache.NoCacheRegionFactoryAvailableException: Second-level cache is used in the application, but property hibernate.cache.region.factory_class is not given, please either disable second
 level cache or set correct region factory class name to property hibernate.cache.region.factory_class (and make sure the second level cache provider, hibernate-infinispan, for example, is available in the classpath).

原因在于hibernate4.0在hibernate.cfg.xml配置二级缓存和hibernate3.3有所不同,本样例用的是 Hibernate-core.4.3.6.Final。实际上从4.0開始就不一样。二级缓存的配置对照方下所看到的:

4.0以上配置例如以下:

<property name="hibernate.cache.use_second_level_cache">true</property>

<property name="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</property>

3.3配置例如以下:

<property name="hibernate.cache.use_second_level_cache">true</property>

<property name="cache.provider_class ">org.hibernate.cache.EhCacheProvider</property>

可是假设不过改动上述配置的话,还是会出错。由于要使用二级缓存的话。还须要引用对应的jar包,即hibernate-release-4.3.6.Final\lib\optional\ehcache下的jar包也要复制到lib中。否则会出现Unable to create requested service [org.hibernate.cache.spi.RegionFactory]的错误。

2.nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'attendTypeDao' is defined

这个错误提示非常明显:未定义对应的bean,细致察看之后发现原来是自己太粗心。在定义bean时将"attendTypeDao"写成了"attentTypeDao"导致

3.错误

!MESSAGE Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.

改动 workspace\.metadata\.plugins\org.eclipse.wst.server.core\servers.xml文件。

<servers>

<server hostname="localhost" id="JBoss v5.0 at localhost" name="JBoss v5.0
at

localhost" runtime-id="JBoss v5.0" server-type="org.eclipse.jst.server.generic.jboss5"

server-type-id="org.eclipse.jst.server.generic.jboss5" start-timeout="1000" stop-

timeout="15" timestamp="0">

<map jndiPort="1099" key="generic_server_instance_properties" port="8090"

serverAddress="127.0.0.1" serverConfig="default"/>

</server>

</servers>

把 start-timeout="45" 改为 start-timeout="100" 或者更长.

就酱紫,最终部署成功了。可是实际部署时每一个人遇到的问题可能都会有所不同。按它的出错提示信息细致分析一般都能够找到原因。

Hibernate4.3.6 Final+Spring3.0.5配置出错提示及解决方法的更多相关文章

  1. 【系统Configmachine.config与自己的应用程序的App.config/Web.Config配置节点重复】解决方法

    自己的应用程序的App.config或Web.Config文件中与系统的C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Configmachine.co ...

  2. IIS6.0服务器搭建网站无法访问解决方法

    IIS6.0服务器搭建网站无法访问解决方法     IIS6.0服务器搭建网站无法访问解决方法很多朋友在用IIS6架网站的时候遇到不少问题,而这些问题有些在过去的IIS5里面就遇到过,有些是新出来的, ...

  3. 总结关于Ubuntu 安装 Docker 配置相关问题及解决方法

    总结关于Ubuntu 安装 Docker 配置相关问题及解决方法 Tomcat 示例 软件镜像(xx安装程序)----运行镜像----产生一个容器(正在运行的软件,运行的xx): 步骤: 1.搜索镜像 ...

  4. CentOS下php使用127.0.0.1不能连接mysql的解决方法

    这篇文章主要介绍了CentOS下php使用127.0.0.1不能连接mysql的解决方法,本文原因是SELINUX导致的连接失败,需要的朋友可以参考下 php代码很简单: 复制代码代码如下: $ser ...

  5. error at ::0 can't find referenced pointcut...解决方法

    error at ::0 can't find referenced pointcut...解决方法 学习了:http://dyldragon.iteye.com/blog/512612 升级aspe ...

  6. mysql(8.0连接navicat发生的错误解决方法)

    关于mysql(8.0连接navicat发生的错误解决方法)数据库安装图形化界面无法更改加密的方式导致无法连接问题为解决; Alter user 'root'@'localhost' identifi ...

  7. Android 8.0 的部分坑及对应解决方法

    虽然 Android 9.0 都已经面世了,本篇文章写的有点迟了. 但是迟到好过不到,因此基于此这边还是记录一下项目中遇到的 Android 8.0 的坑及对应解决方法. 每次系统升级,虽然系统功能更 ...

  8. uiautomatorviewer 出现安卓8.0级以上无法打开的解决方法

    一..本人在使用Android自带的uiautomatorviewer工具来进行app元素定位时,出现了Android 9.0打开不了.出现了如下图错误提示: 经过网上的查阅,总结了几个解决的方法. ...

  9. vs2012运行项目报未能加载文件或程序集“System.Web.Mvc, Version=4.0.0.1,Culture=neutral”问题和解决方法

    原先本地项目版本(4.0.0.1)高于服务器版本(4.0.0.0),本地项目改成服务器版本4.0.0.0时,发布后的项目报这个错误

随机推荐

  1. Moscow Pre-Finals Workshop 2016. Japanese School OI Team Selection. 套题详细解题报告

    写在前面 谨以此篇题解致敬出题人! 真的期盼国内也能多出现一些这样质量的比赛啊.9道题中,没有一道凑数的题目,更没有码农题,任何一题拿出来都是为数不多的好题.可以说是这一年打过的题目质量最棒的五场比赛 ...

  2. WS-*协议栈及相关概念

    1. 什么是WS-Security? WS-Security 是一个 SOAP 的扩展,它提供了对 SOAP 消息的认证和加密. 在介绍 WS-Security 之前,我们有必要了解一下 WS-Sec ...

  3. 使用docker-maven-plugin插件构建docker镜像(已过时)

    可以参考博客:https://blog.csdn.net/aixiaoyang168/article/details/77453974 docker-maven-plugin官网推荐在新项目中使用do ...

  4. JavaScript计算字符串中包含几个给定字符

    原文发布时间为:2009-05-04 -- 来源于本人的百度文章 [由搬家工具导入] 下面以 逗号 为例子: <html> <head><title>JavaScr ...

  5. datalist、repearter、gridview显示行号的三种方法 或者是获取datalist行id

    原文发布时间为:2009-05-06 -- 来源于本人的百度文章 [由搬家工具导入] 1. if you are using SQL Server, try select identity(int,1 ...

  6. 【git】把本地项目和远程git仓库相连通

    1. 打开在你的项目文件夹,输入下面的命令 git init 输完上面的命令,文件夹中会出现一个.git文件夹,如下图所示,其他的的文件也会出现蓝色小问号的标志 2. 添加所有文件 git add . ...

  7. PE笔记之NT头PE扩展头

    typedef struct _IMAGE_OPTIONAL_HEADER {       //       // Standard fields.       //       WORD    Ma ...

  8. 《Linux命令行与shell脚本编程大全 第3版》Linux命令行---30

    以下为阅读<Linux命令行与shell脚本编程大全 第3版>的读书笔记,为了方便记录,特地与书的内容保持同步,特意做成一节一次随笔,特记录如下:

  9. usb 2.0 支援的速度

    from http://www.usb.org/developers/docs/usb20_docs/ high speed : 480 Mb/s full speed : 12 Mb/s low s ...

  10. pip源配置

    1.使用配置文件配置文件[global]trusted-host=mirrors.aliyun.comindex-url=http://mirrors.aliyun.com/pypi/simple/ ...