NHibernate 3.2 and batch processing - not supported???

NHibernate 3.2 and batch processing - not supported???

Postby JomKippur » Thu 15 Dec 2011 22:06

I'm using Devart dotConnect for Oracle 6.60 with NHibernate 3.2 and with batch enabled () and I got this:

System.NotSupportedException: Specified method is not supported.
at Devart.Data.Oracle.OracleUtils.c(Type A_0)
at Devart.Data.Oracle.OracleParameter.get_OracleDbType()
at Devart.Data.Oracle.OracleParameter.b()
at Devart.Data.Oracle.OracleCommand.b()
at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
at Devart.Data.Oracle.NHibernate.NHibernateOracleCommand.a()
at NHibernate.AdoNet.OracleDataClientBatchingBatcher.DoExecuteBatch(IDbCommand ps)
at NHibernate.AdoNet.AbstractBatcher.ExecuteBatchWithTiming(IDbCommand ps)
at NHibernate.AdoNet.OracleDataClientBatchingBatcher.AddToBatch(IExpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session)
at NHibernate.Action.EntityInsertAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
at NHibernate.Impl.SessionImpl.Flush()
at Spring.Data.NHibernate.HibernateTemplate.FlushAction(ISession session) in c:\Program Files\Spring.NET 1.3.2\src\Spring\Spring.Data.NHibernate\Data\NHibernate\HibernateTemplate.cs:line 469


Help! :)
JomKippur
 
Posts: 17
Joined: Wed 31 Aug 2011 15:46

Postby Shalex » Tue 20 Dec 2011 12:04

Have you implemented the DevartOracleDriver class as it is described at http://www.devart.com/blogs/dotconnect/index.php/nhibernate_and_oracle.html?
Shalex
Devart Team
 
Posts: 7377
Joined: Thu 14 Aug 2008 12:44

Postby JomKippur » Tue 20 Dec 2011 13:35

Exactly the same way and it doesn't work with batch processing

Greetings
JK
JomKippur
 
Posts: 17
Joined: Wed 31 Aug 2011 15:46

Postby Pinturiccio » Wed 04 Jan 2012 14:35

We have fixed the bug with OracleParameter array binding. We will post here when the corresponding build of dotConnect for Oracle is available for download.
Pinturiccio
Devart Team
 
Posts: 1862
Joined: Wed 02 Nov 2011 09:44

Postby Pinturiccio » Fri 13 Jan 2012 08:38

The new build of dotConnect for Oracle 6.60.283 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23129
Pinturiccio
Devart Team
 
Posts: 1862
Joined: Wed 02 Nov 2011 09:44

Postby JomKippur » Thu 23 Feb 2012 10:31

With version 6.70.302.0 I still have a problem.

This time I got this:

Code: Select all
System.InvalidCastException: Object cannot be cast to DBNull.
   at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
   at System.Decimal.System.IConvertible.ToType(Type type, IFormatProvider provider)
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Devart.Data.Oracle.OracleParameter.a(aa& A_0, Boolean A_1, Boolean A_2, OracleCommand A_3, Byte[] A_4, Hashtable A_5, ai A_6)
   at Devart.Data.Oracle.OracleCommand.a(OracleParameterCollection A_0, aa[] A_1, c3 A_2, ai A_3)
   at Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
   at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
   at Devart.Data.Oracle.NHibernate.NHibernateOracleCommand.a()
   at NHibernate.AdoNet.OracleDataClientBatchingBatcher.DoExecuteBatch(IDbCommand ps)
   at NHibernate.AdoNet.AbstractBatcher.ExecuteBatchWithTiming(IDbCommand ps)
   at NHibernate.AdoNet.OracleDataClientBatchingBatcher.AddToBatch(IExpectation expectation)
   at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)
   at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session)
   at NHibernate.Action.EntityInsertAction.Execute()
   at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
   at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
   at NHibernate.Engine.ActionQueue.ExecuteActions()
   at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
   at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
   at NHibernate.Impl.SessionImpl.Flush()
   at Spring.Data.NHibernate.HibernateTemplate.FlushAction(ISession session) in c:\Program Files\Spring.NET 1.3.2\src\Spring\Spring.Data.NHibernate\Data\NHibernate\HibernateTemplate.cs:line 469
   at Spring.Data.NHibernate.ExecuteHibernateCallbackUsingDelegate.DoInHibernate(ISession session) in c:\Program Files\Spring.NET 1.3.2\src\Spring\Spring.Data.NHibernate\Data\NHibernate\HibernateTemplate.cs:line 1830
   at Spring.Data.NHibernate.HibernateTemplate.Execute(IHibernateCallback action, Boolean exposeNativeSession) in c:\Program Files\Spring.NET 1.3.2\src\Spring\Spring.Data.NHibernate\Data\NHibernate\HibernateTemplate.cs:line 962
   at Spring.Data.NHibernate.HibernateTemplate.Execute(HibernateDelegate del, Boolean exposeNativeSession) in c:\Program Files\Spring.NET 1.3.2\src\Spring\Spring.Data.NHibernate\Data\NHibernate\HibernateTemplate.cs:line 860
   at Spring.Data.NHibernate.HibernateTemplate.Flush() in c:\Program Files\Spring.NET 1.3.2\src\Spring\Spring.Data.NHibernate\Data\NHibernate\HibernateTemplate.cs:line 464
   at Spring.Data.NHibernate.Generic.HibernateTemplate.Flush() in c:\Program Files\Spring.NET 1.3.2\src\Spring\Spring.Data.NHibernate12\Data\NHibernate\Generic\HibernateTemplate.cs:line 456


Help!!!!!!!!!!!!!!!!!!!

JK
JomKippur
 
Posts: 17
Joined: Wed 31 Aug 2011 15:46

Postby Shalex » Wed 29 Feb 2012 15:24

We have checked workability of NHibernate 3.2 batch update via dotConnect for Oracle v 6.70.302. It works. Apparently, the problem is specific for your project. Please send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment.
Shalex
Devart Team
 
Posts: 7377
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle