More in this section

Forums / Bugs & Issues / OpenAccess Versions

OpenAccess Versions

8 posts, 0 answered
  1. Craig
    Craig avatar
    9 posts
    Registered:
    23 Nov 2010
    15 Dec 2010
    Link to this post
    I noticed that Sitefinity 4.0 RC uses OpenAccess version 2010.2.1013.8.  However, the latest Telerik OpenAccess ORM download version is 2010.3.1110.3.  I can successfully compile an OpenAccess project using the 2010.2.1013.8 version of the OpenAccess dlls.  Also the database reads work just fine.  However, update statements fail.  I get the following exception "No metadata has been registered for class Telerik.OpenAccess.RT.OID.IntIdentity."

    My questions are:
    Do you plan to release an OpenAccess version that is the same as used by Sitefinity 4.0?
    If not, how do we compile our OpenAccess project to run inside Sitefinity 4.0?

    Thanks in advance.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Dec 2010
    Link to this post
    Hello Craig,

    It is not possible to upgrade or use different version of Telerik OA in the context of Sitefinity.  The open access version that we use is a custom internal build - version 2010.2.1013.8. Your project has to reference Telerik.OpenAccess.dll from Sitefinity's bin and you have to compile your custom class library against this version.

    We have plans to upgrade our OA version to Q3 2010 for the official release, but we need to make some major changes in our logic to do this.

    As for the error you getting, if you can provide the code for the statement you use and stack trace of the error I could try to come up with some more suggestions.

    All the best,
    Ivan Dimitrov
    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. Craig
    Craig avatar
    9 posts
    Registered:
    23 Nov 2010
    16 Dec 2010
    Link to this post
    Hello Ivan, thanks for your response.   I am able to do inserts and updates in OpenAccess using the "usual" way using Transaction.Begin(); and Transaction.Commit(); statements.  However, when I use the ObjectContainer.ChangeSet, I get the following exception:

    "No metadata has been registered for class Telerik.OpenAccess.RT.OID.IntIdentity. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///C:/workspace/InstaOrder/branch/sf40/bin/Telerik.OpenAccess.DLL.)"

    The stack trace is:
    [OpenAccessException: No metadata has been registered for class Telerik.OpenAccess.RT.OID.IntIdentity. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///C:/workspace/InstaOrder/branch/sf40/bin/Telerik.OpenAccess.DLL.)]
       SitefinityWebApp.OpenAccessTest.ObjectContainerTest(Int32 customerID) in C:\Workspace\InstaOrder\branch\sf40\OpenAccessTest.aspx.cs:55
       SitefinityWebApp.OpenAccessTest.Page_Load(Object sender, EventArgs e) in C:\Workspace\InstaOrder\branch\sf40\OpenAccessTest.aspx.cs:31
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +91
       System.Web.UI.Control.LoadRecursive() +74
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

    The exception occurs while trying to synchronize the ObjectContainer.ChangeSet changes with the database. 
    The code for the method is:

    public ObjectContainer.ChangeSet SynchronizeData(ObjectContainer.ChangeSet changes)
    {
        ObjectContainer.ChangeSet ccData = null;
        IObjectScope os = ObjectScopeProvider1.GetNewObjectScope();
        try
        {
            try
            {
                ccData = ObjectContainer.CommitChanges(changes, Telerik.OpenAccess.ObjectContainer.Verify.Changed, os, true, true);
            }
            finally
            {
                os.Dispose();
            }
            return ccData;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

    Stepping through the code, I found that the exception occurs at the os.Dispose() statement in the finally block.
    Thanks for your help.
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    27 Dec 2010
    Link to this post
    Hello Craig,

    Most probably the reason for the error is the metadata mappings, or some assembly hasn't been enhanced. 

    Unfortunately there is no way to use another version of OpenAccess with Sitefinity. A Sitefinity release is configured to work only with a certain version. There are mappings configured, and very often OA team provides us with implementations done especially for our needs.
    Of course we are looking forward to every OA release and possibly upgrade the existing version of the assembly every time. We will continue to follow this procedure, but for the time being we suggest you using the default version. 

    Greetings,
    Georgi
    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
  5. Craig
    Craig avatar
    9 posts
    Registered:
    23 Nov 2010
    05 Jan 2011
    Link to this post
    Hello Georgi,

    The assembly I used was enhanced since the same assembly was successfully used to do inserts and updates in OpenAccess the "usual" way using Transaction.Begin(); and Transaction.Commit(); statements.  Please note that the same code does work correctly when I use OpenAccess version 2010.3.1110.3.  It is only when I compile inside Sitefinity 4.0 (which uses a different version of OpenAccess) that I get the exception described earlier.

    Thanks for your help.
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    06 Jan 2011
    Link to this post
    Hi Craig,

    Can you please use the version of OpenAccess which ships with Sitefinity to enhance the assembly? When you install Sitefinity 4.0 you will see a folder Libraries in the installation path which contains all needed assemblies, as well as the OpenAccess enhancer for the version of Sitefinity.

    Best wishes,
    Radoslav Georgiev
    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
  7. Craig
    Craig avatar
    9 posts
    Registered:
    23 Nov 2010
    11 Jan 2011
    Link to this post
    Hello Radoslav,

    I did use the VEnhance.exe that ships with Sitefinity 4.0.  In fact, the line from the Visual Studio 2010 build output is
    "c:\program files\telerik\openaccess orm\sdk\VEnhance.exe" -assembly:"C:\workspace\InstaOrder\branch\6.5Mine\projects\InstaOrderOpenAccess\obj\Debug\InstaOrderOpenAccess.dll"

    The version of "c:\program files\telerik\openaccess orm\sdk\VEnhance.exe" is 2010.2.1013.8. The build output says
    "Enhancement complete -- 0 errors, 0 warnings"

    I still get the same exception described earlier in this thread.

    Thanks for your help. 
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    20 Jan 2011
    Link to this post
    Hello Craig,

    Please take a look at this post

    All the best,
    Ivan Dimitrov
    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
8 posts, 0 answered