Hi Puzanovs,
Thanks for your input and the issue has been fixed now.
The way of calling the service (I18nTenantRuntimeExtension) should be something different in AEM 6.4.
Below are the fix:
- Removed felix annotations and placed OSGI annotations.
- Added org.apache.sling.scripting.sightly.compiler.java dependency in parent.pom and bundle.pom. This is the dependency which we are using for RuntimeExtension interface.
- In I18nTenantRuntimeExtension the property value is “i18ntranslation” in AEM 6.1, but the property value should be “i18n” in AEM 6.4
In felix (before fix):
@Component
@Service(RuntimeExtension.class)
@Properties({
@Property(name = RuntimeExtension.NAME,
value = I18nTenantRuntimeExtension.I18N_TRANSLATION_FUNCTION),
@Property(name = Constants.SERVICE_RANKING, intValue = 10000)})
public class I18nTenantRuntimeExtension implements RuntimeExtension {
@Reference
private ConfigService configService;
private static final Logger LOG = LoggerFactory.getLogger(I18nTenantRuntimeExtension.class);
public static final String I18N_TRANSLATION_FUNCTION = "i18nTranslation";
public static final String KEY_PREFIX = "Key: ";
In OSGI (after fix):
@Component(
service = RuntimeExtension.class,immediate = true,
property = {
I18nTenantRuntimeExtension.NAME + "=" + I18nTenantRuntimeExtension.I18N,
I18nTenantRuntimeExtension.SERVICE_RANKING + "=" + 10000
}
)
public class I18nTenantRuntimeExtension implements RuntimeExtension {
private ConfigService configService;
@Reference
public void bindConfigService(ConfigService configService) {
this.configService = configService;
}
public void unbindConfigService(ConfigService configService) {
this.configService = configService;
}
private static final Logger LOG = LoggerFactory.getLogger(I18nTenantRuntimeExtension.class);
public static final String NAME = "org.apache.sling.scripting.sightly.extension.name";
public static final String I18N = "i18n";
public static final String SERVICE_RANKING = "service.ranking";
public static final String KEY_PREFIX = "Key: ";
Thanks smacdonald2008 gauravb10066713 bsloki @Jorg
Thanks,
Vijay