WSO2 App Store 在尝试针对 mysql 保存用户应用程序时抛出错误 [英] WSO2 App Store throws error when attempting to save a users Application against mysql

查看:57
本文介绍了WSO2 App Store 在尝试针对 mysql 保存用户应用程序时抛出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试创建或编辑应用程序时,API Store 抛出错误

API Store is throwing errors when I try to create or edit an application

java.sql.SQLException: Can't call commit when autocommit=true

我已经添加了设置

init-command='set autocommit=0'

到 my.cnf 文件

to the my.cnf file

我还添加了标志:

?relaxAutoCommit=true

到连接字符串但无济于事.我继续收到此错误.

to the connection string but to no avail. I continue to get this error.

我对 WSO2_CARBON_DB 和 WSO2AM_DB 使用相同的 mysql 数据库,而且我有一个发布者节点和两个单独的存储节点都指向同一个 mysql 数据源.

I am using the same mysql database for both the WSO2_CARBON_DB and teh WSO2AM_DB plus I have a single publisher node and two separate store nodes all pointing to the same mysql datasource.

我注意到应用程序编辑已保存(或新应用程序已创建),但控制台中仍抛出异常,并且用户界面中出现错误消息(根据此问题顶部的错误).

I notice the application edit is saved (or the new application is created) but the exception is still thrown in the console and an error message appears in the user interface (as per the error at the top of this question).

我必须在 WSO2 conf 文件中进行一些其他设置才能使其正常工作吗?

Is there some other setting, within the WSO2 conf files that I have to tweak in order to get this to work properly?

推荐答案

autoReconnectrelaxAutoCommit 标志添加到您在 <代码>master-datasources.xml 文件.这将解决您的问题.

Add both autoReconnect and relaxAutoCommit flags to the jdbc url of your defined "WSO2AM_DB" datasource in master-datasources.xml file. This will resolve your issue.

<configuration>

<url>jdbc:mysql://localhost:3306/AM_DB?autoReconnect=true&amp;relaxAutoCommit=true</url>

<username>xxxx</username>

<;password>xxxxx</password>

我更新了 url 以反映转义 & 符号的正确语法.

I updated the url to reflect the correct syntax for escaping the ampersand.

这篇关于WSO2 App Store 在尝试针对 mysql 保存用户应用程序时抛出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