cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Translate the entire conversation x

RESTEasy PathInfo calculation difference between Windchill 13.0.2 and 13.1.1

isodius
12-Amethyst

RESTEasy PathInfo calculation difference between Windchill 13.0.2 and 13.1.1

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):

  • Servlet container provides: ContextPath=/Windchill, ServletPath=/oslc-connect, PathInfo=/setup
  • RESTEasy logs: RESTEASY002315: PathInfo: /setup
  • Resource is found and returns 200 OK

On Windchill 13.1.1 (not working):

  • Servlet container provides: ContextPath=/Windchill, ServletPath=/oslc-connect, PathInfo=/setup (same as 13.0.2)
  • RESTEasy logs: RESTEASY002315: PathInfo: /Windchill/oslc-connect/setup
  • RESTEasy returns 404: Could not find resource for full path: https://server/Windchill/oslc-connect/setup

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:

  • getRequestURI() returns /Windchill/oslc-connect/setup
  • getContextPath() returns /Windchill
  • getServletPath() returns /oslc-connect
  • getPathInfo() returns /setup

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:

  1. Is this a known behavior change in RESTEasy between Windchill 13.0.2 and 13.1.1?
  2. What version of RESTEasy is bundled with each Windchill version?
  3. Is there a recommended configuration change for custom REST servlets when upgrading to 13.1.1?
  4. Should we be using a different servlet class or configuration approach in 13.1.1?
  5. Is the resteasy.servlet.mapping.prefix init-param being processed differently in the newer version?

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.

1 REPLY 1
isodius
12-Amethyst
(To:isodius)

Note that the product is Windchill PDMLink.

Announcements

Top Tags