Description
During server start objects are being de-serialized and a cast statement is resulting in exception prevent the server to start.
org.apache.directory.server.UberjarMain] - Failed to start the service.
org.apache.directory.api.ldap.model.exception.LdapOtherException: java.lang.Integer cannot be cast to java.lang.Long
at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.<init>(JdbmTable.java:166)
The first constructor in JdbmTable has following
count = ( Long ) recMan.fetch( recId );
The second constructor handles this issue, hence similar logic should be applied in first constructor.
Object value = recMan.fetch( recId );
if ( value instanceof Integer )
{
count = ( ( Integer ) value ).longValue();
}
else
{
count = ( Long ) value;
}
Tested in M16 snapshot build and it resolved the cast exception.