본문으로 바로가기

jsessionid를 없애려고 web.xml 파일에 <session-config> 태그 관련해서 추가하던 중에 생긴 에러이다.

해당 에러가 생겨도 문제 없이 돌아는 가..더라... (?) 그래도 에러는 해결해보자



심각: Begin event threw exception

java.lang.IllegalArgumentException: <session-config> element is limited to 1 occurrence

at org.apache.tomcat.util.descriptor.web.SetSessionConfig.begin(WebRuleSet.java:772)

at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1174)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1359)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)

at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1439)

at org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml(WebXmlParser.java:119)

at org.apache.catalina.startup.ContextConfig.getDefaultWebXmlFragment(ContextConfig.java:1567)

at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1098)

at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:765)

at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.startup.Catalina.start(Catalina.java:682)

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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)


11월 26, 2018 11:23:53 오전 org.apache.tomcat.util.descriptor.web.WebXmlParser parseWebXml

심각: Parse error in application web.xml file at [file:/C:/_dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/conf/web.xml]

org.xml.sax.SAXParseException; systemId: file:/C:/_dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/conf/web.xml; lineNumber: 606; columnNumber: 25; Error at (606, 25) : <session-config> element is limited to 1 occurrence

at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:1862)

at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:1894)

at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1177)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1359)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)

at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1439)

at org.apache.tomcat.util.descriptor.web.WebXmlParser.parseWebXml(WebXmlParser.java:119)

at org.apache.catalina.startup.ContextConfig.getDefaultWebXmlFragment(ContextConfig.java:1567)

at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1098)

at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:765)

at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.startup.Catalina.start(Catalina.java:682)

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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)

Caused by: java.lang.IllegalArgumentException: <session-config> element is limited to 1 occurrence

at org.apache.tomcat.util.descriptor.web.SetSessionConfig.begin(WebRuleSet.java:772)

at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1174)

... 46 more


일단 뭐 영어를 간단하게 해석하자면 <session-config> 요소는 1개만 쓸 수 있다.


그렇다. 서버 web.xml에서 정의한 <session-config> 태그가 존재하는데 난 그것도 모르고 또 하나 더 추가한 것이다. ㅋ

그래서 내가 작성한 태그는 지우고 원래 있던 태그에 원하는 내용을 추가하고 톰캣을 실행하니 에러가 사라졌다!


막 추가하지 말자.


댓글을 달아 주세요