Friday, January 11, 2008

2 - Not able to initialize admin object definitions against db ...

So I was tasked with automating the creation and deletion of BlackBerry users. According to RIM, the recommended way of doing this is by using their BlackBerry Resource Kit -- namely the BlackBerry User Admin Service and Tool.

I've never done anything with BlackBerry before, so needless to say I spent some time making noob errors when trying to install the Admin Service. First off, I was getting this funky error:

MAPILogonEx() failed (80040111) for profile:

Okay, that's easy enough to see what's going on. A missing or invalid MAPI profile. I needed a MAPI profile locally (dammit Jim, I'm a developer, not an admin!). I created one using a tool from Microsoft's website: http://support.microsoft.com/kb/228736

I eventually did get to a sticking point when google no longer helped:

"2 - Not able to initialize admin object definitions against db"

I ran SQL profiler to make sure the service was successfully connecting to the proper database (BESMgmt) and it had rights to do everything -- yep everything was cherry. Still no love though. It seemed to point at a database-related error. I fired up Query Analyzer and looked for a table relating to 'object definitions'. Sure enough, an ObjectDefn table existed. Here's a partial sample record:

<AdminObject name="ServerConfig" dbtable="ServerConfig"><Property clientname="Id" dbname="Id" type="56" length="4" isnullable="0" key="1" /><Property clientname="ServiceName" dbname="ServiceName" type="231" length="512" isnullable="1" /><Property clientnam...


Then it dawned on me: they're storing xml in the database. I didn't verify that msxml 4.0 was installed (per the Admin User Documentation from RIM). So I grabbed MSXML 4.0 from Microsoft's website and installed it. Sure enough, the service could finally start. Yay.

Moral of the story: verify your prereq's before banging your head against the wall.

Long story short:
2 - Not able to initialize admin object definitions against db == wrong version of MSXML installed

Hopefully somebody googles this and doesn't have to recreate my madness :-)