I guess, you are initializing datasource and connection in the constructor.
When you use the BuildClass for the first time by calling the static method getCMSPage(), db and conn will not be initialized as there wasn't any instance of BuildCms created yet.
[Message sent by forum member 'jr158900' (jr158900)]
http://forums.java.net/jive/thread.jspa?messageID=243992