[weld-issues] [JBoss JIRA] (WELD-996) ClassCastException validating custom Interceptor implementation

Ales Justin (Commented) (JIRA) jira-events at lists.jboss.org
Mon Oct 31 08:51:46 EDT 2011


    [ https://issues.jboss.org/browse/WELD-996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638523#comment-12638523 ] 

Ales Justin commented on WELD-996:
----------------------------------

OK, fix it accordingly then.
But I guess that means then we shouldn't (and can't) do a check on actual Interceptor instance.

                
> ClassCastException validating custom Interceptor implementation
> ---------------------------------------------------------------
>
>                 Key: WELD-996
>                 URL: https://issues.jboss.org/browse/WELD-996
>             Project: Weld
>          Issue Type: Bug
>    Affects Versions: 1.1.2.Final
>            Reporter: Jozef Hartinger
>            Assignee: Jozef Hartinger
>            Priority: Critical
>             Fix For: 1.2.0.Beta1
>
>
> Having a custom implementation of the Interceptor interface registered with Weld, the validation always fails if the interceptor happens to intercept a passivation capable bean. Weld incorrectly casts the interceptor to InterceptorImpl which is not valid for extension-provided interceptors.
> {noformat}
> java.lang.ClassCastException: org.jboss.seam.classic.intercept.ClassicInterceptor cannot be cast to org.jboss.weld.bean.InterceptorImpl
>         at org.jboss.as.weld.services.WeldService.start(WeldService.java:96)
>         at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
>         at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
>         at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
> Caused by: java.lang.ClassCastException: org.jboss.seam.classic.intercept.ClassicInterceptor cannot be cast to org.jboss.weld.bean.InterceptorImpl
>         at org.jboss.weld.bootstrap.Validator.validateInterceptors(Validator.java:171)
>         at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:151)
>         at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:351)
>         at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:336)
>         at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:404)
>         at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
>         at org.jboss.as.weld.services.WeldService.start(WeldService.java:89)
>         ... 5 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list