You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (Jira)" <ji...@apache.org> on 2020/06/04 09:16:00 UTC

[jira] [Commented] (OWB-1300) ClassCastException in org.apache.webbeans.web.context.WebContextsService

    [ https://issues.apache.org/jira/browse/OWB-1300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17125728#comment-17125728 ] 

Mark Struberg commented on OWB-1300:
------------------------------------

Please See CDI-2.0 spec 18.8

bq. a bean with bean type javax.servlet.http.HttpServletRequest, allowing injection of a reference to the HttpServletRequest
bq. 

This explicitly requires {{HttpServletRequest}} not {{ServletRequest}}. If we get some issues here in TomEE, then it is likely due to integration.

> ClassCastException in org.apache.webbeans.web.context.WebContextsService
> ------------------------------------------------------------------------
>
>                 Key: OWB-1300
>                 URL: https://issues.apache.org/jira/browse/OWB-1300
>             Project: OpenWebBeans
>          Issue Type: Improvement
>    Affects Versions: 2.0.12
>            Reporter: Jonathan Gallimore
>            Priority: Major
>              Labels: pull-request-available
>
> When running the Jakarta EE TCK servlet tests against TomEE, a small number of tests fail with a ClassCastException in org.apache.webbeans.web.context.WebContextsService. The reason for this is that ServletRequestEvent takes an instance of ServletRequest as a parameter. This is cast to HttpServletRequest in WebContextsService without a check.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)