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

7 posts, 0 answers
  1. Delton Phillips
    Delton Phillips avatar
    8 posts
    Member since:
    Mar 2010

    Posted 01 Aug 2010 Link to this post

    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
  2. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 02 Aug 2010 Link to this post

    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
  3. DevCraft banner
  4. Delton Phillips
    Delton Phillips avatar
    8 posts
    Member since:
    Mar 2010

    Posted 02 Aug 2010 Link to this post

    Thanks Thomas,

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

    Thanks,

    Delton
  5. Joshua Kent
    Joshua Kent avatar
    15 posts
    Member since:
    Nov 2009

    Posted 03 Jan 2012 Link to this post

    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?
  6. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 05 Jan 2012 Link to this post

    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. 
  7. Joshua Kent
    Joshua Kent avatar
    15 posts
    Member since:
    Nov 2009

    Posted 05 Jan 2012 Link to this post

    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
  8. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 09 Jan 2012 Link to this post

    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. 
Back to Top
DevCraft banner