invalid extention key do-optimistic-locking

Thread is closed for posting
3 posts, 0 answers
  1. onur
    onur avatar
    4 posts
    Member since:
    Mar 2009

    Posted 30 Mar 2009 Link to this post

    Hi,
    First i try to run quickstart sample but it gave "invalid exception key" error. Then i try a simpler application but the result is same.
    my development environment is server 2008 x64 iis7, vs2008, sql express 2005 sp3 and telerik orm express edition.
    is there any body have any idea what is going wrong ? is it abour iis7 ?
    Error Log
     

    Server Error in '/' Application.

    Invalid extension key 'db-optimistic-locking' used in C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a90985fb\14bbe21f\assembly\dl3\8622e7b4\42e5eb43_78b1c901\ormexp.DLL:(resource)ormexp.App.config:mapping-id=mssqlMapping:namespace[ormexp]/class[Category]

    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: Invalid extension key 'db-optimistic-locking' used in C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a90985fb\14bbe21f\assembly\dl3\8622e7b4\42e5eb43_78b1c901\ormexp.DLL:(resource)ormexp.App.config:mapping-id=mssqlMapping:namespace[ormexp]/class[Category]

    Source Error:

    Line 116:			Database db = Database();
    Line 117:
    Line 118: IObjectScope newScope = db.GetObjectScope();Line 119:			return newScope;
    Line 120:		}

    Source File: C:\Users\Administrator\Documents\Visual Studio 2008\Projects\ormexp\ormexpweb\ObjectScopeProvider1.cs    Line: 118

    Stack Trace:

    [OpenAccessException: Invalid extension key 'db-optimistic-locking' used in C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a90985fb\14bbe21f\assembly\dl3\8622e7b4\42e5eb43_78b1c901\ormexp.DLL:(resource)ormexp.App.config:mapping-id=mssqlMapping:namespace[ormexp]/class[Category]]
       Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e) +28
       Telerik.OpenAccess.RT.ExceptionWrapper.Throw() +34
       OpenAccessRuntime.metadata.parser.MetaDataParser.startExtension(DataObjectsElement parent, ArrayList list, SaxAttributesSupport attr) +268
       OpenAccessRuntime.metadata.parser.MetaDataParser.startElementImp(String uri, String localName, String name, SaxAttributesSupport attr) +780
       OpenAccessRuntime.metadata.parser.MetaDataParser.startElement(String uri, String localName, String name, SaxAttributesSupport attr) +73
    
    [OpenAccessException: startElement]
       Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e) +28
       Telerik.OpenAccess.RT.ExceptionWrapper.Throw() +34
       OpenAccessRuntime.metadata.parser.MetaDataParser.startElement(String uri, String localName, String name, SaxAttributesSupport attr) +140
       OpenAccessRuntime.metadata.parser.MetaDataParser._parse(XmlReader reader) +419
       OpenAccessRuntime.metadata.parser.MetaDataParser._parse(XmlNode mappingXmlNode) +72
       OpenAccessRuntime.metadata.parser.MetaDataParser.parse(XmlNode mappingXmlNode, String name) +96
    
    [OpenAccessException: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a90985fb\14bbe21f\assembly\dl3\8622e7b4\42e5eb43_78b1c901\ormexp.DLL:(resource)ormexp.App.config:mapping-id=mssqlMapping : startElement]
       Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e) +28
       Telerik.OpenAccess.RT.ExceptionWrapper.Throw() +34
       OpenAccessRuntime.metadata.parser.MetaDataParser.parse(XmlNode mappingXmlNode, String name) +443
       Telerik.OpenAccess.RT.DatabaseAdapter.ConvertMappingXmlNodes2JdoRoots(ArrayList mappingXmlNodes, ArrayList mappingSources, ArrayList jdoRootsArrayList) +283
       Telerik.OpenAccess.RT.DatabaseAdapter.GetConfigProperties(ConfigManager configManager, String _url, String user, String password, String connectionId, ArrayList jdoRootsArrayList) +297
       Telerik.OpenAccess.RT.DatabaseAdapter.AssertPersistenceManagerFactory(String usr, String password, Boolean open) +431
       Telerik.OpenAccess.RT.DatabaseAdapter.GetObjectScope(TransactionProvider provider) +65
       Telerik.OpenAccess.RT.DatabaseAdapter.GetObjectScope() +37
       Telerik.OpenAccess.Database.GetObjectScope() +34
       ormexpweb.ObjectScopeProvider1.GetNewObjectScope() in C:\Users\Administrator\Documents\Visual Studio 2008\Projects\ormexp\ormexpweb\ObjectScopeProvider1.cs:118
    
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
       System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +350
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
       System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
       Telerik.OpenAccess.RT.DataSource.OpenAccessDataSourceView.ConstructContext() +892
    
    [InvalidOperationException: No constructor for the strongly-typed IObjectScope takes 0 parameters.]
       Telerik.OpenAccess.RT.DataSource.OpenAccessDataSourceView.ConstructContext() +1014
       Telerik.OpenAccess.RT.DataSource.OpenAccessDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +126
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
       System.Web.UI.WebControls.GridView.DataBind() +4
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
       System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +72
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.Control.PreRenderRecursiveInternal() +44
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074
  2. onur
    onur avatar
    4 posts
    Member since:
    Mar 2009

    Posted 31 Mar 2009 Link to this post

    this morning i try to write a simple test application on my laptop(xp-sp2+cassini+sqlexpress+vs2008) but i got the same exception. May be it's about my regional settings (turkish). we have some incompabilities about case changing of char "i". check here for details.

    http://www.i18nguy.com/unicode/turkish-i18n.html

    is there any string case change prosedures in openaccess's source ?
  3. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 02 Apr 2009 Link to this post

    Hello onur,
    Yes there is indeed problem with the regional settings. The workaround is to resolve the scope in the following way:
    Database db = Database();  
                CultureInfo old = System.Threading.Thread.CurrentThread.CurrentCulture;  
                // Workaround:  
                System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo("en-US");  
                try  
                {  
                    IObjectScope newScope = db.GetObjectScope();  
                    return newScope;  
                }  
                finally  
                {  
                    System.Threading.Thread.CurrentThread.CurrentCulture = old;  
     
                }  
    So if you are using for example IObjectScope scope = ObjectScopeProvider1.GetNewObjectScope(); You should paste the above code into the GetNewObjectScope method into your ObjectScopeProvider1 class. 
    The issue has been worked on and in the next patch release a fix for this will be included.
    Please do let us know if you face any further difficulties.

    Sincerely yours,
    PetarP
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top