How to run IBatis in GlassFish

IBatis runs just fine in Sun Java System Application Server however
GlassFish has a new feature: on-demand initialization.
This is a good feature however since I create IBatis SqlMapClient in
static constructor IBatis throws exception. Resources class
that I use can’t find IBatis configuration in classpath.

Finally I learn the change needed to run IBatis in GlassFish.
Create Ibatis SqlMapClient in your servlet class.
You also need to set the default class loader of IBatis Resources
class to your servlet class.


After this small change IBatis runs just fine in GlassFish

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s