java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class

Google Groups | Esteban Bett | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [BUG] posting generic multiple records "List<T>" doesn't work.

    Google Groups | 3 years ago | Esteban Bett
    java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class
  2. 0

    generic method for remove List<T> records doesnt work.[vraptor 3.5.2 and 3.5.4 snapshot]

    Google Groups | 3 years ago | Esteban Bett
    java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class

    Root Cause Analysis

    1. java.lang.ClassCastException

      sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class

      at br.com.caelum.vraptor.http.ognl.ListNullHandler.instantiate()
    2. br.com.caelum
      ReflectionBasedNullHandler.nullPropertyValue
      1. br.com.caelum.vraptor.http.ognl.ListNullHandler.instantiate(ListNullHandler.java:49)
      2. br.com.caelum.vraptor.http.ognl.ReflectionBasedNullHandler.nullPropertyValue(ReflectionBasedNullHandler.java:59)
      2 frames
    3. OGNL - Object Graph Navigation Library
      Ognl.setValue
      1. ognl.ASTProperty.getValueBody(ASTProperty.java:118)
      2. ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
      3. ognl.SimpleNode.getValue(SimpleNode.java:236)
      4. ognl.ASTChain.setValueBody(ASTChain.java:222)
      5. ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
      6. ognl.SimpleNode.setValue(SimpleNode.java:279)
      7. ognl.Ognl.setValue(Ognl.java:737)
      8. ognl.Ognl.setValue(Ognl.java:783)
      8 frames
    4. br.com.caelum
      VRaptor.doFilter
      1. br.com.caelum.vraptor.http.ognl.OgnlFacade.setValue(OgnlFacade.java:100)
      2. br.com.caelum.vraptor.http.ognl.OgnlParametersProvider.setProperty(OgnlParametersProvider.java:162)
      3. br.com.caelum.vraptor.http.ognl.OgnlParametersProvider.createParameter(OgnlParametersProvider.java:134)
      4. br.com.caelum.vraptor.http.ognl.OgnlParametersProvider.getParametersFor(OgnlParametersProvider.java:86)
      5. br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.getParametersFor(ParametersInstantiatorInterceptor.java:132)
      6. br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:86)
      7. br.com.caelum.vraptor.core.LazyInterceptorHandler.execute(LazyInterceptorHandler.java:59)
      8. br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
      9. br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:48)
      10. br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
      11. br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
      12. br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:83)
      13. br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
      14. br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
      15. br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:69)
      16. br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
      17. br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
      18. br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
      19. br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
      20. br.com.caelum.vraptor.core.EnhancedRequestExecution.execute(EnhancedRequestExecution.java:44)
      21. br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:91)
      22. br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:58)
      23. br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:88)
      23 frames
    5. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    6. ats.webp.core
      SetCharacterEncodingFilter.doFilter
      1. ats.webp.core.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:31)
      1 frame
    7. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      10 frames
    8. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
      3 frames
    9. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      3. java.lang.Thread.run(Thread.java:662)
      3 frames