Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1606

ClassCastException - $Proxy$_$$_WeldClientProxy cannot be cast to $Proxy$_$$_WeldSubclass

XMLWordPrintable

    • Hide
      1. Clone the project from GitHub
      2. './gradlew clean test' from root folder (movie-manager)
      3. Watch the tests fail. It'll give a URL to the report where you can see the stacktrace.
      Show
      Clone the project from GitHub './gradlew clean test' from root folder (movie-manager) Watch the tests fail. It'll give a URL to the report where you can see the stacktrace.

      Groovy application with JAX-RS, CDI, Bean Validation and Interceptors, deployed in embedded Jetty. Works when interceptors are not applied. ClassCastException when applying Interceptors.

      java.lang.ClassCastException: name.abhijitsarkar.moviemanager.service.search.MovieSearchService$Proxy$$$_WeldClientProxy cannot be cast to name.abhijitsarkar.moviemanager.service.search.MovieSearchService$Proxy$$$_WeldSubclass
      at name.abhijitsarkar.moviemanager.service.search.MovieSearchService$Proxy$_$$_WeldSubclass$search.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      at name.abhijitsarkar.moviemanager.facade.MovieFacade.advancedSearch(MovieFacade.groovy:63)
      at name.abhijitsarkar.moviemanager.facade.MovieFacade$Proxy$_$$_WeldClientProxy.advancedSearch(Unknown Source)
      at name.abhijitsarkar.moviemanager.facade.MovieFacade$advancedSearch.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      at name.abhijitsarkar.moviemanager.web.MovieResource.advancedSearch(MovieResource.groovy:57)
      at name.abhijitsarkar.moviemanager.web.MovieResource$Proxy$_$$_WeldClientProxy.advancedSearch(Unknown Source)
      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.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
      at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280)
      at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234)
      at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:221)
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
      at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

              rhn-engineering-jharting Jozef Hartinger
              abhijit.sarkar_jira Abhijit Sarkar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: