Before using the static object Adapter::session, initialize it using session.initialize(). Release it using session.release().