자바개발자가되고싶은
99
2021-01-11 16:10:15
4
554

스프링 오류 질문


토비의 스프링 3.1 따라하면서 자꾸 오류가 발생하는데 이유가 뭔지 모르겠습니다.


코드에 따로 x마커 찍힌곳도 없는데 어떻게 해결해야 할까요 ㅠㅠ



WARN : org.springframework.context.annotation.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [springbook.user.dao.DaoFactory]; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class

Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [springbook.user.dao.DaoFactory]; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class

at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:181)

at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:315)

at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)

at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)

at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:691)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528)

at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:88)

at springbook.user.dao.UserDaoTest.main(UserDaoTest.java:15)

Caused by: java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class

at java.base/java.lang.ClassLoader.defineClass1(Native Method)

at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)

at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)

at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)

at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

at java.base/java.lang.ClassLoader.defineClass1(Native Method)

at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)

at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)

at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)

at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:64)

at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103)

at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:123)

at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81)

at org.springframework.context.annotation.ConfigurationClassParser.retrieveBeanMethodMetadata(ConfigurationClassParser.java:399)

at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:317)

at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:242)

at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:199)

at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:167)

... 8 more

0
  • 댓글 4

  • 대충벌레
    22
    2021-01-11 17:08:02

    https://kooremo.tistory.com/entry/%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B2%84%EC%A0%84-%EB%B3%80%EA%B2%BD%EC%8B%9C-%EC%97%90%EB%9F%AC-%EC%82%AC%ED%95%AD311321 

    약간 이거랑 내용이 비슷해보이는데 현재 스프링버전 3.1 인건가요?

  • 자바개발자가되고싶은
    99
    2021-01-11 17:17:22

    @대충벌레

    감사합니다 ㅜㅜ 덕분에 해결했습니다.

  • 대충벌레
    22
    2021-01-11 17:42:47
  • 자바개발자가되고싶은
    99
    2021-01-11 18:26:30

    @대충벌레 

    곧 졸업하고 취업하려는데 실력이 아직 안될것 같아서 공부하는 중 입니다.


    웹 쪽으로 공부한지 얼마 안되기도 했고..

  • 로그인을 하시면 댓글을 등록할 수 있습니다.