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.

Download Devcon for Windows 7

Its a small file and a big download if you want to get it from Microsoft, So I’ll host it here until M$ tell me to stop. Download Devcon.exe 32bit Windows 7 Version

VBScript SDK – Bookmark

I’m always losing the Windows Scripting Host Reference section. So here is my bookmark

Useful AWK oneliner

awk ‘/:/ {name=$1} ; /lastu/ {print name $3}’ /input/filename

Download ncat Win32 (precompiled)

December 2012 Update: A newer precompiled version is available here: http://nmap.org/ncat/

So I was having a hunt around for the modified version of Netcat which is called Ncat developed by the lovely people who wrote the infamous port scanner Nmap. I needed the Win32 binaries for it and after a brief internet trowel it couldn’t be found. So I downloaded the source and compiled it and made it presentable for download for everyone else.
Ncat-5.21 Packed with UPX Packer
Ncat-5.21 without UPX Packer
Happy Ncatting :-)