Non-triviality of Tate cohomology for certain classes of finite p-groups