thanks a million,  the cause of the problem was bugging me every day. I can't stop thinking about it. LOL

U helped me overcome this problem.

My reflection:
I roughly know it was the ArrayIndexOutOfBoundsException: -1 giving problem,  but i didn't know -1 was a illegal state in java ArrayIndexOutOfBoundsException: -1, thus unable to overcome it myself. ;D   I was trying many ways but just can't solve it alone.

Thanks!