org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session f
来源:互联网 发布:平安科技 大数据应用 编辑:程序博客网 时间:2024/06/16 22:40
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nest
我在将web服务器(ssh框架编写+tomcat)上传到云服务器时,访问url报以上错误。
先说下如何在将web服务器上传到云服务器及其使用:
搭建云服务器及上传web服务器:
http://blog.csdn.net/zj420964597/article/details/78089979
linux下安装mysql:
http://blog.csdn.net/zj420964597/article/details/78089543
mysql修改密码:
http://blog.csdn.net/zj420964597/article/details/78244177
以上链接没说完整的地方,在这里进行补充:
1. 在云服务器(linux)下安装完mysql后,将mysql的数据库名(比如你设置的为:mydb)账号(root)、密码(你自己设置的)记住,然后在你写的web 服务器中(ssh框架),将db.properties下改为:
jdbc.user=root
jdbc.password=123456
jdbc.driverClass=com.mysql.jdbc.Driver
jdbc.jdbcUrl=jdbc:mysql://localhost:3306/mydb
jdbc.initPoolSize=5
jdbc.maxPoolSize=10
2. 将所有准备就绪,进行url测试,发现抛出问题
问题解决:
1. db.properties未改完,或者不小心加入了空格什么的,导致连接不上mysql
2.linux下未进行启动mysql
启动方式
1、使用 service 启动:
[root@localhost /]# service mysqld start (5.0版本是mysqld)
[root@szxdb etc]# service mysql start (5.5.7版本是mysql) 我输入的是该命令
2、使用 mysqld 脚本启动:
/etc/inint.d/mysqld start
3、使用 safe_mysqld 启动:
safe_mysqld&
- org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session f
- org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session
- org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session
- org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session
- org.springframework.transaction.CannotCreateTransactionException: Could not open
- org.springframework.transaction.CannotCreateTransactionException: Could not open
- org.springframework.transaction.CannotCreateTransactionException: Could not open
- org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for
- org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for
- org.springframework.transaction.CannotCreateTransactionException:
- Could not open Hibernate Session for transaction
- Could not open Hibernate Session for transaction
- Could not open Hibernate Session for transaction
- Could not open Hibernate Session for transaction
- Could not open Hibernate Session for transaction
- Could not open Hibernate Session for transaction;
- Could not open Hibernate Session for transaction
- Could not open Hibernate Session for transaction
- css3选择器
- python 接口自动化测试(三)
- 阿里云自研云数据库POLARDB_未来企业的数字化答案
- 利用递归实现折半查找
- 深入理解findViewById()
- org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session f
- 迷宫的实现
- typelayout+Xlistview
- Redis笔记(五)Redis的事务
- Echarts使用示例
- iOS开发-随机图片验证码
- Android接口回调机制
- 反射机制获取Class对象的三种方式
- 算法分析与设计——LeetCode Problem.16 3Sum Closest