I agree with Luc, going via Paris only makes sense if you have at least 3 full days to spend there.
Flying from Barcelona to Prague will be much cheaper than travelling by train, so I would only do it if you really like travelling overland for long distances and have time to stop for a day or two on the way to get a glimpse at a city. Besides Paris, you could stop in Marseilles, Lyon or Geneva (for example). All are "on the way" to Prague so you will not loose time by going via them. From there, the best connections seems to be to travel by train to Mannheim and there change to a bus.