You are telling GlassFish that your module is an app client module. A <java> entry identifies app clients, not library JARs.
The spec, although large, is clear about this, and about how you can put library JARs in the EAR's /lib directory (or you can specify another directory within the EAR using the <library-directory> element in your application.xml.
Remove the <java> entry if it is not an app client. If I recall correctly GlassFish 3.1 no longer throws the NPE, but I think incorrectly identifying the library as an app client is the source of your problem.
- Tim
[Message sent by forum member 'tjquinn']
http://forums.java.net/jive/thread.jspa?messageID=480854