2 hcrs2015 hcrs2015 于 2016.02.26 15:14 提问

Mysql做了主从配置之后,启动项目就出现异常了。提示Hibernate什么的,不知道这么回事

2016-02-25 13:38:51,353 [localhost-startStop-1] [test.ResourceBuilder] [INFO] - Hibernate operation: could not insert: [accessResources.BtnAndMenu]; uncategorized SQLException for SQL [insert into btn_and_menu (version, action, click, code, controller, icon, is_menu, label, link, parent_id, show_order, sys_type, title) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [HY000]; error code [1665]; Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.; nested exception is java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
2016-02-25 13:38:51,435 [localhost-startStop-1] [test.ResourceBuilder] [INFO] - [controller:orderSub, action:index, label:运营日志, dir:/images/icons/blueberry, img:logMgr.png, plugin:scaffolding]资源项初始化失败
2016-02-25 13:38:51,537 [localhost-startStop-1] [test.ResourceBuilder] [INFO] - [controller:orderSub, action:index, label:客户反馈, dir:/images/icons/blueberry, img:comment.png, plugin:scaffolding]资源项初始化失败
2016-02-25 13:38:51,636 [localhost-startStop-1] [test.ResourceBuilder] [INFO] - [controller:driverSignLog, action:index, label:车主签到, dir:/images/icons/blueberry, img:logMgr.png, plugin:scaffolding]资源项初始化失败
2016-02-25 13:38:51,707 [localhost-startStop-1] [org.hibernate.AssertionFailure] [ERROR] - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: null id in accessResources.BtnAndMenu entry (don't flush the Session after an exception occurs)
at org.grails.datastore.gorm.GormStaticApi$_methodMissing_closure2.doCall(GormStaticApi.groovy:101)
at test.ResourceBuilder$_btnConfigAnalyer_closure1.doCall(ResourceBuilder.groovy:21)
at test.ResourceBuilder.btnConfigAnalyer(ResourceBuilder.groovy:20)
at accessResources.BtnAndMenuService$_$tt__initFromController_closure5.doCall(BtnAndMenuService.groovy:87)
at accessResources.BtnAndMenuService.$tt__initFromController(BtnAndMenuService.groovy:83)
at RbacBootStrap$_closure1.doCall(RbacBootStrap.groovy:13)
at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:308)
at grails.util.Environment.executeForEnvironment(Environment.java:301)
at grails.util.Environment.executeForCurrentEnvironment(Environment.java:277)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2016-02-25 13:38:51,713 [localhost-startStop-1] [test.ResourceBuilder] [INFO] - null id in accessResources.BtnAndMenu entry (don't flush the Session after an exception occurs)
2016-02-25 13:38:51,717 [localhost-startStop-1] [org.hibernate.AssertionFailure] [ERROR] - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: null id in accessResources.BtnAndMenu entry (don't flush the Session after an exception occurs)
at org.grails.datastore.gorm.GormStaticApi$_methodMissing_closure2.doCall(GormStaticApi.groovy:101)
at test.ResourceBuilder$_btnConfigAnalyer_closure1.doCall(ResourceBuilder.groovy:21)
at test.ResourceBuilder.btnConfigAnalyer(ResourceBuilder.groovy:20)
at accessResources.BtnAndMenuService$_$tt__initFromController_closure5.doCall(BtnAndMenuService.groovy:87)
at accessResources.BtnAndMenuService.$tt__initFromController(BtnAndMenuService.groovy:83)
at RbacBootStrap$_closure1.doCall(RbacBootStrap.groovy:13)
at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:308)
at grails.util.Environment.executeForEnvironment(Environment.java:301)
at grails.util.Environment.executeForCurrentEnvironment(Environment.java:277)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2016-02-25 13:38:51,719 [localhost-startStop-1] [test.ResourceBuilder] [INFO] - null id in accessResources.BtnAndMenu entry (don't flush the Session after an exception occurs)
2016-02-25 13:38:51,722 [localhost-startStop-1] [org.hibernate.AssertionFailure] [ERROR] - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: null id in accessResources.BtnAndMenu entry (don't flush the Session after an exception occurs)
at org.grails.datastore.gorm.GormStaticApi$_methodMissing_closure2.doCall(GormStaticApi.groovy:101)
at test.ResourceBuilder$_btnConfigAnalyer_closure1.doCall(ResourceBuilder.groovy:21)
at test.ResourceBuilder.btnConfigAnalyer(ResourceBuilder.groovy:20)
at accessResources.BtnAndMenuService$_$tt__initFromController_closure5.doCall(BtnAndMenuService.groovy:87)
at accessResources.BtnAndMenuService.$tt__initFromController(BtnAndMenuService.groovy:83)
at RbacBootStrap$_closure1.doCall(RbacBootStrap.groovy:13)
at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:308)
at grails.util.Environment.executeForEnvironment(Environment.java:301)
at grails.util.Environment.executeForCurrentEnvironment(Environment.java:277)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)


3个回答

qq423399099
qq423399099   Ds   Rxr 2016.02.26 15:29

貌似是statement模式不足以应付应用,换成mixed试试看吧:

mysql> STOP SLAVE;
Query OK, 0 rows affected (0.02 sec)

mysql> SET GLOBAL binlog_format=MIXED;
Query OK, 0 rows affected (0.00 sec)

mysql> START SLAVE;
Query OK, 0 rows affected (0.00 sec)

但是这样只会一次性

为了永久生效,需要修改my.ini

Remove leading

to turn on a very important data integrity option: logging

changes to the binary log between backups.

log_bin = E:/mysql56/log_bin/log_bin.log

#relay_log = E:/mysql56/log_bin/relay_log.log

#read_only = 1

binary logging format - mixed recommended

binlog_format=mixed

qq423399099
qq423399099 也可以改成ROW模式试试 http://www.linuxidc.com/Linux/2014-04/99743.htm
2 年多之前 回复
nohaoye
nohaoye   2016.02.26 19:46
impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED

不是写得很详细么


http://blog.itpub.net/26855487/viewspace-775827/

http://stackoverflow.com/questions/33142095/impossible-to-write-to-binary-log-since-binlog-format-statement-and-at-least-o

Royal_lr
Royal_lr   Ds   Rxr 2016.02.26 19:56

mysql 不能随便做更改的,,

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
SSM里关于mysql主从配置代码层实现
关于一些书面的东西我就不多写了,直接贴代码 首先 在主从库各增加一个用户并赋予权限 grant select,insert,update,delete on *.* to 'work'@'%' identified by '123456' with grant option; 这里设置%是为了能允许远程访问 刷新权限 flush privileges; 以下三
mysql主从配置及常见错误(不断更新中)
Mysql5.6版本后修改的配置:(为网上搜索到的资源)http://www.iteye.com/news/26199 注意:主从之间的版本差别不要太大,主机若为5.6或以后,从机最好也是5.6或以后,版本比主机稍微大一点点没事。其他的情况还 没试过。 一、概述1、主从复制简介MySQL主从复制就是将一个MySQL实例(Master)中的数据实时复制到另一个MySQL实例(slave)中,而且
hibernate和struts2整合报错
23:06:54,848 ERROR Dispatcher:38 - Dispatcher initialization failed Unable to load configuration. - [unknown location] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(Configu
MySQL主从同步(一主一从配置、启动)
1、      在CS25上建立主文件夹           (1)         h  25;           (2)         在/home/work目录下,创建zhangzheng03文件夹;           (3)         在zhangzheng03文件夹中,建立如下两个文件夹:                            MySQL
Tomcat启动过程都干了啥
Tomcat是一个Web容器,用于接收HTTP请求并作出响应。我们都知道它是使用ServerSocket、Socket使用TCP链接达到通信的目的。但这个过程是如何做到的呢?我们在webapps下放的那些Web应用又是如何被监听起来的呢?配置webApp时有多种配置方式,如何正确的使用它们呢?web.xml为什么要那么配置呢,我们是否可以自定义一些元素呢?     这些都是接下来,我要研究的
docker搭建MySQL主从环境
从docker hub上下载最新的MySQL镜像,遵循如下步骤,即可利用docker构建MySQL主从环境。 1.运行主库容器 docker run --name mysql -p 33061:3306 -e MYSQL_ROOT_PASSWORD=root -v /Users/derrick.yang/mysql/data/:/var/lib/mysql/ -v /Users/derri
mysql安装以及启动小问题总结
1 安装 和往常一样安装mysql 5.6.24 发现安装过程出现错误代码2503  原因   安装权限不够 解决方案   一 1 在命令提示符里面选择 管理员身份运行  2 进入到你的mysql安装包路径下  3 输入mysql-5.6.24-winx64.msi(安装包的名字)回车就可以安装 二  详情请看http://jingyan.baidu.co
hibernate启动慢的其中一个原因
今天突然遇到一个问题,就是加了hibernate 框架的项目在启动的时候,特别慢,竟然达到了4分多钟,查来查去,看到我的bean类里*.hbm.xml,有这样的写法: "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> …… 然后我换成了: "http://hibernate.sourceforge.net/h
hibernate查询/更新多次操作无响应
在用hibernate4的时候,遇到查询操作反复执行,总是在执行到第九次的时候无响应,必须要重启tomcat才可以。 在网上查询了一下,有说session未正常关闭,有说要clear一下,还有说pojo类中的属性名和数据库表的列名不一致,各种说法都有 我也一一试过,然而并没有什么用------------------------------------ 然后    。
Windows10 Mysql主从配置
一、安装Mysql  1.本地首先需要搭建一套mysql,可以使用集成环境。  2.需要单独在搭建mysql,用来做主从复制  3.解压安装包 [mysql-5.6.24-win32.1432006610.zip] 4.配置 mysql环境变量 ( 修改PATH,添加 D:\MysqlServer5.6\bin ) 5. D:\MysqlServer5.6 目录