[weld-issues] [JBoss JIRA] (WELD-769) Intercepting a method in a bean where another method is final causes a VerifyError

Richard Kennard (JIRA) jira-events at lists.jboss.org
Fri May 25 02:49:18 EDT 2012


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

Richard Kennard commented on WELD-769:
--------------------------------------

Hi guys,

I'm confused that this issue is marked 'closed'? I seem to be getting the exact same error on JBoss 6.1.0.Final. I even tried upgraded its internal Weld to 1.2.0-SNAPSHOT using 'mvn -Pupdate-jboss-as'.

I still get:

{{16:45:13,215 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=vfs:///N:/jboss-6.1.0.Final/server/all/deploy/avant-ss-app.ear_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.WeldException: by java.lang.VerifyError: class com.avant.ss.ejb.session.member.ReportHistoryBean$Proxy$_$$_Weld$Proxy$ overrides final method lockById.(Ljava/lang/Class;Lcom/kennardconsulting/core/simpletype/PersistentEntityId;)Lcom/kennardconsulting/core/ejb/entity/PersistentEntity;
	at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:282) [:2012-05-24 16:26]
	at org.jboss.weld.bean.SessionBean.initProxyClass(SessionBean.java:230) [:2012-05-24 16:26]
	at org.jboss.weld.bean.SessionBean.initialize(SessionBean.java:162) [:2012-05-24 16:26]
	at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:116) [:2012-05-24 16:26]
	at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:217) [:2012-05-24 16:26]
	at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:358) [:2012-05-24 16:26]
	at org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.boot(BootstrapBean.java:92) [:6.1.0.Final]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_24]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
	at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.1.SP1]
	at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.1.SP1]
	at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.1.SP1]
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.SP2]
	at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.SP2]
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.SP2]
	at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.SP2]
	at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202) [jboss-kernel.jar:2.2.0.SP2]
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.SP2]
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.2.GA]
	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.2.GA]
	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.2.GA]
	at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.1.0.Final]
	at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
	at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]
	at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.SP2]
	at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]
	at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]
	at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]
	at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]
	at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]
	at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]
	at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]
	at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]
	at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.1.0.Final]
	at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]
	at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
	at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
	at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
Caused by: javassist.CannotCompileException: by java.lang.VerifyError: class com.avant.ss.ejb.session.member.ReportHistoryBean$Proxy$_$$_Weld$Proxy$ overrides final method lockById.(Ljava/lang/Class;Lcom/kennardconsulting/core/simpletype/PersistentEntityId;)Lcom/kennardconsulting/core/ejb/entity/PersistentEntity;
	at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:99) [:2012-05-24 16:26]
	at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:385) [:2012-05-24 16:26]
	at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:275) [:2012-05-24 16:26]
	... 63 more
Caused by: java.lang.VerifyError: class com.avant.ss.ejb.session.member.ReportHistoryBean$Proxy$_$$_Weld$Proxy$ overrides final method lockById.(Ljava/lang/Class;Lcom/kennardconsulting/core/simpletype/PersistentEntityId;)Lcom/kennardconsulting/core/ejb/entity/PersistentEntity;
	at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_24]
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_24]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24]
	at sun.reflect.GeneratedMethodAccessor391.invoke(Unknown Source) [:1.6.0_24]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
	at org.jboss.weld.util.bytecode.ClassFileUtils.toClass2(ClassFileUtils.java:118) [:2012-05-24 16:26]
	at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:95) [:2012-05-24 16:26]
	... 65 more}}

I understand what it's saying, so are final methods simply not supported in Weld?
                
