This turned out to be line 25 in the code you posted here, is it also line 25 in your text editor?
If so then it's the "prod" variable which must be null. And that implies that in line 24,
dao.produitParMC("%a%") returned null. Is that something which you could expect from that method? If so,
you should check for null and only proceed with using the result if it isn't null.