I am using NHibernate/oraConnect with the batch_size set to 100. This leads to the following NullReferenceException:
Code: Select all
[NullReferenceException: Object reference not set to an instance of an object.]
NHibernate.AdoNet.OracleDataClientBatchingBatcher.SetObjectParam(Object obj, String paramName, Object paramValue) +88
NHibernate.AdoNet.OracleDataClientBatchingBatcher.DoExecuteBatch(IDbCommand ps) +700
NHibernate.AdoNet.AbstractBatcher.ExecuteBatchWithTiming(IDbCommand ps) +113
NHibernate.AdoNet.AbstractBatcher.ExecuteBatch() +90
NHibernate.AdoNet.AbstractBatcher.OnPreparedCommand() +29
NHibernate.AdoNet.AbstractBatcher.PrepareCommand(CommandType type, SqlString sql, SqlType[] parameterTypes) +36
Code: Select all
protected override void DoExecuteBatch(IDbCommand ps)
{
// snip...
// setting the ArrayBindCount on the OracleCommand
// this value is not a part of the ADO.NET API.
// It's and ODP implementation, so it is being set by reflection
SetObjectParam(currentBatch, "ArrayBindCount", arraySize);
// snip...
}
private void SetObjectParam(Object obj, string paramName, object paramValue)
{
System.Type objType = obj.GetType();
PropertyInfo propInfo = objType.GetProperty(paramName);
propInfo.SetValue(obj, paramValue, null);
}
Our exact same code (a simple call to ISession.Save()) works just fine if I remove the 100 setting from the web.config.
Could you take a look a this for me?
Thx!
Gerben.
Note: I am using the ReflectionBasedDriver for NHibernate class described here: http://www.devart.com/blogs/dotconnect/?p=1857