org.jboss.weld.exceptions.WeldException: Cannot load variable at 0 while deploying CDI in JBoss EAP 7.4.20

Solution Verified - Updated -

Issue

  • JBoss suddenly failed to deploy the EAR due to the following error
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."deployment.app.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."deployment.app.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.exampleconverter.controller.ExampleTempertureConverter] with qualifiers [@Default @Any @Named] with class class org.jboss.as.quickstarts.exampleconverter.controller.ExampleTempertureConverter
.
.
.
Caused by: org.jboss.weld.exceptions.WeldException: Cannot load variable at 0. Local Variables: Local Variables: []
.
.
.

Caused by: org.jboss.classfilewriter.InvalidBytecodeException: Cannot load variable at 0. Local Variables: Local Variables: []
  • Application is compiled by EJC (Eclipse Compiler for Java)

  • Weld when compiled with javac is working but not with EJC (Eclipse Compiler for Java)

Environment

  • JBoss Enterprise Application Platform
    • 7.4.20
    • 8.0.5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content