eclipse-ee4j / eclipse-ee4j/metro-wsit
Failure to read wsit-client.xml
- Dominant language
- Java
- Stars
- 6
- Forks
- 21
- Avg merge
- 10h 2m
- Merged PRs (30d)
- 1
Description
After updating a project from Java 7 to 11 (and all libraries to newest versions) the reading of `wsit-client.xml` does not work anymore.
Seemingly, the path gotten from the Tomcat 10 container contains hash chars that are escaped, which causes the path to be cut.
` file:/C:/opt/apache-tomcat-10.1.10/webapps/myapp%23%23001.003.0460/WEB-INF/classes/META-INF/wsit-client.xml`
=>
Caused by: java.io.FileNotFoundException: `C:\opt\apache-tomcat-10.1.10\webapps\myapp`
```
Caused by: com.sun.xml.ws.policy.PolicyException: WSP5001: Failed to process WSIT config file located at URI "file:/C:/opt/apache-tomcat-10.1.10/webapps/myapp%23%23001.003.0460/WEB-INF/classes/META-INF/wsit-client.xml" due to an exception.
at com.sun.xml.ws.policy.parser.PolicyConfigParser.parseModel(PolicyConfigParser.java:204)
at com.sun.xml.ws.policy.parser.PolicyConfigParser.parseModel(PolicyConfigParser.java:160)
at com.sun.xml.ws.policy.parser.PolicyConfigParser.parse(PolicyConfigParser.java:78)
at com.sun.xml.ws.policy.parser.WsitPolicyResolver.resolve(WsitPolicyResolver.java:95)
... 65 common frames omitted
Caused by: java.io.FileNotFoundException: C:\opt\apache-tomcat-10.1.10\webapps\myapp (The system cannot find the file specified)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
at java.base/java.io.FileInputStream.(FileInputStream.java:157)
at java.base/java.io.FileInputStream.(FileInputStream.java:111)
at java.base/sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:86)
at java.base/sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:189)
at java.base/java.net.URL.openStream(URL.java:1161)
at com.sun.xml.ws.policy.parser.PolicyResourceLoader$PolicyEntityResolver.resolveEntity(PolicyResourceLoader.java:102)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseImport(RuntimeWSDLParser.java:395)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseImport(RuntimeWSDLParser.java:807)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:436)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:300)
at com.sun.xml.ws.api.model.wsdl.WSDLModel$WSDLParser.parse(WSDLModel.java:170)
at com.sun.xml.ws.policy.parser.PolicyResourceLoader.getWsdlModel(PolicyResourceLoader.java:57)
at com.sun.xml.ws.policy.parser.PolicyConfigParser.parseModel(PolicyConfigParser.java:198)
... 68 common frames omitted
13:47:36.961 [http-nio-8080-exec-114] WARN f.g.h.HibernateSessionRequestFilter - rgr0100 [1_39] - Trying to rollback database transaction after exception - WSP5004: Unexpected error occured while processing client configuration file.
13:47:36.979 [http-nio-8080-exec-114] WARN f.g.w.f.JsonErrorReportingOutputFormat - [_] - WSP5004: Unexpected error occured while processing client configuration file.
jakarta.xml.ws.WebServiceException: WSP5004: Unexpected error occured while processing client configuration file.
at com.sun.xml.ws.policy.parser.WsitPolicyResolver.resolve(WsitPolicyResolver.java:106)
at com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension.postFinished(PolicyWSDLParserExtension.java:935)
at com.sun.xml.ws.wsdl.parser.DelegatingParserExtension.postFinished(DelegatingParserExtension.java:194)
at com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.postFinished(WSDLParserExtensionFacade.java:339)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:222)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:179)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:148)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:336)
at com.sun.xml.ws.client.WSServiceDelegate.(WSServiceDelegate.java:293)
at com.sun.xml.ws.client.WSServiceDelegate.(WSServiceDelegate.java:201)
at com.sun.xml.ws.client.WSServiceDelegate.(WSServiceDelegate.java:182)
at com.sun.xml.ws.client.WSServiceDelegate.(WSServiceDelegate.java:178)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:89)
at jakarta.xml.ws.Service.(Service.java:82)```
Contributor guide
Research direction
Start with PolicyResourceLoader.PolicyEntityResolver, especially the resolveEntity path shown in the stack trace, and follow how the file URI reaches URL.openStream(). Reproduce the failure with the escaped %23 path and wsit-client.xml; done means the complete path is read and the client configuration loads without WSP5001.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100