`

Write operations are not allowed in read-only mode (FlushMode.MANUAL):错误

 
阅读更多
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增加<param-name>singleSession</param-name>参数值

<filter>
		<filter-name>hibernateFilter</filter-name>
		<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
		<init-param>
			<param-name>singleSession</param-name>
			<param-value>false</param-value>
		</init-param>
	</filter>

分享到:
评论

相关推荐

    使用Spring引起的错误

    ### 使用Spring引起的错误:Write operations are not allowed in read-only mode (FlushMode.NEVER) #### 问题背景 在使用Spring框架时,特别是在与Hibernate结合的情况下,可能会遇到“Write operations are not...

    cors-filter-1.7.jar,cors-filter-2.5.jar,cors-filter-2.10.jar

    &lt;param-name&gt;cors.allowed.origins&lt;/param-name&gt; &lt;param-value&gt;*&lt;/param-value&gt; &lt;/init-param&gt; &lt;init-param&gt; &lt;param-name&gt;cors.allowed.methods&lt;/param-name&gt; &lt;param-value&gt;GET,POST,HEAD,OPTIONS&lt;/param-...

    QT 下载:Download from your IP address is not allowed

    Download from your IP address is not allowed 百度网盘永久连接: QT下载: qt-opensource-linux-x64-5.8.0.run: 链接:https://pan.baidu.com/s/1sQ3tqPaWdDnmhBYAc_XR7g qt-opensource-linux-x64-5.13.1....

    cors-filter-1.7.jar,java-property-utils-1.9.jar

    &lt;param-name&gt;cors.allowed.origins&lt;/param-name&gt; &lt;param-value&gt;*&lt;/param-value&gt; &lt;/init-param&gt; &lt;init-param&gt; &lt;param-name&gt;cors.allowed.methods&lt;/param-name&gt; &lt;param-value&gt;GET,POST,HEAD,OPTIONS,PUT,DELETE...

    Tomcat解决跨域的两个jar包java-property-utils-1.9.jar和cors-filter-1.7.jar

    allowed.headers=Content-Type, Authorization, X-Requested-With allow.credentials=true exposed.headers=X-Total-Count, X-Custom-Header ``` 这里,`allowed.origins`指定了允许跨域的源,`allowed.methods...

    net55-r8168-8.045a-napi.x86_64.rar

    2015-01-16: Version 8.039.01: Changed driver code to not use IP checksum hardware offload (caused various issues with networking in VMs) 2015-01-05: Version 8.039.00: Original version

    springmodules-cache.xsd&springmodules-ehcache.xsd.rar

    错误提示: cvc-complex-type.2.4.a: Invalid content was found starting with element 'page-encoding'. One of '{"http:// java.sun.com/xml/ns/javaee":include-prelude, ...

    cors-filter-1.7.jar spring解决跨域问题 java

    String allowedOrigins = props.getProperty("cors.allowed.origins"); ``` 总结: Spring框架提供了多种解决跨域问题的方法,包括注解和过滤器。`cors-filter-1.7.jar`是一个非Spring的CORS过滤器,可以单独或与...

    hibernate错误解决方案

    org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly' marker ...

    解决Tomcat跨域的jar包,java-property-utils-1.9.jar

    &lt;param-name&gt;cors.allowed.origins&lt;/param-name&gt; &lt;param-value&gt;*&lt;/param-value&gt; &lt;/init-param&gt; &lt;!-- 更多配置选项,如:允许的HTTP方法、允许的头部、是否允许证书等 --&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;...

    net-e1000e-3.1.0.2-glr2.x86_64.rar

    Requires MaintMode Live Install Allowed Live Remove Allowed Stateless Ready Overlay Yes No No Yes No Additional links Related VMware Forum's post Package updated to include missing device IDs 1502...

    sciter-sdk-4.0.0.7

    NOTE: Windows executables in SDK are not signed so you may encounter security warnings on W8 and W10. On MacOS you may need to run SDK executables directly from console as they are not signed too.

    ZK 6.5.0 Configuration Reference

    - **org.zkoss.zk.ui.input.grouping.allowed**: 控制是否允许分组输入。 - **org.zkoss.zk.ui.macro.autoforward.disabled**: 控制是否禁用宏自动转发。 - **org.zkoss.zk.ui.macro.autowire.disabled**: 控制是否...

    HTTP错误大全

    **405 Method Not Allowed** - 请求行中指定的方法不被允许使用于请求相应的资源。 **406 Not Acceptable** - 服务器生成的响应没有满足客户端的MIME类型需求。 **407 Proxy Authentication Required** - 和401...

    webgoat-standalone-7.1-SNAPSHOT-exec.jar

    Prerequisites: Java VM 1.8 Open a command shell/window, browse to where you ...Using the --help option will show the allowed command line arguments. 更多查看: https://github.com/WebGoat/WebGoat

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    When True then in ftmPanning mode will be shown only cached image of the initial client area. All parts outside will paints of the TFlexPanel.Brush. When returning from ftmPanning mode the complete ...

    IBM MQ错误码大全

    ### IBM MQ错误码详解 IBM MQ 是一种消息中间件,用于在分布式应用程序之间发送消息。在使用 IBM MQ 过程中,可能会遇到各种错误码,这些错误码有助于开发者快速定位问题并进行解决。本文将详细介绍部分 IBM MQ ...

    sciter-sdk-4.0.3.5348

    NOTE: sciter.dlls, sciter.exe and notes.exe Windows executables in SDK are digitally signed now. On MacOS you may need to run SDK executables directly from console as they are not signed too.

    PyPI 官网下载 | aws-cdk.aws-cloudfront-origins-1.97.0.tar.gz

    "allowed_methods": cloudfront.AllowedMethods.ALLOW_ALL, "cached_methods": cloudfront.CachedMethods.CACHE_GET_HEAD_OPTIONS, "default_ttl": core.Duration.minutes(5), }, ) ``` 在上面的例子中,我们...

    nrpe-2.15.tar.gz

    4. **config.h.in** - 配置头文件模板,用于编译时生成`config.h`。 5. **Makefile.am** - Automake配置文件,用于构建过程。 6. **configure** - 自动配置脚本,帮助用户为特定环境设置编译选项。 7. **scripts** -...

Global site tag (gtag.js) - Google Analytics