Coder Social home page Coder Social logo

Comments (4)

christianpoitras avatar christianpoitras commented on August 25, 2024 1

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.

KING754 avatar KING754 commented on August 25, 2024

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.

KING754 avatar KING754 commented on August 25, 2024

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.

KING754 avatar KING754 commented on August 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.