codingapi / dubbo-lcn-demo Goto Github PK
View Code? Open in Web Editor NEWLCN分布式事务框架v4.0 dubbo-lcn-demo
Home Page: http://www.txlcn.org
LCN分布式事务框架v4.0 dubbo-lcn-demo
Home Page: http://www.txlcn.org
INFO relational.LCNStartConnection: rollback label
[05/12/18 04:23:44:044 CST] DubboServerHandler-192.168.17.113:20009-thread-2 DEBUG datasource.DataSourceTransactionManager: Could not reset JDBC Connection after transaction
java.sql.SQLException: connection holder is null
at com.alibaba.druid.pool.DruidPooledConnection.checkStateInternal(DruidPooledConnection.java:1157)
at com.alibaba.druid.pool.DruidPooledConnection.checkState(DruidPooledConnection.java:1148)
at com.alibaba.druid.pool.DruidPooledConnection.setAutoCommit(DruidPooledConnection.java:701)
at com.codingapi.tx.datasource.relational.LCNStartConnection.setAutoCommit(LCNStartConnection.java:199)
at org.springframework.jdbc.datasource.DataSourceTransactionManager.doCleanupAfterCompletion(DataSourceTransactionManager.java:374)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1007)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:878)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:812)
at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:551)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:298)
wiki中截图是在dubbo的jar包里面的,那改如何修改呢?
Could not publish to the server.
java.lang.IndexOutOfBoundsException
org.apache.http.impl.execchain.RetryExec 112 Retrying request to {}->http://127.0.0.1:8899
服务启动都正常,就是访问 http://127.0.0.1:8080/save 时候报/0的500,然后数据库还插入了mybatis_demo2一条数据。。。请问会是什么原因?
另外,我看这个demo模块里所有的service方法都没加TxTransaction注解,是不需要加吗(加了也没成功)
问题:jdbc版本的demo代码配置有问题;
问题描述:
1.applicationContext_db_mysql.xml中的lcnDataSourceProxy对象中并没有对应的dataSource成员变量,强制赋值,容器启动会提示(org.springframework.beans.NotWritablePropertyException: Invalid property 'dataSource' of bean class [com.codingapi.tx.datasource.relational.LCNTransactionDataSource]: Bean property 'dataSource' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?)
2.jdbcTemplate的dataSource成员变量赋值类型有问题,启动提示(java.lang.IllegalStateException: Cannot convert value of type 'com.codingapi.tx.datasource.relational.LCNTransactionDataSource' to required type 'javax.sql.DataSource' for property 'dataSource': no matching editors or conversion strategy found)
开发工具:intellij idea
开发环境:windows7
jdk版本:1.8
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.