简体   繁体   中英

Spring-Hibernate

SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contactController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contactService' defined in file [D:\SpringMVC_20July\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\DeccaSpringMVC\WEB-INF\classes\deccaWeb\DAO\ContactService.class]: Initialization of bean failed; nested exception is java.lang.VerifyError: class net.sf.cglib.core.DebuggingClassWriter overrides final method visit.(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V

Getting the above error while running the app. All the jars in place.Is there any problem with config files? Please help. I am new to spring and hibernate

I'm guessing that you've got a conflict between two cfg JARs in your CLASSPATH. See if that's the case and make sure that you keep the one that Spring expects.

You have mismatching versions of cglib and ASM. For example maven dependendy for cglib 2.2.2 pulls asm 3.3.1, so this is one combination worth of trying.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM