There is no exception to the rule saying that the relative pronoun is always in an element that is at the beginning of the clause (this element is often the pronoun itself).
(CoGEL § 6.32) Relative pronouns Relative pronouns introduce relative clauses, eg:
- The book which you ordered last month has arrived. [1]
In [1], the relative pronoun which introduces the relative clause which you ordered last month. Relative pronouns differ from personal pronouns in that the element which contains or comprises the relative pronoun is always placed at the beginning of the clause, whether it is subject, complement, adverbial, postmodifier, prepositional complement, or object (as in [1]). […]
The bed, the owner of which we had seen previously, … (This is a correct construction, but it is reckoned with as stiffly formal and cumbersome (CoGEL).)
- (Instead) The bed, of which we had previously seen the owner,
The bed, lying on which was a small cat, (This is incorrect)
- (Instead) The bed, on which was lying a small cat