In sharepoint 2016 server i was created two web applications.In first web app i installed wsp files.Site was working withou any issues.
In wsp fiels some of the files as "Web" scoped. some of the wsp files "Site" scoped.
Using that same wsp fiels, in site definition i changed the Template ID. I installed all the wsp to 2nd wep application.
Now the 2nd webapplication site was working.But 1st web application site throwing following error.