com.rim.bes.bas.usermanager. entity.UserEntity.failedLoginCount BES Console wont sign in

Had an interesting scenario at a clients yesterday. After a recent upgrade of their infrastructure of Blackberry Enterprise Server to Service Pack 2 MR 2 they couldn’t sign into the BES Console with both Active Directory credentials or local BES accounts. It seems that they had two compounding issues one was that SQL database for BesMgmt had corrupted fields for the admin account. When they tried to sign in with the local BES admin account they received the error (at DEBUG Level 3) :

Caused by: org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.rim.bes.bas.usermanager.entity.UserEntity.failedLoginCount
 at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:85)
 at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337)
 at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200)
 at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3570)
 at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129)
 at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
 at org.hibernate.loader.Loader.doQuery(Loader.java:729)

I traced this fault to the SQL database – BESMgmt. Within the table BASUsers there is a column called: failedLoginCount in that row the admin user had a “failedLoginCount” of NULL, I then replace this field to 0 (zero) and the admin account worked again.

Next issue when they tried to manage certain users the console raised the error: “The request could not be completed” I then traced this fault to the same table BASUsers and again those users had NULL fields in the column “failedLoginCount” replacing NULL with 0 then allowed the user to be managed once again.

The client was now happy that they could sign in and administer their users once again. But Active Directory Authentication was still broken and they weren’t prepared to spend any more time on it, so I packed up tools and rode off into the sunset.