Bug 51401 - java.lang.IllegalArgumentException: <session-config> element is limited to 1 occurrence
java.lang.IllegalArgumentException: <session-config> element is limited to 1 ...
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Catalina
trunk
All All
: P2 major (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-06-21 01:36 UTC by Eiji Takahashi
Modified: 2011-06-21 11:11 UTC (History)
0 users



Attachments
logfile (146.40 KB, application/octet-stream)
2011-06-21 01:36 UTC, Eiji Takahashi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eiji Takahashi 2011-06-21 01:36:08 UTC
Created attachment 27188 [details]
logfile

I got following Exception when I started Tomcat.
I hadn't changed any configuration.

-----
java.lang.IllegalArgumentException: <session-config> element is limited to 1 occurrence
        at org.apache.catalina.startup.SetSessionConfig.begin(WebRuleSet.java:722)
        at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1282)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1363)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1543)
        at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1744)
        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1241)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:885)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:344)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:723)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:449)
---

This exception occurs at the applications that contain <session-config> or <login-config> in the web.xml.

When I reverted the code back to the revision 1137764, I got no exception.

Regards.
Comment 1 Eiji Takahashi 2011-06-21 01:59:01 UTC
(In reply to comment #0)
> When I reverted the code back to the revision 1137764, I got no exception.
> Regards.

Oops, sorry. Revision 1137764 is not correct. "1137693" is correct revesion.
Comment 2 Mark Thomas 2011-06-21 10:52:03 UTC
Thanks for the report. The unit tests picked up a similar issue. The problem was caused by r1137753. Investigating now...
Comment 3 Mark Thomas 2011-06-21 11:11:05 UTC
This has been fixed in 7.0.x and will be included in 7.0.17 onwards.