0

I am not able to resolve a component in through my property files. I have re-created getter setters, checked spellings, even appended components in initial.properties. Its not picking up that path from properties file and showing null when checked from dyn/admin.

It works fine if I copy the path from tha same property file and change value through dyn/admin.

Is there any other way, we can check why this component is not getting resolved?

Class1:

public class OMSCustomerInfoMessageListener extends MessageServiceListener {

private JAXBContext jaxbContext;

private OMSCustomerInfoUpdateManager customerInfoUpdateManager;

-------XXXXXXXXXXX----------------------------------------------

-------XXXXXXXXXXX----rest of code------------------------------

public OMSCustomerInfoUpdateManager getCustomerInfoUpdateManager() {

    return customerInfoUpdateManager;

}

public void setCustomerInfoUpdateManager(OMSCustomerInfoUpdateManager 

pCustomerInfoUpdateManager) {

    customerInfoUpdateManager = pCustomerInfoUpdateManager;

}

}

Class1's properties file:

$class=com.projectname.oms.listener.OMSCustomerInfoMessageListener

$scope=global

customerInfoUpdateManager=/com/projectname/oms/manager/OMSCustomerInfoUpdateManager

Spellings are fine. What could be the issue?

Regards

user3554403
  • 11
  • 1
  • 5
  • In `dyn/admin` look at the `View Service Configuration` for the `CustomerInfoMessageListener`. This should shed some light as to why it is null. Maybe you have two versions of the component file. – radimpe Nov 14 '14 at 19:18
  • When you say "cannot resolve", what behaviour are you seeing? Do you get an error from the Nucleus when it tries to instantiate your `OMSCustomerInfoMessageListener` component, or does it instantiate it fine, but you get a `NullPointerException` when you try to use `customerInfoUpdateManager` inside the component? – Vihung Nov 24 '14 at 14:16

1 Answers1

0

This generally happens in two cases:-

  1. Incorrect Scoping, larger scoped component referring to lower scoped component. OR
  2. Having setters and getters of same property in super class and sub class.

Please check this.