[jira] [Commented] (CXF-6843) http 406 not acceptable should be returned if query parameter value can't be converted
[ https://issues.apache.org/jira/browse/CXF-6843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15213907#comment-15213907 ] Jim Ma commented on CXF-6843: - It looks it requires default.wae.mapper.least.specific=true. There is exceptionMapper hides in the deep and map exception to NotAcceptableException. Why do we set this value to false ? > http 406 not acceptable should be returned if query parameter value can't be > converted > --- > > Key: CXF-6843 > URL: https://issues.apache.org/jira/browse/CXF-6843 > Project: CXF > Issue Type: Bug > Components: JAX-RS >Affects Versions: 3.1.5 >Reporter: Jim Ma >Assignee: Sergey Beryozkin > Fix For: 3.2.0, 3.1.6 > > > For query parameter conversion exception, it should return 406 http status > in response. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CXF-6842) Unwrap exception nested with WebApplicationException
[ https://issues.apache.org/jira/browse/CXF-6842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15213911#comment-15213911 ] Jim Ma commented on CXF-6842: - Hi Sergey, There is similar item defined in jaxrs 1.1 6.3 to unwrap an EJBException. I think it's no harm to unwrap an exception other than EJBException if the nested exception is WAE. > Unwrap exception nested with WebApplicationException > > > Key: CXF-6842 > URL: https://issues.apache.org/jira/browse/CXF-6842 > Project: CXF > Issue Type: Bug > Components: JAX-RS >Affects Versions: 3.1.5 >Reporter: Jim Ma >Assignee: Jim Ma > Fix For: 3.2.0, 3.1.6 > > > In a resource class, if an exception is thrown which is nested with > WebApplicationException, cxf can try to get the cause and create response > from WebApplicationException -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CXF-6847) Return automatic response if no method annotated with OPTIONS.
Jim Ma created CXF-6847: --- Summary: Return automatic response if no method annotated with OPTIONS. Key: CXF-6847 URL: https://issues.apache.org/jira/browse/CXF-6847 Project: CXF Issue Type: Task Affects Versions: 3.1.5 Reporter: Jim Ma Fix For: 3.2.0, 3.1.6 >From JAXRS 2.0 Spec section 3.5, it requires the following behavior . On receipt of an OPTIONS request an implementation MUST either: 1. Call a method annotated with a request method designator for OPTIONS or, if none present, 2. Generate an automatic response using the metadata provided by the JAX-RS annotations on the match- ing class and its methods. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CXF-6843) http 406 not acceptable should be returned if query parameter value can't be converted
[ https://issues.apache.org/jira/browse/CXF-6843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15214164#comment-15214164 ] Sergey Beryozkin commented on CXF-6843: --- Hi, how is a mapper related to it ? 404 is what the spec requires to be returned in this case, do you see 404 ? > http 406 not acceptable should be returned if query parameter value can't be > converted > --- > > Key: CXF-6843 > URL: https://issues.apache.org/jira/browse/CXF-6843 > Project: CXF > Issue Type: Bug > Components: JAX-RS >Affects Versions: 3.1.5 >Reporter: Jim Ma >Assignee: Sergey Beryozkin > Fix For: 3.2.0, 3.1.6 > > > For query parameter conversion exception, it should return 406 http status > in response. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CXF-6847) Return automatic response if no method annotated with OPTIONS.
[ https://issues.apache.org/jira/browse/CXF-6847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15214165#comment-15214165 ] Sergey Beryozkin commented on CXF-6847: --- Sure, there has to be code doing the automatic OPTIONS response, in JAXRSUtils and/or JAXRSInInterceptor, perhaps it is not complete ? > Return automatic response if no method annotated with OPTIONS. > -- > > Key: CXF-6847 > URL: https://issues.apache.org/jira/browse/CXF-6847 > Project: CXF > Issue Type: Task >Affects Versions: 3.1.5 >Reporter: Jim Ma > Fix For: 3.2.0, 3.1.6 > > > From JAXRS 2.0 Spec section 3.5, it requires the following behavior . > On receipt of an OPTIONS request an implementation MUST either: > 1. Call a method annotated with a request method designator for OPTIONS or, > if none present, > 2. Generate an automatic response using the metadata provided by the JAX-RS > annotations on the match- > ing class and its methods. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CXF-6842) Unwrap exception nested with WebApplicationException
[ https://issues.apache.org/jira/browse/CXF-6842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp updated CXF-6842: - Fix Version/s: (was: 3.1.6) > Unwrap exception nested with WebApplicationException > > > Key: CXF-6842 > URL: https://issues.apache.org/jira/browse/CXF-6842 > Project: CXF > Issue Type: Bug > Components: JAX-RS >Affects Versions: 3.1.5 >Reporter: Jim Ma >Assignee: Jim Ma > Fix For: 3.2.0 > > > In a resource class, if an exception is thrown which is nested with > WebApplicationException, cxf can try to get the cause and create response > from WebApplicationException -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CXF-6847) Return automatic response if no method annotated with OPTIONS.
[ https://issues.apache.org/jira/browse/CXF-6847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp updated CXF-6847: - Fix Version/s: (was: 3.1.6) > Return automatic response if no method annotated with OPTIONS. > -- > > Key: CXF-6847 > URL: https://issues.apache.org/jira/browse/CXF-6847 > Project: CXF > Issue Type: Task >Affects Versions: 3.1.5 >Reporter: Jim Ma > Fix For: 3.2.0 > > > From JAXRS 2.0 Spec section 3.5, it requires the following behavior . > On receipt of an OPTIONS request an implementation MUST either: > 1. Call a method annotated with a request method designator for OPTIONS or, > if none present, > 2. Generate an automatic response using the metadata provided by the JAX-RS > annotations on the match- > ing class and its methods. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CXF-6841) Fix documentation cxf-rt-rs-http-sc => cxf-rt-rs-http-sci
[ https://issues.apache.org/jira/browse/CXF-6841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp updated CXF-6841: - Fix Version/s: (was: 3.1.6) > Fix documentation cxf-rt-rs-http-sc => cxf-rt-rs-http-sci > - > > Key: CXF-6841 > URL: https://issues.apache.org/jira/browse/CXF-6841 > Project: CXF > Issue Type: Bug > Components: Documentation >Affects Versions: 3.1.5 >Reporter: Dennis Kieselhorst >Priority: Trivial > > JaxrsServletContextInitializer is in module cxf-rt-rs-http-sci not in > cxf-rt-rs-http-sc > http://cxf.apache.org/docs/jaxrs-services-configuration.html#JAXRSServicesConfiguration-ServletandApplicationContainerConfiguration -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CXF-6848) Cannot use JAX-RS properties maxAttributeSize/maxTextLength with FastInfoset
Cyril Dangerville created CXF-6848: -- Summary: Cannot use JAX-RS properties maxAttributeSize/maxTextLength with FastInfoset Key: CXF-6848 URL: https://issues.apache.org/jira/browse/CXF-6848 Project: CXF Issue Type: Bug Components: JAX-RS Security Affects Versions: 3.1.5, 3.1.0 Environment: JRE 1.7 Reporter: Cyril Dangerville When FastInfoset is enabled, specifying JAX-RS property {{org.apache.cxf.stax.maxAttributeSize}} or {{org.apache.cxf.stax.maxTextLength}} (at any level) will fail with {noformat} Caused by: java.lang.ClassCastException: com.sun.xml.fastinfoset.stax.StAXDocume ntParser cannot be cast to org.codehaus.stax2.XMLStreamReader2 at org.apache.cxf.staxutils.WoodstoxHelper.setProperty(WoodstoxHelper.ja va:41) at org.apache.cxf.staxutils.StaxUtils.setProperty(StaxUtils.java:2209) at org.apache.cxf.staxutils.StaxUtils.configureReader(StaxUtils.java:216 9) {noformat} To reproduce the error, checkout the sources of CXF (or only CXF JAXRS system tests), in v3.1.5 for example, then add property _maxAttributeSize_ or _maxTextLength_ to the configuration of jaxrs server {{restservice3}} in file {{cxf/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml}} as follows: {noformat} ... ... ... {noformat} Increase CXF log level by adding file {{logging.properties}} to directory {{cxf/systests/jaxrs}} with similar content: {noformat} handlers = java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level = INFO .level=INFO {noformat} Then, from directory {{cxf/systests/jaxrs}}, run: {noformat} $ mvn clean $ mvn -Pnochecks -Djava.util.logging.config.file=logging.properties -Dtest=JAXRSSoapBookTest#testPostGetBookFastinfoset t est {noformat} You should get a stacktrace as follows: {noformat} javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error at org.apache.cxf.jaxrs.utils.SpecExceptions.toInternalServerErrorException(SpecExceptions.java:79) at org.apache.cxf.jaxrs.utils.ExceptionUtils.toInternalServerErrorException(ExceptionUtils.java:106) at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.configureReaderRestrictions(AbstractJAXBProvider.java:809) at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.createDepthReaderIfNeeded(AbstractJAXBProvider.java:798) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.getStreamReader(JAXBElementProvider.java:268) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.doUnmarshal(JAXBElementProvider.java:231) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElementProvider.java:193) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1343) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1294) at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:826) at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:789) at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212) at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:253) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.ec
[jira] [Updated] (CXF-6848) Cannot use JAX-RS properties maxAttributeSize/maxTextLength with FastInfoset
[ https://issues.apache.org/jira/browse/CXF-6848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Cyril Dangerville updated CXF-6848: --- Description: When FastInfoset is enabled, specifying JAX-RS property {{org.apache.cxf.stax.maxAttributeSize}} or {{org.apache.cxf.stax.maxTextLength}} (at any level) will fail with {noformat} Caused by: java.lang.ClassCastException: com.sun.xml.fastinfoset.stax.StAXDocumentParser cannot be cast to org.codehaus.stax2.XMLStreamReader2 at org.apache.cxf.staxutils.WoodstoxHelper.setProperty(WoodstoxHelper.java:41) at org.apache.cxf.staxutils.StaxUtils.setProperty(StaxUtils.java:2209) at org.apache.cxf.staxutils.StaxUtils.configureReader(StaxUtils.java:2169) {noformat} To reproduce the error, checkout the sources of CXF (or only CXF JAXRS system tests), in v3.1.5 for example, then add property _maxAttributeSize_ or _maxTextLength_ to the configuration of jaxrs server {{restservice3}} in file {{cxf/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml}} as follows: {noformat} ... ... ... {noformat} Increase CXF log level by adding file {{logging.properties}} to directory {{cxf/systests/jaxrs}} with similar content: {noformat} handlers = java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level = INFO .level=INFO {noformat} Then, from directory {{cxf/systests/jaxrs}}, run: {noformat} $ mvn clean $ mvn -Pnochecks -Djava.util.logging.config.file=logging.properties -Dtest=JAXRSSoapBookTest#testPostGetBookFastinfoset t est {noformat} You should get a stacktrace as follows: {noformat} javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error at org.apache.cxf.jaxrs.utils.SpecExceptions.toInternalServerErrorException(SpecExceptions.java:79) at org.apache.cxf.jaxrs.utils.ExceptionUtils.toInternalServerErrorException(ExceptionUtils.java:106) at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.configureReaderRestrictions(AbstractJAXBProvider.java:809) at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.createDepthReaderIfNeeded(AbstractJAXBProvider.java:798) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.getStreamReader(JAXBElementProvider.java:268) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.doUnmarshal(JAXBElementProvider.java:231) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElementProvider.java:193) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1343) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1294) at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:826) at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:789) at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212) at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:253) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
[jira] [Updated] (CXF-6848) Cannot use JAX-RS properties maxAttributeSize/maxTextLength with FastInfoset
[ https://issues.apache.org/jira/browse/CXF-6848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Cyril Dangerville updated CXF-6848: --- Description: When FastInfoset is enabled, specifying JAX-RS property {{org.apache.cxf.stax.maxAttributeSize}} or {{org.apache.cxf.stax.maxTextLength}} (at any level) will fail with {noformat} Caused by: java.lang.ClassCastException: com.sun.xml.fastinfoset.stax.StAXDocumentParser cannot be cast to org.codehaus.stax2.XMLStreamReader2 at org.apache.cxf.staxutils.WoodstoxHelper.setProperty(WoodstoxHelper.ja va:41) at org.apache.cxf.staxutils.StaxUtils.setProperty(StaxUtils.java:2209) at org.apache.cxf.staxutils.StaxUtils.configureReader(StaxUtils.java:216 9) {noformat} To reproduce the error, checkout the sources of CXF (or only CXF JAXRS system tests), in v3.1.5 for example, then add property _maxAttributeSize_ or _maxTextLength_ to the configuration of jaxrs server {{restservice3}} in file {{cxf/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml}} as follows: {noformat} ... ... ... {noformat} Increase CXF log level by adding file {{logging.properties}} to directory {{cxf/systests/jaxrs}} with similar content: {noformat} handlers = java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level = INFO .level=INFO {noformat} Then, from directory {{cxf/systests/jaxrs}}, run: {noformat} $ mvn clean $ mvn -Pnochecks -Djava.util.logging.config.file=logging.properties -Dtest=JAXRSSoapBookTest#testPostGetBookFastinfoset t est {noformat} You should get a stacktrace as follows: {noformat} javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error at org.apache.cxf.jaxrs.utils.SpecExceptions.toInternalServerErrorException(SpecExceptions.java:79) at org.apache.cxf.jaxrs.utils.ExceptionUtils.toInternalServerErrorException(ExceptionUtils.java:106) at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.configureReaderRestrictions(AbstractJAXBProvider.java:809) at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.createDepthReaderIfNeeded(AbstractJAXBProvider.java:798) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.getStreamReader(JAXBElementProvider.java:268) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.doUnmarshal(JAXBElementProvider.java:231) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElementProvider.java:193) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1343) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1294) at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:826) at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:789) at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212) at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:253) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
[jira] [Updated] (CXF-6848) Cannot use JAX-RS properties maxAttributeSize/maxTextLength with FastInfoset
[ https://issues.apache.org/jira/browse/CXF-6848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Cyril Dangerville updated CXF-6848: --- Description: When FastInfoset is enabled, specifying JAX-RS property {{org.apache.cxf.stax.maxAttributeSize}} or {{org.apache.cxf.stax.maxTextLength}} (at any level) will fail with {noformat} Caused by: java.lang.ClassCastException: com.sun.xml.fastinfoset.stax.StAXDocumentParser cannot be cast to org.codehaus.stax2.XMLStreamReader2 at org.apache.cxf.staxutils.WoodstoxHelper.setProperty(WoodstoxHelper.java:41) at org.apache.cxf.staxutils.StaxUtils.setProperty(StaxUtils.java:2209) at org.apache.cxf.staxutils.StaxUtils.configureReader(StaxUtils.java:2169) {noformat} To reproduce the error, checkout the sources of CXF (or only CXF JAXRS system tests), in v3.1.5 for example, then add property _maxAttributeSize_ or _maxTextLength_ to the configuration of jaxrs server {{restservice3}} in file {{cxf/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml}} as follows: {noformat} ... ... ... {noformat} Increase CXF log level by adding file {{logging.properties}} to directory {{cxf/systests/jaxrs}} with similar content: {noformat} handlers = java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level = INFO .level=INFO {noformat} Then, from directory {{cxf/systests/jaxrs}}, run: {noformat} $ mvn clean $ mvn -Pnochecks -Djava.util.logging.config.file=logging.properties -Dtest=JAXRSSoapBookTest#testPostGetBookFastinfoset test {noformat} You should get a stacktrace as follows: {noformat} javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error at org.apache.cxf.jaxrs.utils.SpecExceptions.toInternalServerErrorException(SpecExceptions.java:79) at org.apache.cxf.jaxrs.utils.ExceptionUtils.toInternalServerErrorException(ExceptionUtils.java:106) at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.configureReaderRestrictions(AbstractJAXBProvider.java:809) at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.createDepthReaderIfNeeded(AbstractJAXBProvider.java:798) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.getStreamReader(JAXBElementProvider.java:268) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.doUnmarshal(JAXBElementProvider.java:231) at org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(JAXBElementProvider.java:193) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1343) at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1294) at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:826) at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:789) at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212) at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:77) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:253) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:217) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)