Compound or nested property names are perfect but all components of the path except the final property names must be non-null. Otherwise NullPointerException will be thrown.
Here c will be set to 12 but a and b should be non null.Code:
<bean id="sample" class="sample.hello">
<property name="a.b.c" value="12" />