@codrinl hi! You can create your own Metadata implementation and override default implementation by the @Primary annotation ([Spring Docs](Core Technologies)) or by overriding it in the spring.xml file:
<bean id="cuba_Metadata"
class="com.company.app.core.sys.MyMetadataImpl"/>
@prozac631 I tried both and none of them works…
- Primary annotation approach:
@Component(Metadata.NAME)
@Primary
public class ScopeMetadataImpl implements Metadata
- append web\src\web-spring.xml file or core\src\spring.xml file
<bean id="cuba_Metadata" class="com.company.scope.service.ScopeMetadataImpl"/>
same error for both approaches
Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'cuba_Metadata' for bean class [com.company.scope.core.sys.ScopeMetadataImpl] conflicts with existing, non-compatible bean definition of same name and class [com.haulmont.cuba.core.sys.MetadataImpl]
I also changed the namespace to com.company.scope.core.sys.ScopeMetadataImpl as you suggested… but the error still persists. Also, my implementation is identical with the original one i found on github… so i’m 100% sure it’s not my implementation that causes the crash.
Please help !