윈도우즈의 서비스로 등록한 톰캣을 시작한 후 "catalina.시작일자.log"를 살펴보면 다음과 같은 오류가 발생할 때가 있다.

월 11, 2022 5:24:49 오후 org.apache.catalina.session.StandardManager doLoad
심각: IOException while loading persisted sessions: java.io.StreamCorruptedException: invalid type code: 00
java.io.StreamCorruptedException: invalid type code: 00
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1677)
   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2365)
   at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:612)
   at java.lang.Throwable.readObject(Throwable.java:915)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1185)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2256)
   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2147)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1646)
   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:482)
   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:440)
   at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1587)
   at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1075)
   at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:259)
   at org.apache.catalina.session.StandardManager.load(StandardManager.java:176)
   at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:465)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
   at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5714)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1018)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:994)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
   at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1296)
   at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2039)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   at java.lang.Thread.run(Thread.java:748)

7월 11, 2022 5:24:49 오후 org.apache.catalina.session.StandardManager startInternal
심각: Exception loading sessions from persistent storage
java.io.StreamCorruptedException: invalid type code: 00
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1677)
   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2365)
   at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:612)
   at java.lang.Throwable.readObject(Throwable.java:915)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1185)
   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2256)
   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2147)
   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1646)
   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:482)
   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:440)
   at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1587)
   at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1075)
   at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:259)
   at org.apache.catalina.session.StandardManager.load(StandardManager.java:176)
   at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:465)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
   at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5714)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1018)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:994)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
   at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1296)
   at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2039)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   at java.lang.Thread.run(Thread.java:748)

 

이때는 설정값을 변경하는 것도 있지만, ~CATALINA/work/Catalina/localhost 디렉토리에 위치한 모든 정보들을 삭제하고, 서비스를 재시작 또는 중지한 후에 시작을 하면 위와 같은 에러 로그는 출력되지 않는다.

Posted by 테리
: