java.lang.ClassCastException

Spring JIRA | humairm | 1 decade ago
  1. 0

    I have the following in my servlet to a fully qualified target URL: HttpSession session = request.getSession(); String targetUrl = "https://" + request.getServerName() + request.getContextPath() + "/home.do?method=getHome"; session.setAttribute(AbstractProcessingFilter.ACEGI_SAVED_REQUEST_KEY, targetUrl); However I get a class cast exception: 2006-06-06 00:28:10 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception java.lang.ClassCastException at org.acegisecurity.ui.AbstractProcessingFilter.obtainFullRequestUrl(AbstractProcessingFilter.java:268) at org.acegisecurity.ui.AbstractProcessingFilter.successfulAuthentication(AbstractProcessingFilter.java:373) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:211) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:195) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)

    Spring JIRA | 1 decade ago | humairm
    java.lang.ClassCastException
  2. 0

    I have the following in my servlet to a fully qualified target URL: HttpSession session = request.getSession(); String targetUrl = "https://" + request.getServerName() + request.getContextPath() + "/home.do?method=getHome"; session.setAttribute(AbstractProcessingFilter.ACEGI_SAVED_REQUEST_KEY, targetUrl); However I get a class cast exception: 2006-06-06 00:28:10 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception java.lang.ClassCastException at org.acegisecurity.ui.AbstractProcessingFilter.obtainFullRequestUrl(AbstractProcessingFilter.java:268) at org.acegisecurity.ui.AbstractProcessingFilter.successfulAuthentication(AbstractProcessingFilter.java:373) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:211) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:195) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)

    Spring JIRA | 1 decade ago | humairm
    java.lang.ClassCastException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    ClassCastException : PortableRemoteObject.

    Oracle Community | 1 decade ago | 403765
    java.lang.ClassCastException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      No message provided

      at org.acegisecurity.ui.AbstractProcessingFilter.obtainFullRequestUrl()
    2. Acegi Security Core
      FilterToBeanProxy.doFilter
      1. org.acegisecurity.ui.AbstractProcessingFilter.obtainFullRequestUrl(AbstractProcessingFilter.java:268)
      2. org.acegisecurity.ui.AbstractProcessingFilter.successfulAuthentication(AbstractProcessingFilter.java:373)
      3. org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:211)
      4. org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      5. org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:195)
      6. org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      7. org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
      8. org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90)
      8 frames
    3. Glassfish Core
      ContainerBase.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      4. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      5. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      6. org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      7. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      8. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      9. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      10. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      11. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      12. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      13. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      14. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      15. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      16. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      17. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      18. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      18 frames
    4. org.apache.coyote
      CoyoteAdapter.service
      1. org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      1 frame
    5. Embedded GlassFish Web
      SocketConnection.runIt
      1. org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
      2. org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
      3. org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
      4. org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
      5. org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
      5 frames
    6. Tomcat Util
      ThreadPool$ControlRunnable.run
      1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      1 frame
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:534)
      1 frame