-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
False
-
None
-
False
-
-
-
-
-
-
-
In some situations, e.g. where both a bean class and its superclass have lambdas, Eclipse ECJ will generate synthetic methods to represent the lambda that appear to Weld to be methods that it needs to intercept. This will fail, leading to exceptions like the following during application deployment:
03/01/2025 12:26:19,480 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."temperature-converter-1.0.0.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."temperature-converter-1.0.0.war".WeldStartService: Failed to start service at org.jboss.msc@1.4.13.Final-redhat-00001 //org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731) at org.jboss.msc@1.4.13.Final-redhat-00001 //org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559) at org.jboss.threads@2.4.0.Final-redhat-00001 //org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads@2.4.0.Final-redhat-00001 //org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: org.jboss.weld.exceptions.WeldException: WELD-001524: Unable to load proxy class for bean Managed Bean [class org.jboss.as.quickstarts.temperatureconverter.controller.TemperatureConverter] with qualifiers [@Default @Any @Named] with class class org.jboss.as.quickstarts.temperatureconverter.controller.TemperatureConverter at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:409) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.injection.producer.SubclassedComponentInstantiator.createEnhancedSubclass(SubclassedComponentInstantiator.java:113) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.injection.producer.SubclassedComponentInstantiator.initEnhancedSubclass(SubclassedComponentInstantiator.java:86) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.injection.producer.SubclassedComponentInstantiator.<init>(SubclassedComponentInstantiator.java:79) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.injection.producer.SubclassedComponentInstantiator.forInterceptedDecoratedBean(SubclassedComponentInstantiator.java:63) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.injection.producer.BeanInjectionTarget.initializeAfterBeanDiscovery(BeanInjectionTarget.java:121) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.injection.producer.InjectionTargetInitializationContext.initialize(InjectionTargetInitializationContext.java:42) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.injection.producer.InjectionTargetService.initialize(InjectionTargetService.java:63) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:486) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:86) at org.jboss.as.weld@7.4.20.GA-redhat-00001 //org.jboss.as.weld.WeldStartService.start(WeldStartService.java:97) at org.jboss.msc@1.4.13.Final-redhat-00001 //org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739) at org.jboss.msc@1.4.13.Final-redhat-00001 //org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701) ... 4 more Caused by: org.jboss.weld.exceptions.WeldException: Cannot load variable at 0. Local Variables: Local Variables: [] at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bean.proxy.InterceptedSubclassFactory.addMethodsFromClass(InterceptedSubclassFactory.java:312) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bean.proxy.InterceptedSubclassFactory.addMethods(InterceptedSubclassFactory.java:137) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:475) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:401) ... 16 more Caused by: org.jboss.classfilewriter.InvalidBytecodeException: Cannot load variable at 0. Local Variables: Local Variables: [] at org.jboss.classfilewriter@1.2.5.Final-redhat-00001 //org.jboss.classfilewriter.code.CodeAttribute.aload(CodeAttribute.java:196) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bean.proxy.InterceptedSubclassFactory.createDelegateToSuper(InterceptedSubclassFactory.java:397) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bean.proxy.InterceptedSubclassFactory.createDelegateToSuper(InterceptedSubclassFactory.java:391) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bean.proxy.InterceptedSubclassFactory.createDelegateMethod(InterceptedSubclassFactory.java:580) at org.jboss.weld.core@3.1.10.Final-redhat-00001 //org.jboss.weld.bean.proxy.InterceptedSubclassFactory.addMethodsFromClass(InterceptedSubclassFactory.java:219) ... 19 more
Note: the stack trace above appears to be about EAP quickstart code, but the code that resulted in this was modified. This issue is not about the EAP quickstarts.
- is depended on by
-
JBEAP-28827 [GSS](8.0.z) WELD-2806 - Weld attempts to intercept synthetic methods generated for lambdas by Eclipse ECJ
- Pull Request Sent
-
JBEAP-28828 [GSS](7.4.z) WELD-2806 - Weld attempts to intercept synthetic methods generated for lambdas by Eclipse ECJ
- Pull Request Sent
- relates to
-
WELD-2806 Prevent compiled lambdas in class from being processed as interceptable methods
- Resolved