[
https://issues.apache.org/jira/browse/TOMEE-4589?focusedWorklogId=1026767&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1026767
]
ASF GitHub Bot logged work on TOMEE-4589:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Jun/26 08:59
Start Date: 25/Jun/26 08:59
Worklog Time Spent: 10m
Work Description: rzo1 opened a new pull request, #2795:
URL: https://github.com/apache/tomee/pull/2795
session-timeout (and the other xsd:integer / numeric / temporal / enum
descriptor values) use a whitespace="collapse" facet, so a value such as
```
<session-timeout>
30
</session-timeout>
```
is valid and must parse. The SXC-generated accessors fed the raw element
text straight into Integer.valueOf()/etc. for wrapper, temporal, decimal, enum
and boolean types, which failed with NumberFormatException (or parsed the wrong
value).
Bump SXC to 0.10 (which collapses whitespace in the generator) and
regenerate the affected accessors, applying only the resulting .trim()
additions so the change stays limited to the fix. Adds a regression test.
This is the `main` counterpart of #2794.
Issue Time Tracking
-------------------
Worklog Id: (was: 1026767)
Time Spent: 20m (was: 10m)
> openejb reports an error in web.xml which is wrong
> --------------------------------------------------
>
> Key: TOMEE-4589
> URL: https://issues.apache.org/jira/browse/TOMEE-4589
> Project: TomEE
> Issue Type: Bug
> Components: TomEE Core Server
> Affects Versions: 10.1.4
> Reporter: Martin
> Priority: Minor
> Time Spent: 20m
> Remaining Estimate: 0h
>
> web.xml has a session-timeout attribute with whitespace which creates an
> error.
> Format is however to namespace specs.
> Please see explanation on netbeans issues by Matthias Bläsing
> [link
> https://github.com/apache/netbeans/issues/9243|https://github.com/apache/netbeans/issues/9243]
> the error reported by openejb is :
> {code:java}
> // code placeholder
> Caused by: org.apache.openejb.OpenEJBException: Encountered unknown error
> parsing the web.xml file:
> file:/home/martin/NetBeansProjects/mavenproject2/target/mavenproject2-master/WEB-INF/web.xml:
> For input string: "
> 30
> "
> at
> org.apache.openejb.config.ReadDescriptors.readWebApp(ReadDescriptors.java:848)
> at
> org.apache.openejb.config.DeploymentLoader.createWebModule(DeploymentLoader.java:956)
> at
> org.apache.openejb.config.DeploymentLoader.createWebModule(DeploymentLoader.java:818)
> at
> org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:230)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:2381)
> ... 51 more
> Caused by: java.lang.NumberFormatException: For input string: "
> 30 {code}
>
> web.xml contains
> {code:java}
> // code placeholder
> </servlet-mapping>
> <session-config>
> <session-timeout>
> 30
> </session-timeout>
> </session-config>
> <welcome-file-list>
> <welcome-file>index.xhtml</welcome-file> {code}
> kr martin
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)