This issue only occurs in deployments where a single classloader is used for loading several subsequent deployments - such as unit tests that use embedded weld container.
When a client proxy is created for a normal-scoped bean, the beanId (which contains identification information of the defining BDA) is hardcoded in the proxy class.
If another subsequent microdeployment bundles the same normal-scoped bean, the classloader uses the proxy class from the previous microdeployment. The proxy class instance then fails to deserialize properly since the beanId may no longer be used in the current deployment (the BDA name may be different)
|