Mlgbd. It will be handed over tomorrow. Today it is equipped with a one-day environment. Really ..... Thanks for saving me in the following article. Thank you very much.
Http://apps.hi.baidu.com/share/detail/33127760
Org. springframework. beans. factory. beancreationexception: Error creating bean with name 'sessionfactory 'defined in servletcontext resource [/WEB-INF/classes/applicationcontext. XML]: Invocation of init method failed; Nested exception is Java. lang. nosuchmethoderror: Org. objectweb. ASM. classvisitor. visit (iiljava/lang/string; ljava/lang/string; [ljava/lang/string;) vcaused by: Java. lang. nosuchmethoderror: Org. objectweb. ASM. classvisitor. visit (iiljava/lang/string; ljava/lang/string; [ljava/lang/string;) V at net. SF. cglib. core. classemitter. begin_class (classemitter. java: 77)
The online statement is really uneven, and finally find a way to solve the problem (tossing me for one afternoon, it's going crazy)
Cause:
These libraries are used in Spring AOP programming:
Asm-2.2.2.jar
Asm-commons-2.2.2.jar
Asm-util-2.2.2.jar
Hibernate uses the following Lib:
ASM. Jar
Asm-attrs.jar
The asm-2.2.2.jar and ASM. jar have a class conflict !!!
If either of them is used, the following error may occur:
Java. Lang. noclassdeffounderror: ORG/objectweb/ASM/codevisitor
Java. Lang. noclassdeffounderror: ORG/objectweb/ASM/commons/emptyvisitor
Java. Lang. nosuchmethoderror: org. objectweb. ASM. classvisitor. Visit
Solution:
1.Remove3 lib of hibernate in the class path
ASM. Jar
Asm-attrs.jar
Cglib-2.1.2.jar
2.JoinThe following four libraries in spring
Asm-2.2.2.jar
Asm-commons-2.2.2.jar
Asm-util-2.2.2.jar
Cglib-nodep-2.1_3.jar
Your own small test: (running environment: APACHE-Tomcat-5.5.15 +. myeclipse_5.5ga_e3.2.2)
Integration SSH project, in the Tomcat deployment environment D: \ Tomcat \ webapps \ My \ WEB-INF \ Lib encountered a point of exception:
ASM. jar, asm-attrs.jar, asm-2.2.3.jar, asm-commons-2.2.3.jar
Asm-util-2.2.3.jar, cglib-nodep-2.1_3.jarNo exception occurs when Tomcat is started. (I think the asm-2.2.3jar may have been improved to some extent .)
Add WEB-INF under D: \ Tomcat \ webapps \ My \ cglib-2.1.3.jar \ Lib
The above java. Lang. nosuchmethoderror is reported:
Org. objectweb. ASM. classvisitor. Visit error message. It indicates that the cglib-2.1.3.jar conflicts with other packages.Delete cglib-2.1.3.jar issue solved!