Did any one before adi shankara believe that only Brahman exist and the world is an illusion. Or adi shankara was the first one to bring this doctrine of non dualism.
Prof Chandradhar Sharma in "Advaita Tradition in Indian Philosophy" Page 124-125 writes
References to some ancient teachers of Vedanta are found in the Vedanta literature, but their works, if they composed any, are not extant. Badarayana in his Brahma-sutra names some teachers of old citing their views. They are: Jaimini, Ashmarathya, Badari, Audulomi, Kashakrtsna, Karsnajini and Atreya. Of these Jaimini is the famous author of Purva-Mimamsa-Sutra. Kashkrtsna probably was an Advaitin, because Shankara refers to his view as agreeing with the Shruti. Dravidacharya and Tanka are claimed as Advaitan by their tradition. Shankara refers to Upavarsa and Ramanuja to Bodhayana as ‘vrtttikara.’ Brahmadatta and Sundara Pandya were also leading teachers of their time and from the references to their views it is very probable that they were inclined towards Advaita. Bhartrhari, whose Vakyapadiya, the famous work on the philosophy of grammar and language, is available was a renowned Shabdadvaitavadin. Though he was an uncompromising Advaitin and a supporter of vivartavada, he is primarily a philosopher of grammar and language and his Advaita is different from that of Shankara. There are two works on Vedanta, the Paramdrtha-sara attributed to Adi-Shesa (later on adapted and expanded under the same name by Abhinavagupta into a handbook of Pratyabhijhd-darshana)and the Yogavasistha attributed to the sage Vasistha, which bear some doctrinal and terminological similarities with Gaudapada’s Karika.
Also King Yayati in Mahabharata(Much before Shankaracharya) held a similar view.
Yayati answered "The wise, with the help of the Vedas, and of Knowledge, having ascertained the visible universe to be illusory, instantly realises the Supreme Spirit as the sole existent independent essence." (Mahabharata Adi Parva Section XCII )