“Cannot find Getter” even though its there!

I faced this issue today,
i got this error
"Could not find a getter for xBorderOneWayCd in class com.test.sample.vo"
while using hibernate, i could not find out what was wrong, the getter is there in the vo but yet it says it cant find the getter....turns out the problem is with the character "x" in the String name.

i renamed the character to borderOneWay and it works like a dream!

In a related note, there is one other reason which could cause this error, if you declare a string with a capital first character say "String SampleData" instead of "String sampleData" then again you would face this error.



About this entry