今天写hibernate时候遇到一些异常

代码:

出现异常情况:

出现以上原因是Session关闭

如果不是使用的SessionFactory.getSession()来获得Session。

而是使用SessionFactory.getCurrentSession()方法来获得Session时,当事务结束的时候,不管是提交还是回滚事务,hibernate会自动关闭Session的,

所以不需要手动关闭。

启动PL/SQL Developer 报字符编码不一致错误 Database character set (AL32UTF8) and Client character set (ZHS16GBK) are different. Character set conversion may cause unexpected results. Note: you can set the client的更多相关文章

  1. 启动PL/SQL Developer 报字符编码不一致错误,Database character set

    错误内容: Database character set (AL32UTF8) and Client character set (ZHS16GBK) are different. Character ...

  2. PL/SQL Developer报错 ORA-12154:tns:could not resolve the connect identifier specified

    PL/SQL Developer使用预先配置数据库报错 ORA-12154:tns:could not resolve the connect identifier specified. 情况描述:我 ...

  3. PL/SQL Developer 报错Dynamic Performance Tables not accessible, Automatic Statistics disabled for this session You can disable statistics in the preference menu, or obtain select priviliges on the V$ses

    可以从以下几个方面考虑: 1)单独给用户授动态性能视图的权限: SQL> grant select on V_session  to user; SQL> grant select on  ...

  4. PL SQL Developer报错框乱码

    在系统变量里设置 变量名:NLS_LANG 变量值设为:SIMPLIFIED CHINESE_CHINA.ZHS16GBK

  5. PL/SQL Developer去掉启动时自动弹出的Logon弹出框方法

    以前用PL/SQL Developer 7.0版本,最近升级到PL/SQL Developer 11.0版本,但每次启动PL/SQL Developer都会自动弹出Logon窗口,并且选中其中的登录历 ...

  6. PL/SQL Developer连接本地Oracle 11g 64位数据库和快捷键设置

    1.登录PL/SQL Developer 这里省略Oracle数据库和PL/SQL Developer的安装步骤,注意在安装PL/SQL Developer软件时,不要安装在Program Files ...

  7. PL/SQL Developer连接本地Oracle 11g 64位数据库

    转摘:http://www.cnblogs.com/ymj126/p/3712727.html 用于学习,笔记,以备后用. 1.登录PL/SQL Developer 这里省略Oracle数据库和PL/ ...

  8. pl/sql developer 连接本地ORACLE 11g 64位数据库

    1.登录PL/SQL Developer 这里省略Oracle数据库和PL/SQL Developer的安装步骤,注意在安装PL/SQL Developer软件时,不要安装在Program Files ...

  9. PL\SQL Developer连接本地Oracle 11g数据库

    1.登录PL/SQL Developer 这里省略Oracle数据库和PL/SQL Developer的安装步骤,注意在安装PL/SQL Developer软件时,不要安装在Program Files ...

随机推荐

  1. Excel取消保护密码

    Excel表被保护了, 如果没有密码, 可通过以下宏代码查看 (Office 2013已测) Option Explicit Public Sub AllInternalPasswords()' Br ...

  2. Careercup - Facebook面试题 - 5110993575215104

    2014-04-30 16:12 题目链接 原题: The beauty of a number X is the number of 1s in the binary representation ...

  3. Java 集合类(一)

    今天我们先讲一下Collection: Collection和Collections的区别: java.util.Collection是一种java集合接口,它提供了对集合对象的基本操作通用接口方法, ...

  4. Wireshark - ICMP 报文分析

    1. 测试机器,源 IP 地址为 10.21.28.110,目的 IP 地址为 10.6.0.24. 2. 使用 "ip.addr == 10.6.0.24 and icmp" 过 ...

  5. Notification用法

    String message = "You should click come back now. It is time out more than 10 minutes."; / ...

  6. sed 详解

    sed 详解 1.简介 sed是非交互式的编辑器.它不会修改文件,除非使用shell重定向来保存结果.默认情况下,所有的输出行都被打印到屏幕上. sed编辑器逐行处理文件(或输入),并将结果发送到屏幕 ...

  7. Oracle中的 UPDATE FROM 解决方法

    转:http://www.cnblogs.com/JasonLiao/archive/2009/12/23/1630895.html Oracle中的 UPDATE FROM 解决方法 在表的更新操作 ...

  8. OneAPM 技术公开课第二讲:开启性能为王的架构时代

    「OneAPM 技术公开课」由应用性能管理第一品牌 OneAPM 发起,内容面向 IT 开发和运维人员.云集技术牛人.知名架构师.实践专家共同探讨技术热点.继北京站第一场火爆上演之后,第二场将于9月1 ...

  9. php获取数组长度的方法(有实例)

    php获取数组长度的方法,php为我们提供了两个函数可以计算一维数组长度,如count,sizeof都可以直接统计数组长度,还有获取二维数组的方法. 在php中获取数组长度方法很简单,php为我们提供 ...

  10. django如何用orm增加manytomany关系字段(自定义表名)

    不自定义表名的,网上有现成的,但如果自定义之后,则要变通一下了. app_insert = App.objects.get(name=app_name) site_insert = Site.obje ...