h kang many thanks for quick reproducer. I think I nailed the problem. Your bean MyBean has no package - if you add some, it will start to work. Now, I am not sure about the exact cause, but I know Java 9 has much stricter rules for packages so there might be some additional limitation. Some of the possible causes might be that Java 9 is based on modules and those work with packages based on unique names; a package with no name presents problems in such a scenario. Just for the record, what Weld (very rougly) does here, is that it needs to generate a bytecode for a proxy class which can be intercepted and once we attempt to load such class, you get this error. Seems like the class in not considered valid. Either way, not using packages is a super BAD practice and I would advise you to change to code accordingly. You are bound to see many problems this way (not just with Weld). |