https://issues.apache.org/bugzilla/show_bug.cgi?id=47053
Summary: org.apache.catalina.loader.WebAppClassLoader.getResour
ces returns two resource URLs for identical resource
when spaces exists in classpath
Product: Tomcat 6
Version: 6.0.18
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [email protected]
For library jar files that have spaces in their path name,
org.apache.catalina.loader.WebAppClassLoader.getResources(String) returns two
resource URLs for the identical resource, causing some frameworks to have
issues (especially Struts2).
For example a call for the struts-default.xml file (in this case on the
classpath at: C:/Documents and
Settings/Administrator/IBM/rationalsdp/workspace/ea.dmc.rtoe.repository/third-party/org/apache/struts/struts2-core/2.1.6/struts2-core-2.1.6.jar!/struts-default.xml)
would result in the follow returned enumeration:
[java.util.vecto...@52eb52eb, java.net.urlclassloade...@53ee53ee]
where java.util.vecto...@52eb52eb has one URL element: jar:file:/C:/Documents
and
Settings/Administrator/IBM/rationalsdp/workspace/ea.dmc.rtoe.repository/third-party/org/apache/struts/struts2-core/2.1.6/struts2-core-2.1.6.jar!/struts-default.xml
and java.net.urlclassloade...@53ee53ee has one URL element:
jar:file:/C:/Documents%20and%20Settings/Administrator/IBM/rationalsdp/workspace/ea.dmc.rtoe.repository/third-party/org/apache/struts/struts2-core/2.1.6/struts2-core-2.1.6.jar!/struts-default.xml
Notice the "%20" in the second URL. However, they are the same resource.
This causes the XMLConfigurationProvider in Struts2 (2.1.16) to try and load
the same struts-default.xml twice, which it doesn't allow by default.
The workaround is to deploy to a place which doesn't include spaces in the path
name, but I believe this should be handled by Catalina.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]