"WELD-000075 Normal scoped managed bean implementation class has a public field" error on EAP 6 when using Dynatrace

Solution Verified - Updated -

Environment

  • JBoss Enterprise Application Platform (EAP) 6

Issue

When Dynatrace (a monitor tool) has its agent hooked up in JBoss, the deployment failed with

WELD-000075 Normal scoped managed bean implementation class has a public field

Our application scoped bean (weld managed) has no public field at all.

Root Cause

Dynatrace is adding a public field to the class in it's agent's bytecode transformer.

When you using normal scoped (not @Dependent or @Singleton) scoped beans, a CDI implementation like Weld needs to create a proxy for the bean. It can proxy all non-final methods etc, but cannot proxy public fields. This is a technical limitation, but one that is impossible for any implementation to overcome.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments