I wish to deploy and execute a VDB in teiid server. I am using the VDB that was working properly in legacy metamatrix and tried to deploy and execute but i am faing javanullpointerexception..I am a new user to teiid..

You'll need to bring the legacy MetaMatrix models into Teiid Designer, then re-build prior to deploying to a teiid server. There have been changes since the legacy MetaMatrix days - a MetaMatrix VDB is not guaranteed to work with teiid without re-validating.

Yes, I rebuilded the meatamatrix models in teiid designer then I deployed in teiid server. But still I am facing the issue. And also once I undepoy the VDB from the server and try to redeploy it, I am not able to redeploy the VDB.

As mentioned above the VDB from Metamatrix will not work as is. You need to extract models from the Metamatrix VDB project, and rebuild/validate the project in Teiid Designer. Then rebuild VDB (make note that configuring connectors in Metamatrix and Translators in Teiid are different) before deploying to the Teiid server. You also need to configure the data sources in Teiid.

Also delete the "teiid" directory under the "<jboss-as>/server/<profile>/data" to remove any cached content, then re-start.

I suggest you taking quick tour of "Quick Start Example", to understand the basics of Teiid, before diving into migration.