A small number of #-declension nouns have a special ending after в and/or на to indicate location, where for other nouns you would expect the Prepositional ending. This ending is called the Locative case and it is always stressed: -џ/-є. These nouns do have a Prepositional case ending, too; compare:
Prep. Ћн говорќл о шкђфе. He was talking about the cupboard.
Loc. Рємки в шкафџ. The wine glasses are in the cupboard.
A dictionary should tell you whether or not a noun has a Locative case and, if so, which preposition it goes with. Other such nouns: КрІм 'Crimea', пћл 'floor'.
Ћн живёт в Крымџ (Loc.). He lives in the Crimea.
Кнќга лежќт на полџ (Loc.). The book is lying on the floor.