My un-educated guess is that you are including the EE-APIs and then NB is trying to run the application against them and not the actual implementations in the server. At least that is what some quick googling might suggest.
I don't think it's that simple. NetBeans works fine for SOME CDI configurations, and what is failing now isn't very different from what was working a few hours earlier. So I don't think it's a general configuration issue.
That crummy error message is very infuriating. Is there some way of cranking up the log level to find out in more detail what Weld is trying to achieve?
It wasn't Weld's fault in the end. NetBeans sometimes generates files <error>.class, and naturally Weld isn't prepared for that kind of nonsense. I'll have to find out why NetBeans does this.