> Intercepting a method in a bean where another method is final causes a VerifyError
> ----------------------------------------------------------------------------------
>
>                 Key: WELD-769
>                 URL: https://issues.jboss.org/browse/WELD-769
>             Project: Weld
>          Issue Type: Bug
>          Components: Proxies
>    Affects Versions: 1.1.0.Beta2
>            Reporter: Adam Warski
>            Assignee: Stuart Douglas
>             Fix For: 1.1.0.CR1
>
>         Attachments: weld.11.bugs.tar.gz
>
>
> Used to work fine until AS6 CR1 (tested in M2 and M4). 
> Stack trace:
> org.jboss.arquillian.impl.event.FiredEventException: java.lang.RuntimeException: Could not inject members
> 	at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)
> 	at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
> 	at org.jboss.arquillian.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:97)
> 	at org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(Arquillian.java:89)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:644)
> 	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:443)
> 	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:160)
> 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:494)
> 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:700)
> 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1002)
> 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137)
> 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121)
> 	at org.testng.TestRunner.runWorkers(TestRunner.java:908)
> 	at org.testng.TestRunner.privateRun(TestRunner.java:617)
> 	at org.testng.TestRunner.run(TestRunner.java:498)
> 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:329)
> 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:324)
> 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:296)
> 	at org.testng.SuiteRunner.run(SuiteRunner.java:201)
> 	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:915)
> 	at org.testng.TestNG.runSuitesLocally(TestNG.java:879)
> 	at org.testng.TestNG.run(TestNG.java:787)
> 	at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:75)
> 	at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:92)
> Caused by: java.lang.RuntimeException: Could not inject members
> 	at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectClass(CDIInjectionEnricher.java:103)
> 	at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.enrich(CDIInjectionEnricher.java:52)
> 	at org.jboss.arquillian.impl.handler.TestCaseEnricher.callback(TestCaseEnricher.java:42)
> 	at org.jboss.arquillian.impl.handler.TestCaseEnricher.callback(TestCaseEnricher.java:32)
> 	at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
> 	... 27 more
> Caused by: org.jboss.weld.exceptions.DeploymentException: by java.lang.VerifyError: class pl.softwaremill.weldbugs.bug2.org$jboss$weld$bean-1ed4ae51-6ceb-40b2-899a-ed6d1f90409e$jar-ManagedBean-class_pl$softwaremill$weldbugs$bug2$TestBean2_$$_WeldProxy overrides final method someMethod.()V
> 	at org.jboss.weld.bean.ManagedBean.applyInterceptors(ManagedBean.java:569)
> 	at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.produce(ManagedBean.java:250)
> 	at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:332)
> 	at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:59)
> 	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:669)
> 	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:743)
> 	at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:137)
> 	at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:869)
> 	at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:881)
> 	at org.jboss.weld.manager.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:122)
> 	at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:54)
> 	at org.jboss.weld.manager.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:116)
> 	at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectNonContextualInstance(CDIInjectionEnricher.java:113)
> 	at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectClass(CDIInjectionEnricher.java:93)
> 	... 31 more
> Caused by: org.jboss.weld.exceptions.WeldException: by java.lang.VerifyError: class pl.softwaremill.weldbugs.bug2.org$jboss$weld$bean-1ed4ae51-6ceb-40b2-899a-ed6d1f90409e$jar-ManagedBean-class_pl$softwaremill$weldbugs$bug2$TestBean2_$$_WeldProxy overrides final method someMethod.()V
> 	at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:268)
> 	at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:198)
> 	at org.jboss.weld.bean.ManagedBean.applyInterceptors(ManagedBean.java:564)
> 	... 44 more
> Caused by: javassist.CannotCompileException: by java.lang.VerifyError: class pl.softwaremill.weldbugs.bug2.org$jboss$weld$bean-1ed4ae51-6ceb-40b2-899a-ed6d1f90409e$jar-ManagedBean-class_pl$softwaremill$weldbugs$bug2$TestBean2_$$_WeldProxy overrides final method someMethod.()V
> 	at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:117)
> 	at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:376)
> 	at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:264)
> 	... 46 more
> Caused by: java.lang.VerifyError: class pl.softwaremill.weldbugs.bug2.org$jboss$weld$bean-1ed4ae51-6ceb-40b2-899a-ed6d1f90409e$jar-ManagedBean-class_pl$softwaremill$weldbugs$bug2$TestBean2_$$_WeldProxy overrides final method someMethod.()V
> 	at java.lang.ClassLoader.defineClass1(Native Method)
> 	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.jboss.weld.util.bytecode.ClassFileUtils.toClass2(ClassFileUtils.java:143)
> 	at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:109)
> 	... 48 more

--
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