配置ssh框架启动tomcat服务器报异常Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
在Spring中配置jdbc时,引用的是dbcp.jar包,在db.properties配置文件中,使用了之前的properties配置文件的用户名username(MySql用户名)
然后在启动服务器报了如下几个异常:
1、org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
2、Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
3、Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
applicationContext.xml配置文件
db.properties.xml配置文件
后来检查发现,在加载读取配置文件的标签中
<context:property-placeholder location="classpath:dataSource.properties" /> 少了一条属性system-properties-mode="FALLBACK",
系统默认为system-properties-mode="ENVIRONMENT" 意思就是从系统环境中去读取,把电脑名当做MySlq的用户名,修改之后运行成功。
配置ssh框架启动tomcat服务器报异常Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]的更多相关文章
- SpringBoot、Spring MVC报错:Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
出现问题的原因: jdbc配置不正确 解决方案: 1.检查是否已添加数据库驱动jar包 2.检查数据库服务是否启动 3.检查数据库配置文件 主要为:dialect,driver_class,url,u ...
- 启动Tomcat服务器报错
启动Tomcat服务器报错: Several ports (8005, 8080, 8009) required by Tomcat v5.5 Server at localhost are alre ...
- python paramiko ssh.exec_command()启动tomcat服务器应用进程失败问题解决方法- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this progr
问题说明:
- 部署war包后,新增tomcat服务器,启动tomcat服务器报错解决方法
导入Maven工程后,新增tomcat服务器,启动服务器后,报如下错误: 使用http访问页面的时候报如下错误: 经过百度后,有一种方法可以解决: 在eclipse tomcat无法启动,无法访问to ...
- IntelliJ IDEA 启动tomcat服务器报Error running 'Unnamed': Address localhost:1099 is already in use错误的问题
在使用Intellij IDEA运行web项目时,出现 :Error running Tomcat8: Address localhost:1099 is already in use,使其web项目 ...
- 关于javaweb 项目 ssm框架 启动tomcat服务器同时启动一个socket服务
1.创建监听类 import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax. ...
- 启动Tomcat服务器报错: Several ports (8005, 8080, 8009) required
错误记录--更改tomcat端口号方法,Several ports (8005, 8080, 8009) http://blog.csdn.net/xinxin19881112/article/det ...
- war包部署在tomcat下,使用windows service服务方式启动tomcat服务器,在包含调用dll的模块,报dll找不到问题的解决办法
问题描述: 开发了一个需要调用dll的java web程序,在idea开发环境下运行调试没问题,可以正常运行,在tomcat/bin下,运行批处理startup.bat,启动tomcat服务器,也可以 ...
- IDEA启动Tomcat服务器时某些端口(如1099端口)被占用的解决办法
启动Tomcat服务器时,出现1099端口被其它进程占用了解决办法: 1.找出占用1099端口的进程,进入windows命令,查看什么进程占用了1099端口,使用命令:netstat -aon|fin ...
随机推荐
- CSS盒模型深入理解
前言 所有文档元素都生成一个矩形框,这称为元素框(element box),它描述了一个元素在文档布局中所占的空间大小.而且,每个框影响着其他元素框的位置和大小 宽高 宽度width被定义为从左内边界 ...
- nginx反向代理-解决前端跨域问题
1.定义 跨域是指a页面想获取b页面资源,如果a.b页面的协议.域名.端口.子域名不同,所进行的访问行动都是跨域的,而浏览器为了安全问题一般都限制了跨域访问,也就是不允许跨域请求资源.注意:跨域限制访 ...
- [物理学与PDEs]第2章第2节 粘性流体力学方程组 2.6 一维粘性热传导流体动力学方程组
一维粘性热传导流体动力学方程组: $$\beex \bea \cfrac{\p\rho}{\p t}+\cfrac{\p }{\p x}(\rho u)&=0,\\ \cfrac{\p u}{ ...
- 在Windows上安装Arduino-IDE
Arduino IDE的官方下载地址为:http://arduino.cc/en/Main/Software 也可以从我的网盘下载:win系统 1.8.9版本 链接:https://pan.baidu ...
- spring+springMVC+mybatis简单整合
spring+springMVC+mybatis简单整合, springMVC框架是spring的子项目,所以框架的整合方式为,spring+Mybatis或springMVC+mybatis. 三大 ...
- 两个Html页面之间值得传递
传值的页面:<a href='stockProductInfo.html?prdId="+v.prdID+"' target='_blank'></html> ...
- Python Day2 (二)
字典的操作: 见连接: http://www.cnblogs.com/alex3714/articles/5717620.html 第二天作业,修改haproxy配置文件. 程序练习 程序1: 实现简 ...
- 在deepin 15.5中安装vs code并配置c/c++环境
原文地址:https://blog.csdn.net/DefetC/article/details/79946100 参考了以下几篇文章: https://www.zhihu.com/question ...
- Active information gathering-services enumeration
1.Summaize the book Practical Web Penetration Testing first nmap tools is important for gather in ...
- delete web server(nginx+apache)
#!/bin/bash conf_dir1="/usr/local/nginx/conf/vhost.d" conf_dir2="/usr/local/apache2/c ...