Ok i got it...
it was the database file test.h2. which is located in my case at "C:\Documents and Settings\admin\".
I just removed it and reinstall the jboss. It worked for me.
Although when I reinstall the server it is created once again but now my programs are working.
If anyone who knows the reason please tell me.
Thanks JBoss Community.