`
waw
  • 浏览: 23940 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

Connection is read-only. Queries leading to data modification are not allowed

阅读更多

Connection is read-only. Queries leading to data modification are not allowed

 

1.检查事务配置

2.检查方法命名

 

检查在诸如 loadXXXX, queryXXX 的查询方法中,是否用了update,insert ,delete 数据的操作!

 

我的出错的地方是 方法名是 :loadXXXOrAddXXX()

 

事务配置xml如下

 

<tx:advice id="txAdvice" transaction-manager="transactionManager">
        <tx:attributes>
            <tx:method name="load*" read-only="true" />
            <tx:method name="find*" read-only="true" />
            <tx:method name="query*" read-only="true" />
            <tx:method name="select*" read-only="true" />
            <tx:method name="validate*" read-only="true" />
           
            <tx:method name="add*" propagation="REQUIRED"/>
            <tx:method name="insert*" propagation="REQUIRED"/>
            <tx:method name="create*" propagation="REQUIRED"/>
            <tx:method name="save*" propagation="REQUIRED"/>
            <tx:method name="update*" propagation="REQUIRED"/>
            <tx:method name="modify*" propagation="REQUIRED"/>
            <tx:method name="delete*" propagation="REQUIRED"/>
            <tx:method name="remove*" propagation="REQUIRED"/>
            <tx:method name="do*" propagation="REQUIRED"/>
            
            <tx:method name="*" propagation="SUPPORTS"
                rollback-for="Throwable" />
        </tx:attributes>
    </tx:advice>

 

 

就是这个 <tx:method name="load*" read-only="true" /> 
 匹配了

loadXXXOrAddXXX() 这个方法名,然后connection是 readonly的,所以无法做insert的操作!

 

坑爹了!!!!

 

 

 

 

 

 

分享到:
评论

相关推荐

    hibernate-shards.jar

    of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence ...

    wxPython2.8-win32-unicode-2.8.12.1-py27.exe

    wxPython is a GUI toolkit for the Python programming language. It allows Python ...Since the language is Python, wxPython programs are simple, easy to write and easy to understand. Here is an example.

    libuninameslist-20091231-8.el7.x64-86.rpm.tar.gz

    They are meant for RHEL or CentOS 7 systems and are not compatible with other Linux distributions without modification. It's important to note that the software package libuninameslist is designed ...

    最新的xwork-core-2.3.7.jar

    * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the ...

    mod header-3.1.27.zip

    在IT行业中,"mod"通常是"module"或"modification"的缩写,这可能是一个用于扩展或修改应用程序功能的组件。在这种情况下,“header”可能指的是HTTP头部,因为这是网络通信中非常重要的一部分,尤其是对于Web开发和...

    formatted-task034-winogrande-question-modification-object.json

    由于提供的文件信息标题、描述和标签均为"formatted-task034-winogrande-question-modification-object.json"和"微调",这表明文件本身可能是一个JSON格式的数据文件,标题和描述可能是指这个文件用于处理某种特定...

    scribe-2.1.tar.gz

    Scribe is a server for aggregating log data streamed in real ... It is designed to be scalable, extensible without client-side modification, and robust to failure of the network or any specific machine.

    gerrit-3.0.3.war

    Issue 11205: Allow Gerrit admins to reindex a change even when Read access is not allowed on its target branch. Extend the addMenuLink method in the PolyGerrit plugin API to allow plugins to specify ...

    hadoop-eclipse-plugin-2.7.3.jar

    Compiled from hadoop2x-eclipse-plugin with some modification. Ant version: 1.9.7. Hadoop version: 2.7.3. Tested on Eclipse Neon.1 Release(4.6.1)

    NIST SP800-52.pdf

    A message integrity service provides confirmation that data modification is always detected thus preventing undetected deletion, addition, or modification of data. An authentication service provides ...

    O-RAN.WG1.Slicing-Architecture-v05.00.pdf

    7. **标准化流程**:说明了O-RAN联盟的标准化流程,包括CR(Change Request)的处理,如RBBN.AO-2021.06.25-WG1-CR-0001-Annex-TN-Slicing-v06和JNPR-2021.05.31-WG1-CR-0004-O-RAN-Slicing-ONSSI-Modification-v02...

    geronimo-book.pdf

    - **License:** Geronimo is distributed under the Apache License, Version 2.0, which allows for free use and modification while preserving the rights of contributors. #### Why Another Application ...

    Black Hat Asia 2024 网络安全黑帽大会(脱敏)PPT汇总(34份).zip

    30、One Flip is All It Takes: Identifying Syscall-Guard Variables for Data-Only Attacks.pdf 31、How to Make Hugging Face to Hug Worms: Discovering and Exploiting Unsafe Pickle.loadsover Pre-Trained ...

    scribe-2.2.tar.gz

    scribe-2.2.tar.gz 下载地址: ... Scribe is a server for ... It is designed to be scalable, extensible without client-side modification, and robust to failure of the network or any specific machine.

    Senfore_DragDrop_v4.1

    IDataObject.GetData to be called before IDropTarget.Drop is called. ------------------------------------------- 5. Support and feedback: ------------------------------------------- Since these ...

    McGraw.Hill - Hacking.Linux.exposed

    and denial of service, modification of data and systems, and even extortion and hoaxes. Perhaps most tragically, they have undermined many users' enjoyment and confidence as they engage in computing...

    formatted-task035-winogrande-question-modification-person.json

    由于给定文件信息提供的内容极其有限,仅包括标题、描述和标签,而没有提供具体的文件内容,因此无法从这些信息中生成详细的知识点。要生成关于微调Winogrande任务修改问题的知识点,需要具体的文档内容,例如文件中...

    Automate 1.19-1063-1-19-0-1608574964.zip

    MOD全称是Modification,通常由玩家或第三方开发者制作,用于改变游戏的玩法、视觉效果、增加新功能或内容。因此,"Automate"可能是一个允许玩家自动化游戏内某些过程的工具,例如资源采集、建筑过程或角色行为。 ...

    NIST SP800-21.pdf

    Cryptography should be considered for data that is sensitive, has a high value, or is vulnerable to unauthorized disclosure or undetected modification during transmission or while in storage1....

    scribe-version-2.01.tar.gz

    Scribe is a server for aggregating log data streamed in real ... It is designed to be scalable, extensible without client-side modification, and robust to failure of the network or any specific machine.

Global site tag (gtag.js) - Google Analytics