Search code examples
javaweblogicweblogic12c

BeanNotOfRequiredTypeException on Weblogic 12.2.1.3.0


I have an application (EAR) which works fine on Weblogic 12.2.1.0.0.

After I upgraded to Weblogic 12.2.1.3.0 the following exception appeared:

Caused By: com.bea.core.repackaged.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'ConfigurationStoreBean' must be of type [com.abc.xxxxx.config.ConfigurationStore], but was actually of type [com.sun.proxy.$Proxy323]

This is the interface I have:

public interface ConfigurationStore{
    ...
} 

Implementation:

@Lock(LockType.READ)
@Singleton
@Startup
@Local(ConfigurationStore.class)
public class ConfigurationStoreBean implements ConfigurationStore {
    ...
}

Any idea what need to be fixed in order to my code can run on Weblogic 12.2.1.3.0?


Solution

  • After two hard workdays I have found the solution.

    All the @EJB in the project need to be replaced to @Inject.

    The tricky part here was that at the beginning I only amended the @EJBs in related java classes but that was not enough.