Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Version: Windchill 13.0
Use Case: We have a custom REST servlet that works correctly on Windchill 13.0.2 but fails with 404 errors after upgrading to Windchill 13.1.1. The exact same code, deployed identically on both versions, exhibits different behavior in how RESTEasy calculates the PathInfo for incoming requests.
Environment:
Windchill 13.0.2 (working)
Windchill 13.1.1 (not working)
Same custom plugin deployed on both versions
Apache proxy with AJP connector
Configuration:
Our REST servlet is configured in web.xml as follows:
<servlet> <servlet-name>oslc-connect-servlet</servlet-name> <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class> <init-param> <param-name>jakarta.ws.rs.Application</param-name> <param-value>com.sodius.oslc.app.wc.server.common.services.OslcConnectApplication</param-value> </init-param> <init-param> <param-name>resteasy.servlet.mapping.prefix</param-name> <param-value>/oslc-connect</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>oslc-connect-servlet</servlet-name> <url-pattern>/oslc-connect/*</url-pattern> </servlet-mapping>
JAX-RS resource example: java@Path("/setup")
public class AdminService {
@GET @Produces(MediaType.APPLICATION_JSON) public Response getConfiguration() { ... } }
Observed Behavior:
When accessing https://server/Windchill/oslc-connect/setup:
On Windchill 13.0.2 (working):
On Windchill 13.1.1 (not working):
Analysis:
We added diagnostic logging to trace exactly what values the servlet container provides to RESTEasy. The HttpServletRequest methods return identical values on both versions:
However, RESTEasy internally calculates a different PathInfo on 13.1.1. Instead of using the PathInfo directly from the servlet container (/setup), it appears to reconstruct it incorrectly as /Windchill/oslc-connect/setup.
Workaround:
We implemented a workaround using an HttpServletRequestWrapper that forces empty context and servlet paths, making RESTEasy see only the resource path. This works but seems like an incorrect solution.
Questions:
Expected Behavior:
RESTEasy should use the PathInfo provided by the servlet container (/setup) for resource matching, consistent with how it worked in 13.0.2, without requiring custom request wrappers.
Note that the product is Windchill PDMLink.
