After every training class I have ever taken, and fairly often after assisting with scenario-based classes, I have had nightmares. It is just the unconscious mind's way of processing the learning that you've experienced. For me, it is also somewhat a reaction to adrenalin production during the day.
Because of those dreams, I've done a little bit of research & paying attention, and have learned a few things.
First, a lot of people have dreams/nightmares when they first begin carrying a gun, or when they first begin considering concealed carry. Others have such dreams after a worrisome incident, even if nothing much actually happened and the situation resolved itself without much fuss. Again, this is the unconscious mind's way of processing new information, and of working through some emotions that your conscious mind might not be aware of. So -- it's normal to have this kind of dream.
I think the commonly-recurring "gun doesn't fire" dream has two basic causes. First, it's a reflection of your fear that you're not really ready to encounter a criminal. To that extent, it can be resolved simply by getting a little more training and doing some conscious and realistic thinking about your actual level of preparedness. Second, I think that a lot of times it's simply that your brain, having served up the fantasy of needing to fire a shot, kind of pauses and expects auditory feedback. When the 'bang' noise doesn't come from the outside, your brain fills in a reason for the missing sound. So there may not be any underlying unconscious worry -- it might just be the way your sleeping brain is wired.
One thing that has really helped me with unpleasant dreams is to sit down and "replay" the nightmare in my mind's eye, changing the ending to a more satisfying or more appropriate one. For example, if the dream ended with me freezing instead of fighting back, I close my eyes, visualize the scene again, and then picture myself doing what I need to do in order to prevail -- including the BG running away or falling. If I had a dream where the gun did not fire, I visualize the scene again, but picture the shot firing and hitting exactly where I intended to hit.
This kind of visualization really works both to erase the sting of the nightmare, and to reprogram your mind to fight & win. These days, my nightmares are much less fear-based, and more anger-based (eg, I fight rather than freeze or flee). They still aren't much fun to wake up from, but I know my mind has processed what it needed to process and that I am in a better place to fight back if I need to do it.
HTH!~
pax