这个异常我在网上查看了很多资料,一般都说是hibernate的session问题,让重新两个方法,但是我以前用的时候没问题啊,所以一直找问题,终于这个bug让我找到了,就是因为我插入操作的时候用的是别的实体类的service层,而且插入的实体类也没有写业务层Service和Dao层,然后就用实体类service的父层,就是BaseService(方法都在里面封装的),利用它条用save方法进行保存,写了service层和dao层,结果就好了。。。

Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn的更多相关文章

  1. Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

    Struts Problem Report Struts has detected an unhandled exception: Messages: Write operations are not ...

  2. spring整合问题分析之-Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

    1.异常分析 Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into ...

  3. 增删改查 报异常org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readO

    可能是Spring配置文件 事务通知里面的方法  与实际方法不匹配 <tx:advice id="advice" transaction-manager="tran ...

  4. ssh中的 Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

    这个错误我整理了  半天才发现问题的存在. 尝试了网上的很多办法,但是最后都没有达到效果. 包括这两种: 第一种: web.xml种的配置 <filter> <filter-name ...

  5. ssh整合思想 Spring分模块开发 crud参数传递 解决HTTP Status 500 - Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or(增加事务)

    在Spring核心配置文件中没有增加事务方法,导致以上问题 Action类UserAction package com.swift.action; import com.opensymphony.xw ...

  6. HTTP Status 500 - Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

    如果在service类上面没有添加注解,出现异常 @Transactional

  7. spring整合之后运行报什么只读错误。Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

    解决办法, 再大dao的实现类上添加注解: @Transactional(readOnly = false ) 不让它只读就行了

  8. hibernate框架学习错误集锦-org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL)

    最近学习ssh框架,总是出现这问题,后查证是没有开启事务. 如果采用注解方式,直接在业务层加@Transactional 并引入import org.springframework.transacti ...

  9. Write operations are not allowed in read-only mode (FlushMode.MANUAL)

    © 版权声明:本文为博主原创文章,转载请注明出处 1.问题描述 搭建SSH框架后,为测试事务配置是否生效,因此在事务配置中取消了保存方法,然后再保存方法中手动抛出异常(已测试配置事务后没有保存成功), ...

随机推荐

  1. 在windows下,git webhook使用php拉取代码的学习总结

    原来上传代码到测试服务器都是用ftp,我觉得这种方式很低效,而且容易出错,比如忘记传某个修改过文件. 现在项目的代码放在了git@osc上了,想使用他webhook,每当有push的时候,git@os ...

  2. 收MUD巫师学徒,MUD开发,LPC语言开发

    收MUD巫师学徒,MUD开发,LPC语言开发 对这个有兴趣的联系我,签订协议  Q 184377367

  3. 【转】基于RSA算法实现软件注册码原理初讨

    1 前言 目前,商用软件和共享软件绝大部份都是采用注册码授权的方式来保证软件本身不被盗用,以保证自身的利益.尽管很多常用的许多软件系统的某些版本已经被别人破解,但对于软件特殊行业而言,注册码授权的方式 ...

  4. ORM和Core

    .net  core中有哪些被抛弃的类 1.DataTable DataRow SqlDataAdapter DataRow DataColumn DataColumn 虽然这些类不是我ORM核心功能 ...

  5. Hibernate摘记

    原理: 1.通过Configuration().configure();读取并解析hibernate.cfg.xml配置文件2.由hibernate.cfg.xml中的<mapping reso ...

  6. 单个H扩展到多个H时,机器学习的保证

    1.差的数据集的概念BAD D 单个H,在抽出的样本(数据集上),满足 $P(|E_{in}-E_{out}|>\epsilon)\leq 2e^{-2\epsilon^2N}$ 考虑以下情况, ...

  7. Aix 文件名补齐及aix6.1 bash安装

    Aix历史查询快捷键=>按ESC+k 设置KSH的自动补全(仅仅是文件名补全,没有命令补全)和历史命令功能 方法一: set -o vi 历史命令功能(esc -,esc +)自动补全文件名(e ...

  8. 图片的像素和Android的dp值之间的关系。

    这是一个困扰我很就得问题.今天在我的反复摸索下,总结出了一些个规律. 以下测试以魅族mx5为例. 手机参数:5.5英寸:高:1920:宽1080. /** * 获得屏幕的宽度 * * @param c ...

  9. javascript实现倒计时

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  10. L6 Shell

    写出以下shell脚本1 判定一个用参数指定的文件是否为可执行,如果不是,则改为可执行#!/bin/bash if [ -x $1 ]then echo "OK"else echo ...