This is the output:
2012-01-21 07:45:35,093 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher][mds][anonymousUser] PathInfo: /excel/query/SimpleMasterDataQuery
2012-01-21 07:45:35,094 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher][mds][anonymousUser] PathInfo: /api/excel/query/SimpleMasterDataQuery
2012-01-21 07:45:35,094 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher][mds][anonymousUser] Failed executing GET /api/excel/query/SimpleMasterDataQuery: org.jboss.resteasy.spi.NotFoundException: Could not find resource for relative : /api/excel/query/SimpleMasterDataQuery of full path: http://localhost:8080/api/excel/query/SimpleMasterDataQuery?includeChildren=true&includeAttributes=true
at org.jboss.resteasy.core.registry.RootSegment.matchChildren(RootSegment.java:360) [:6.1.0.Final]
at org.jboss.resteasy.core.registry.RootSegment.matchRoot(RootSegment.java:374) [:6.1.0.Final]
at org.jboss.resteasy.core.registry.RootSegment.matchRoot(RootSegment.java:367) [:6.1.0.Final]
at org.jboss.resteasy.core.ResourceMethodRegistry.getResourceInvoker(ResourceMethodRegistry.java:251) [:6.1.0.Final]
at org.jboss.resteasy.core.SynchronousDispatcher.getInvoker(SynchronousDispatcher.java:173) [:6.1.0.Final]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:118) [:6.1.0.Final]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [:6.1.0.Final]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [:6.1.0.Final]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [:6.1.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.1.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:63) [:6.1.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:369) [:3.0.7.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99) [:3.0.7.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at com.tracetracker.web.filter.Jboss6LogContextPopulatorFilter.doFilter(Jboss6LogContextPopulatorFilter.java:103) [:]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at com.tracetracker.web.filter.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:59) [:]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:57) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:168) [:3.0.7.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [:3.0.6.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [:3.0.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
at org.codehaus.enunciate.webapp.HTTPRequestContextFilter.doFilter(HTTPRequestContextFilter.java:36) [:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:369) [:3.0.7.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [:3.0.7.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at com.tracetracker.web.filter.Jboss6LogContextPopulatorFilter.doFilter(Jboss6LogContextPopulatorFilter.java:103) [:]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at com.tracetracker.web.filter.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:59) [:]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381) [:3.0.7.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:168) [:3.0.7.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [:3.0.6.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [:3.0.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.1.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [:6.1.0.Final]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.1.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.1.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159) [:6.1.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.1.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.1.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.1.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.1.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.1.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.1.0.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.1.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.1.0.Final]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

Ryan Heaton
added a comment - 02/Feb/12 10:43 PM Sorry, I'm at a conference that finishes tomorrow. Haven't had time to apply myself to this.
Can you try attaching a debugger to org.codehaus.enunciate.jboss.PathBasedConnegHttpPreprocessor and see how it's behaving?

Ryan Heaton
added a comment - 23/Feb/12 8:16 AM I guess I need to be able to reproduce it. I can't figure out why your set of media type mappings is empty. That init-param is still applicable as far as I can tell.
You say it happened with your update to Spring 3, right? Were there any other changes/updates that might have affected this? Can you give me some way to reproduce it locally?

So in order for Enunciate to provide resources at /xml or /json, it needs to have a mapping between the media type and the "id" of the media type, which is used to know what path to provide.

So, for xml and json, Enunciate needs to be supplied a map that looks like this:

"xml" -> "application/xml"
"json" -> "application/json"
...etc...

Fortunately, JBoss already had the concept of such a map. It was supplied in the "resteasy.media.type.mappings" property. When that init param was supplied, JBoss would build the map and make it available to the [http servlet dispatcher], which uses it to supply a [preprocessor] to REST requests which can do the necessary magic.

So somewhere along the way of your update, JBoss isn't providing those media type mappings anymore. But without a way to debug it, I can't find out what happened.

Ryan Heaton
added a comment - 19/Apr/12 5:11 PM Hi. Apologies for the lack of response on this.
So in order for Enunciate to provide resources at /xml or /json, it needs to have a mapping between the media type and the "id" of the media type, which is used to know what path to provide.
So, for xml and json, Enunciate needs to be supplied a map that looks like this:
"xml" -> "application/xml"
"json" -> "application/json"
...etc...
Fortunately, JBoss already had the concept of such a map. It was supplied in the "resteasy.media.type.mappings" property. When that init param was supplied, JBoss would build the map and make it available to the [ http servlet dispatcher ], which uses it to supply a [ preprocessor ] to REST requests which can do the necessary magic.
So somewhere along the way of your update, JBoss isn't providing those media type mappings anymore. But without a way to debug it, I can't find out what happened.

Frode Aannevik
added a comment - 25/May/12 5:43 AM I have the same problem but it seems to only exist when deploying to JBoss, deploying the war in Jetty 6.1.25 (maven-jetty-plugin) works fine for all alternative endpoints.

Ryan Heaton
added a comment - 01/Jun/12 4:15 PM I have the same problem but it seems to only exist when deploying to JBoss, deploying the war in Jetty 6.1.25 (maven-jetty-plugin) works fine for all alternative endpoints.
We're still trying to reproduce this error. Can you give me some details on how to reproduce it on my box?

Jan Erik Robertsen
added a comment - 19/Jun/12 9:51 AM I have a similar problem where I want to have the subContext for the REST endpoints include /api/...
I can get this to work for application/xml (and other content types) but not for application/json
I've attached enunciate-654-2.tar.gz which reproduces the problem.
In enunciate.xml I've used:
<services>
<rest defaultRestSubcontext= "api/xml" >
<content-types>
<content-type type= "application/xml" id= "api/xml" />
<content-type type= "application/json" id= "api/json" />
</content-types>
</rest>
</services>
And in web.xml I've included:
<context-param>
<param-name> resteasy.media.type.mappings </param-name>
<param-value>
api/xml : application/xml,
api/json : application/json
</param-value>
</context-param>
In the generated doc the links for the mount point and for alternate mount points are correct except for json, which is not prefixed with /api/
Hope you can help.

Ryan Heaton
added a comment - 19/Jun/12 10:08 AM I'll try to take a look, but the subcontext mappings were never designed for multi-path contexts.
You may want to add a custom servlet filter that captures the relevant requests and redirects (server-side) them to the /api/endpoint after modifying the accept header...

Jan Erik Robertsen
added a comment - 19/Jun/12 10:13 AM Yes it feels like a bit of a hack.
But still, it seems to work nicely for other content-types.
Do you have some special handling for json, since that is added as an alternate mount point even though it is not specified in either enunciate.xml or in a @Produces annotation?