Hi ,
Am getting NotWritablePropertyException.
Configurations:
delivery.xml
<bean id="deliveryResponseService" class="com.telenor.cinclus.metermaid.delivery.impl.DeliveryResponseServiceImpl">
<property name="estimationService" ref="estimationManager"/>
<property name="missingReadingDate" value="${delivery.qualityx.missing.date}" />
<property name="powerDownSeconds" value="10" />
</bean>
Below is the code.
public class DeliveryResponseServiceImpl implements DeliveryResponseService {
/** The logger. */
private Log logger = LogFactory.getLog(getClass());
/** Service for estimating missing values. */
private EstimationService estimationService;
private Date missingReadingDate;
private int powerDownSeconds;
/**
* Sets the estimation service.
*
* @param estimationService
* the new estimation service
*/
public void setEstimationService(final EstimationService estimationService) {
this.estimationService = estimationService;
}
public void setMissingReadingDate(String missingReadingDate) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss.SSS");
try {
this.missingReadingDate = sdf.parse(missingReadingDate);
} catch (ParseException pex) {
String defaultTime = "1900-Jan-01 00:00:00.000";
logger.error("Wrong dateformat: " + missingReadingDate + ". Using default. (" + defaultTime +")");
try { this.missingReadingDate = sdf.parse(defaultTime); }
catch (Exception ex) {}
}
}
public int getPowerDownSeconds() {
return powerDownSeconds;
}
public void setPowerDownSeconds(int powerDownSeconds) {
this.powerDownSeconds = powerDownSeconds;
}
}
Please help on this . I am using Maven to build the project. After generating jars , am checking the class file whether it is getting updated or not, the propety is updated with setter and getter methods.
Still i am not able to find the root cause this Exception. Spring Configuration files are loading in one application and this Class is in other application.
Please help to resolve this exception