java.lang.ClassCastException: org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy cannot be cast to javax.validation.executable.ExecutableValidator at org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy.forExecutables(Unknown Source)

Hibernate JIRA | George Gastaldi | 3 years ago
  1. 0

    Having: {code} public class ManagedObject { public String sayHello(@NotNull String name) { return "Hello," + name; } } {code} and a test class injecting an instance and calling the method produces the following error: {code} java.lang.ClassCastException: org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy cannot be cast to javax.validation.executable.ExecutableValidator at org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy.forExecutables(Unknown Source) at org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validateMethodInvocation(ValidationInterceptor.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.interceptor.proxy.SimpleMethodInvocation.invoke(SimpleMethodInvocation.java:30) at org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNext(AbstractInterceptionChain.java:93) at org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNextInterceptor(AbstractInterceptionChain.java:78) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:48) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:41) at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:53) at org.jboss.forge.addon.validation.ManagedObject$Proxy$_$$_WeldSubclass.sayHello(Unknown Source) at org.jboss.forge.addon.validation.MethodValidatorTest.testValidationPass(MethodValidatorTest.java:65) {code} It is reproducible by pulling the sources from {{https://github.com/forge/core/}}, branch {{bean_addon_validation}} and running the {{org.jboss.forge.addon.validation.MethodValidatorTest}} test. This does not happen with 5.1.0.Beta1

    Hibernate JIRA | 3 years ago | George Gastaldi
    java.lang.ClassCastException: org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy cannot be cast to javax.validation.executable.ExecutableValidator at org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy.forExecutables(Unknown Source)
  2. 0

    Having: {code} public class ManagedObject { public String sayHello(@NotNull String name) { return "Hello," + name; } } {code} and a test class injecting an instance and calling the method produces the following error: {code} java.lang.ClassCastException: org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy cannot be cast to javax.validation.executable.ExecutableValidator at org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy.forExecutables(Unknown Source) at org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validateMethodInvocation(ValidationInterceptor.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.interceptor.proxy.SimpleMethodInvocation.invoke(SimpleMethodInvocation.java:30) at org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNext(AbstractInterceptionChain.java:93) at org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNextInterceptor(AbstractInterceptionChain.java:78) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:48) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:41) at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:53) at org.jboss.forge.addon.validation.ManagedObject$Proxy$_$$_WeldSubclass.sayHello(Unknown Source) at org.jboss.forge.addon.validation.MethodValidatorTest.testValidationPass(MethodValidatorTest.java:65) {code} It is reproducible by pulling the sources from {{https://github.com/forge/core/}}, branch {{bean_addon_validation}} and running the {{org.jboss.forge.addon.validation.MethodValidatorTest}} test. This does not happen with 5.1.0.Beta1

    Hibernate JIRA | 3 years ago | George Gastaldi
    java.lang.ClassCastException: org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy cannot be cast to javax.validation.executable.ExecutableValidator at org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy.forExecutables(Unknown Source)
  3. 0

    Weblogic 12 + Spring Data JPA + CDI issues

    Stack Overflow | 10 months ago | Tassos G.
    java.lang.ClassCastException: org.springframework.data.jpa.repository.cdi.JpaRepositoryExtension$Proxy$_$$_WeldClientProxy cannot be cast to javassist.util.proxy.ProxyObject
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ClassCastException when Hibernate 4.2.7 and Javassist 3.18

    Oracle Community | 2 years ago | 0f863aa9-1f2d-460a-a451-07d995e744c4
    weblogic.management.DeploymentException: java.lang.ClassCastException: org.jboss.weld.security.Principal$1463320632$Proxy$_$$_Weld$Proxy$ cannot be cast to javassist.util.proxy.ProxyObject
  6. 0

    Hibernate Envers - DefaultRevisionEntity cannot be cast to javassist.util.proxy.Proxy

    Stack Overflow | 12 months ago | Rômulo Deroci da Rocha
    java.lang.ClassCastException: org.jboss.weld.security.Principal$1127466021$Proxy$_$$_Weld$Proxy$ cannot be cast to javassist.util.proxy.ProxyObject

    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

      org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy cannot be cast to javax.validation.executable.ExecutableValidator at org.jboss.weld.proxies.Validator$-976505265$Proxy$_$$_WeldClientProxy.forExecutables(Unknown Source)

      at org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validateMethodInvocation()
    2. Hibernate Validator Portable Extension
      ValidationInterceptor.validateMethodInvocation
      1. org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validateMethodInvocation(ValidationInterceptor.java:73)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    4. Weld Implementation
      SimpleMethodInvocation.invoke
      1. org.jboss.weld.interceptor.proxy.SimpleMethodInvocation.invoke(SimpleMethodInvocation.java:30)
      1 frame
    5. org.jboss.weld
      AbstractInterceptionChain.invokeNextInterceptor
      1. org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNext(AbstractInterceptionChain.java:93)
      2. org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNextInterceptor(AbstractInterceptionChain.java:78)
      2 frames
    6. Weld Implementation
      CombinedInterceptorAndDecoratorStackMethodHandler.invoke
      1. org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:48)
      2. org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:41)
      3. org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:53)
      3 frames
    7. org.jboss.forge
      MethodValidatorTest.testValidationPass
      1. org.jboss.forge.addon.validation.ManagedObject$Proxy$_$$_WeldSubclass.sayHello(Unknown Source)
      2. org.jboss.forge.addon.validation.MethodValidatorTest.testValidationPass(MethodValidatorTest.java:65)
      2 frames