Error being thrown when using openaccessdatasource on webpage (with gridview displaying data)

10 posts, 1 answers
  1. Peter Huisman
    Peter Huisman avatar
    16 posts
    Member since:
    Dec 2004

    Posted 01 Dec 2010 Link to this post

    This problem (and related issues) is already being looked into by Telerik through a support ticket, but as my delay is now already up to 2 weeks, I am seeing whether someone out there has had the same problem and resolved it.

    I have a rlinq which exposed some flaws in the visual designer (fixed in the last build). When I make a webpage with an openaccess datasource that tries to retrieve data, I get the following error. Has anyone encountered this / attempted to solve this?

    Thanks, much appreciated.

    Server Error in '/' Application.
    Application id class 'Telerik.OpenAccess.RT.OID.IntIdentity' must have field: 'public System.Int32 iD'
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
     
    Exception Details: Telerik.OpenAccess.OpenAccessException: Application id class 'Telerik.OpenAccess.RT.OID.IntIdentity' must have field: 'public System.Int32 iD'
     
    Source Error:
     
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
     
     [OpenAccessException: Application id class 'Telerik.OpenAccess.RT.OID.IntIdentity' must have field: 'public System.Int32 iD']
       Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e) +28
       Telerik.OpenAccess.RT.ExceptionWrapper.Throw() +34
       OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL() +414
       OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createStorageManagerFactory() +486
       OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.createStorageManagerFactory() +612
       OpenAccessRuntime.DataObjects.PersistenceManagerFactoryBase.init() +938
       OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.init() +101
       OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp..ctor(PropertySet properties, Object classloader) +539
       OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.getPersistenceManagerFactory(PropertySet props) +49
       OpenAccessRuntime.DataObjects.BootstrapPMF.getPersistenceManagerFactory(PropertySet props) +250
       Telerik.OpenAccess.RT.Helper.getPersistenceManagerFactory(PropertySet props) +372
       Telerik.OpenAccess.RT.DatabaseAdapter.AssertPersistenceManagerFactory(String usr, String password, Boolean open) +2077
       Telerik.OpenAccess.RT.DatabaseAdapter.GetObjectScope(TransactionProvider provider) +70
       Telerik.OpenAccess.Database.GetObjectScope(TransactionProvider provider) +40
       Telerik.OpenAccess.OpenAccessContextBase.GetScope() +155
     
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
       System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
       System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
       Telerik.OpenAccess.RT.DataSource.OpenAccessDataSourceView.ConstructContext() +1399
       Telerik.OpenAccess.RT.DataSource.OpenAccessDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +182
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
       Telerik.Web.UI.GridTableView.PerformSelect() +38
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
       Telerik.Web.UI.GridTableView.DataBind() +364
       Telerik.Web.UI.RadGrid.DataBind() +173
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
       System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
       System.Web.UI.Control.EnsureChildControls() +102
       System.Web.UI.Control.PreRenderRecursiveInternal() +42
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
     
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
  2. Answer
    Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 02 Dec 2010 Link to this post

    Hi Peter Huisman,

     This error can be thrown when there is an inconsistency in the version of the OpenAccess assemblies. For example you could have one version of the product installed, but some of our dll's with another version is present in your bin folder and gets loaded in the Application Domain. It usually happens when there is a difference between the versions of Telerik.OpenAccess.dll and Telerik.OpenAccess.35.Extensions.dll. I hope this provides useful for you as well as anyone in the community that might encounter this issue. On our side, we will try to provide an error earlier in the stack which points to the user what exactly is the issue as we admit, this exception is actually a side effect and a rather nasty one to trace.

    Regards,
    Zoran
    the Telerik team
    Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
  3. DevCraft banner
  4. Jason Marshall
    Jason Marshall avatar
    10 posts
    Member since:
    Apr 2010

    Posted 22 Dec 2010 Link to this post

    nevermind.
  5. Guillermo
    Guillermo  avatar
    11 posts
    Member since:
    Feb 2012

    Posted 24 Jul 2012 Link to this post

    Has anyone has more info regarding this problem?... The only way I make it go away is stopping and resuming the pool, but I have to do this every time I build the project and its becoming annoying. I already check the ORM references and versions and they are correct. 

    Thanks
  6. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 26 Jul 2012 Link to this post

    Hello Guillermo,

    I would like to ask you about more information regarding when this problem is actually happening on your side. You mentioned that it happens when you rebuild your project, does it also mean that you are upgrading the OpenAccess assemblies to newer version, or is it just adding new functionality to your application and rebuilding, without upgrading OpenAccess? Also, what is the version of OpenAccess that you are using currently?

    Regards,
    Zoran
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
  7. Mikko
    Mikko avatar
    1 posts
    Member since:
    Apr 2012

    Posted 16 Aug 2012 Link to this post

    I have same problem with new version and it happen almost always when my application pool is new. After few seconds it start work again:

    Application id class 'Telerik.OpenAccess.RT.OID.IntIdentity' must have field: 'public System.Int32 _id'

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: Telerik.OpenAccess.OpenAccessException: Application id class 'Telerik.OpenAccess.RT.OID.IntIdentity' must have field: 'public System.Int32 _id'
     
  8. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 21 Aug 2012 Link to this post

    Hello,

    After some private communication it turned out that the error Mikko was getting was caused by an OpenAccess assembly with older version in one of the bin folders of his project. This is the most common cause for this problem, so if anyone else sees the same error, now he knows where to look at.

    Kind regards,
    Alexander
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
  9. Palani
    Palani avatar
    5 posts
    Member since:
    Jul 2012

    Posted 07 Mar 2013 Link to this post

    I cleaned all files in my bin folder and my problem solved.

  10. Steven Picard
    Steven Picard avatar
    1 posts
    Member since:
    Mar 2010

    Posted 19 Jul 2013 Link to this post

    I recently inherited an ASP.NET app that uses Open Access. Although I generally use Telerik controls I have never used Open Access. I am getting the same error as above. Everything compiles and runs fine. This error only happens when I save. I have verified all versions are correct and that I have cleaned the project numerous time (so there are no outdated or conflicting DLL's.) This project worked for the other two developers (who are no longer here) and I have not modified their code related to this in any way.

    Application id class 'Telerik.OpenAccess.RT.OID.IntIdentity' used by class 'XXX' must have field: 'public System.Int32 _XXX'.

    Any ideas? This is really holding me up.

    Thanks.
  11. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 19 Jul 2013 Link to this post

    Hello Steven,

    For the moment the only known reason for this error is the mismatch of OpenAccess assemblies in the bin folder. You said that you have already checked this, so it is possible that the problem is different in your case.
    It would be best if you could send us a support ticket and attach there your project, so we could look into it. This would be the fastest way to reproduce the problem and find a solution.

    Regards,
    Alexander
    Telerik
    OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
Back to Top
DevCraft banner