2017. 7. 7. 09:49ㆍetc/error
환경
tomcat 8
java 8
spring 4.1
잘 되던 프로젝트가 R을 추가하고 난 후 서버가 올라가지 않는다는 연락을 받았다.
다음과 같은 오류가 발생했다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68 |
JRebel-SDK-CBP: ERROR Class 'com.fasterxml.jackson.databind.ser.impl.ReadOnlyClassToSerializerMap' could not be processed by org.zeroturnaround.jrebel.jackson2.cbp.ReadOnlyClassToSerializerMap2CBP@org.apache.catalina.loader.WebappClassLoader@1c716c9b: org.zeroturnaround.bundled.javassist.NotFoundException: field: _map in com.fasterxml.jackson.databind.ser.impl.ReadOnlyClassToSerializerMap
at org.zeroturnaround.bundled.javassist.CtClassType.checkGetField(JRebel:920)
at org.zeroturnaround.bundled.javassist.CtClassType.getDeclaredField(JRebel:969)
at org.zeroturnaround.bundled.javassist.CtClassType.getDeclaredField(JRebel:964)
at org.zeroturnaround.jrebel.jackson2.cbp.ReadOnlyClassToSerializerMap2CBP.process(ReadOnlyClassToSerializerMap2CBP.java:33)
at org.zeroturnaround.javarebel.integration.support.JavassistClassBytecodeProcessor.process(JRebel:66)
at com.zeroturnaround.javarebel.zh.a(JRebel:257)
at com.zeroturnaround.javarebel.zh.a(JRebel:246)
at com.zeroturnaround.javarebel.zh.a(JRebel:230)
at com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:127)
at com.zeroturnaround.javarebel.yQ.transform(JRebel:45)
at java.lang.ClassLoader.defineClass(ClassLoader.java)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2567)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:859)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1302)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at com.fasterxml.jackson.databind.ser.SerializerCache._makeReadOnlyLookupMap(SerializerCache.java:62)
at com.fasterxml.jackson.databind.ser.SerializerCache.getReadOnlyLookupMap(SerializerCache.java:54)
at com.fasterxml.jackson.databind.SerializerProvider.<init>(SerializerProvider.java:234)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.<init>(DefaultSerializerProvider.java:69)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider$Impl.<init>(DefaultSerializerProvider.java:631)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider$Impl.createInstance(DefaultSerializerProvider.java:645)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider$Impl.createInstance(DefaultSerializerProvider.java:623)
at com.fasterxml.jackson.databind.ObjectMapper._serializerProvider(ObjectMapper.java:3680)
at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:3583)
at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:3524)
at dps.r.util.RUtils.toR(RUtils.java:48)
at dps.r.engine.DpsREngine.invoke(DpsREngine.java:92)
at dps.r.jri.JRIContext.init(JRIContext.java:114)
at dps.r.jri.JRIContext.<init>(JRIContext.java:53)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1086)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1038)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicationContext.java:480)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1227)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1140)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1027)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5038)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5348)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) |
cs |
무슨오류지...
잘은 몰라도 JRebel 이란 단어가 눈에 띄었고 jackson.databind 란 단어가 눈에 띄었다.
최근에 스프링 4.1 버전으로 업그레이 하면서 함께 버전업을 시켜놓은 녀석들이다.
구글링 해보니 자세한 원인은 파악할 수 없었다.
다만 JRebel 과 jackson-databind와 버전이 맞지 않아서 발생하는 오류인 듯 하다는 내용을 발견했다.
JRebel 6.1.1 버전 까지는 jackson-databind 2.5.5 까지는 오류가 없다고 한다..
JRebel 6.1.2 버전 부터 jackson-databind 2.6.0 버전을 사용해도 된다는 내용이다.
필자는 JRebel 6.0.0 버전에 jackson-databind 2.8.9 버전을 사용중이였다.
JRebel 버전을 올리기에는 모든 직원들의 개발환경에 영향을 미칠 수 있기 때문에
jackson-databind 의 버전을 내리기로 했다.
물론 spring 4.1 에서 MappingJackson2HttpMessageConverter 를 사용한다면 버전을 내림으로 인해 문제가 없는지 살펴봐야 한다.
jackson 라이브러리를 2버전대로 사용한다면 큰 문제는 없을 거라 판단이 되어 2.5.5 버전으로 내렸다.
참고로 연관되어 있는 jackson-annotations, jackson-core 도 jackson-databind 버전에 맞춰서 2.5.5 버전으로 내렸다.
끝.