On 24/09/2013 08:07, Martin Grigorov wrote:
> Hi Rossen,
> 
> 
> On Tue, Sep 24, 2013 at 4:35 PM, Rossen Stoyanchev <
> rstoyanc...@gopivotal.com> wrote:
> 
>> I am getting a ClassCastException when using (non JSR-356) upgrade,
>> i.e. WsServerContainer.doUpgrade:
>>
>> Caused by: java.lang.ClassCastException:
>>
>> org.springframework.security.web.servletapi.HttpServlet3RequestFactory$Servlet3SecurityContextHolderAwareRequestWrapper
>> cannot be cast to org.apache.catalina.connector.RequestFacade
>>
> 
> See
> https://github.com/apache/wicket/blob/master/wicket-experimental/wicket-native-websocket/wicket-native-websocket-tomcat/src/main/java/org/apache/wicket/protocol/ws/tomcat7/Tomcat7WebSocketFilter.java#L81
> 
> I had to add this code exactly because of Spring Security -
> https://issues.apache.org/jira/browse/WICKET-5266. But it is valid for any
> other usage of HttpServletRequestWrapper
> 
> 
>>         at
>> org.apache.tomcat.websocket.server.UpgradeUtil.doUpgrade(UpgradeUtil.java:183)

Tomcat should already being the necessary unwrapping in lines 179-181.
It isn't immediately clear to me why this isn't working as intended. Can
you denug this and add some insight?

>> Also what's the equivalent of the Tomcat 8 tomcat-websocket
>> dependency? I see the 7.0.44 binary has tomcat7-websocket.jar but I
>>
> 
> Here is what I use for Apache Wicket integration:
> https://github.com/apache/wicket/blob/master/wicket-experimental/wicket-native-websocket/wicket-native-websocket-tomcat/pom.xml#L43
> 
> 
>> can't find such a dependency in the staging maven repository.

The necessary update to the script that uploads those JARs to the Maven
repo was missed. I think I have fixed it locally but need to test it
from somewhere with connectivity. Unless the JavaOne Wifi is
significantly better than yesterday that won't be for a few hours.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to