Comments (4)
You are right that the exception could be more explicit. But I guess that most people are not using a custom module extending AbstractMyBatisModule
in addition to using a non-AOP Guice. Otherwise, this exception message improvement would have been reported sooner.
from guice.
i am found the exception,from there:
abstract class AbstractMyBatisModule extends AbstractModule
--->protected void bindTransactionInterceptors()
--->bindInterceptor(any(), not(SYNTHETIC).and(not(DECLARED_BY_OBJECT)).and(annotatedWith(Transactional.class)),interceptor);
before the exception,i watch about vars,
any() = any()
not(SYNTHETIC).and(not(DECLARED_BY_OBJECT)).and(annotatedWith(Transactional.class)) =
and(and(not(org.mybatis.guice.AbstractMyBatisModule$2@33ae7f61), not(org.mybatis.guice.AbstractMyBatisModule$1@52cd3c9)), annotatedWith(Transactional.class))
interceptor = org.mybatis.guice.transactional.TransactionalMethodInterceptor@7550004f
from guice.
sorry.i found reason.
because,my maven dependency a no aop guice.jar
com.google.inject
guice
4.2.0
no_aop
i am very foolish。
but, in the dubug work.i found,the codes no have catch or throws exception.
finally,tks with mybatis-guice. it very cool.
from guice.
haha,you are right.it is careless error.
i create a custom module extending AbstractMyBatisModule. main reason is the internalConfigure function about the reader code.i ovrride it:
"
File config = getConfig();
if (null == config) {
LOGGER.error("config file is null. mybatis-cfg.xml path={}", this.classPathResource);
}
reader = new BufferedReader(new InputStreamReader(new FileInputStream(config), "utf8"));
"
finally,thanks to you.i am go to bed.
from guice.
Related Issues (20)
- Allow TxTransactionalMethodInterceptor to commit the transaction on some exceptions
- Drop commons-dbcp 1 support
- Add commons-dbcp2 support HOT 2
- Drop bonecp support HOT 5
- Add support for HikariCP (as suggested replacement for bonecp) HOT 14
- @Transactional doesn't work when annotated on method HOT 3
- 配置多数据源的问题 HOT 1
- Transactional annotation doesn't work in Kotlin HOT 2
- Will @Transactional annotation work if I annoted it on class name? HOT 1
- Same Datasource having multiple mapper files -- Not an issue but need advice HOT 2
- dep for Guice v5 in 3.13? HOT 3
- jdk 11 release fails with issue on javadoc plugin getting javax.annotation.Nullable HOT 2
- I want to use failover mode and load balancing mode of MariaDB connector / j. HOT 12
- pmd asm conflict issues on site HOT 1
- java.lang.ClassNotFoundException: com.google.inject.AbstractModule not found by org.mybatis.mybatis-guice HOT 1
- Dependency Dashboard
- Add support for `jakarta.*` namespace HOT 7
- `JdbcHelper.MariaDB` no longer compatible with MariaDB Connector/J
- Support for multiple DataSources or Environment HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guice.