This is a migrated thread and some comments may be shown as answers.

scope.Transaction.Commit() - More info needed from stacktrace

6 Answers 53 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Delton Phillips
Top achievements
Rank 1
Delton Phillips asked on 02 Aug 2010, 02:22 AM
Hi,

on committing of two objects i'm getting the following exception and stack trace. Can anyone tell me if it's possible
to get better data to help trace down the problem? Any clue where I should be looking?

[NullReferenceException: Object reference not set to an instance of an object.]
   OpenAccessRuntime.Relational.metadata.RelationalLinkCollectionField.insertUnorderedLinkTableRows(OID oid, Object[] inserted, PreparedStatement psins, Boolean batch, String sql) +227
   OpenAccessRuntime.Relational.metadata.RelationalLinkCollectionField.persistPass2BlockUnordered(PersistGraph graph, Int32 blockStart, Int32 blockEnd, CharBuf s, Connection con, Boolean batchInserts, Boolean batchUpdates) +1475
   OpenAccessRuntime.Relational.metadata.RelationalLinkCollectionField.persistPass2Block(PersistGraph graph, Int32 blockStart, Int32 blockEnd, CharBuf s, Connection con, Boolean batchInserts, Boolean batchUpdates) +123
   OpenAccessRuntime.Relational.RelationalStorageManager.persistPass2(PersistGraph graph) +649
   OpenAccessRuntime.Relational.RelationalStorageManager.doUpdates(StatesToStore toStore, StateContainer container, Boolean retainValues) +580
   OpenAccessRuntime.Relational.RelationalStorageManager.store(StatesToStore toStore, DeletePacket toDelete, Boolean returnFieldsUpdatedBySM, Int32 storeOption, Boolean evictClasses) +471
 
[DataStoreException: System.NullReferenceException: Object reference not set to an instance of an object.
   at OpenAccessRuntime.Relational.metadata.RelationalLinkCollectionField.insertUnorderedLinkTableRows(OID oid, Object[] inserted, PreparedStatement psins, Boolean batch, String sql)
   at OpenAccessRuntime.Relational.metadata.RelationalLinkCollectionField.persistPass2BlockUnordered(PersistGraph graph, Int32 blockStart, Int32 blockEnd, CharBuf s, Connection con, Boolean batchInserts, Boolean batchUpdates)
   at OpenAccessRuntime.Relational.metadata.RelationalLinkCollectionField.persistPass2Block(PersistGraph graph, Int32 blockStart, Int32 blockEnd, CharBuf s, Connection con, Boolean batchInserts, Boolean batchUpdates)
   at OpenAccessRuntime.Relational.RelationalStorageManager.persistPass2(PersistGraph graph)
   at OpenAccessRuntime.Relational.RelationalStorageManager.doUpdates(StatesToStore toStore, StateContainer container, Boolean retainValues)
   at OpenAccessRuntime.Relational.RelationalStorageManager.store(StatesToStore toStore, DeletePacket toDelete, Boolean returnFieldsUpdatedBySM, Int32 storeOption, Boolean evictClasses) ]
   Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e) +28
   Telerik.OpenAccess.RT.ExceptionWrapper.Throw() +34
   OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.handleException(Exception x) +1455
   OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.internalCommit(Boolean phase) +582
   OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.commit() +188
   OpenAccessRuntime.DataObjects.UnsynchronizedPMProxy.commit() +42
   Telerik.OpenAccess.RT.TransactionImpl.Commit() +115
   SutureMD.Web.Common.AbstractBaseController.OnActionExecuted(ActionExecutedContext filterContext) in C:\ProjectDocs\SutureMD\Solution_May27\SutureMD.Web.Common\AbstractBaseController.cs:174
   System.Web.Mvc.Controller.System.Web.Mvc.IActionFilter.OnActionExecuted(ActionExecutedContext filterContext) +7
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +274
   System.Web.Mvc.<>c__DisplayClassf.<InvokeActionMethodWithFilters>b__c() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +192
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +314
   System.Web.Mvc.Controller.ExecuteCore() +105
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +39
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +34
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +59
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +44
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +7
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8677758
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

6 Answers, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 02 Aug 2010, 05:31 PM
Hello Delton,

this looks like an ICollection<something> field that is participating in the exception. Can you check your model for such a field? Can you reproduce the behavior and make us see this exception too?
Which database are you using?

Sincerely yours,
Thomas
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Delton Phillips
Top achievements
Rank 1
answered on 02 Aug 2010, 07:11 PM
Thanks Thomas,

It had something to do with a collection. Sorry for the false alarm. :)

Thanks,

Delton
0
Joshua Kent
Top achievements
Rank 2
answered on 03 Jan 2012, 08:57 PM
What was the problem with the collection? I am getting this error now too even though the same code was working a week ago. Any ideas?
0
Thomas
Telerik team
answered on 05 Jan 2012, 06:19 PM
Hello Josh,

did you change your code, the collection code or the OpenAccess version in the last week and can you provide us with more information so that we can iron out this issue?

Kind regards,
Thomas
the Telerik team
Want to use Telerik OpenAccess with SQL Azure? Download the trial version today. 
0
Joshua Kent
Top achievements
Rank 2
answered on 05 Jan 2012, 06:31 PM
The only thing I did was delete the database and let open access recreate the schema tables from scratch. It happened after that. If I remember correctly I had this same issue in the same application earlier. The place where I get the error is related to some import functionality that takes data from an excel file and populates dataobjects and saves them using OpenAccess to the database. Earlier I got the same error when I tried to save all of the objects at once. I solved it by saving each object to the database as it was populated and not doing one mass load. But now it appears to have started happening again without any change to that code.

Any thoughts would be greatly appreciated, the stack trace isn't very helpful.

Josh
0
Thomas
Telerik team
answered on 09 Jan 2012, 10:30 AM
Hello Kent,

we really need a bit more information here. Please open a support ticket so that your .rlinq or .config file can be attached. Of special interest are also the types of the collections that are involved, and if the import code showed the error, this code could be valuable as well.

All the best,
Thomas
the Telerik team
Want to use Telerik OpenAccess with SQL Azure? Download the trial version today. 
Tags
Data Access Free Edition
Asked by
Delton Phillips
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Delton Phillips
Top achievements
Rank 1
Joshua Kent
Top achievements
Rank 2
Share this question
or