Unable to copy configuration value with null key. The original KeyValuePair was [, ]

7 posts, 0 answers
  1. Hammad
    Hammad avatar
    4 posts
    Member since:
    Jul 2008

    Posted 13 Oct 2011 Link to this post

    Hi guys,

    I am using Telerik ORM 2010.2.1013.8 with .NET 3.5 Web Application deployed on windows server 2003 IIS 6.0

    after some days ( not sure exactly how many days) this error appears

    Unable to copy configuration value with null key. The original KeyValuePair was [, ]

    Telerik.OpenAccess.OpenAccessException: Unable to copy configuration value with null key. The original KeyValuePair was [, ]

    [OpenAccessException: Unable to copy configuration value with null key. The original KeyValuePair was [, ]]
       Telerik.OpenAccess.SPI.PropertySet.CopyTo(PropertySet target) +203
       Telerik.OpenAccess.Config.ConfigManager..ctor(Assembly[] _rootAssemblies, String con, XmlElement _configOverride, XmlElement gen, Assembly _callingAssembly, BackendConfiguration beConfig) +254
       Telerik.OpenAccess.SPI.Backends.CreateRuntimeConfigManager(String connectionId, XmlElement configOverride, Assembly[] entryAssemblies, Assembly callingAssembly, BackendConfiguration props) +406
       Telerik.OpenAccess.DBRegistry.GetDatabase(String urlOrConnectionId, XmlElement configOverride, Assembly[] entryAssemblies, Assembly callingAssembly, MetadataContainer metaContainer, BackendConfiguration beConfig) +251
       Telerik.OpenAccess.BackendConfiguration.GetDatabase(String name, Assembly calling, MetadataContainer metadataContainer, DBRegistry reg) +395
       Telerik.OpenAccess.Database.Get(String connectionString, BackendConfiguration backendConfiguration, MetadataContainer metadataContainer) +68
       Telerik.OpenAccess.OpenAccessContextBase.GetScope() +46
       Telerik.OpenAccess.OpenAccessContext.GetAll() +42
    .......

    When i re-upload the DLL of my web application project it starts to work again, note that even re-uploading exactly the same build DLL  solves this issue

    any insight?
  2. Ady
    Admin
    Ady avatar
    588 posts

    Posted 18 Oct 2011 Link to this post

    Hello Hammad,

    This exception indicates some invalid configuration in the 'BackendConfiguration'  instance in the context class. Has there been any change to the configuration? Do you have any steps which I can use to reproduce this exception?

    Looking forward to resolving this issue soon.

    All the best,
    Ady
    the Telerik team

    Check out the latest stable build of Telerik OpenAccess ORM. Download it and benefit from our new Project Templates.

  3. DevCraft banner
  4. Erik
    Erik avatar
    9 posts
    Member since:
    Jul 2012

    Posted 13 Sep 2012 Link to this post

    We are having exactly the same issues.
    This error appears out of the blue. Even on a web application that has been running smoothly for days.
    Sometimes resetting IIS 'fixes' the issue. But sometimes we need to rebuild our project and replace the DLL's on the webserver. The behavior seems to be completely random. Sometimes it even takes 2-3 IIS resets for the application to work again.
    We've used OpenAccess for over a year and never had this issue. But after upgrading to v2012.2.628.2 it happens to almost every project.

    Regards,

    Erik
  5. Ady
    Admin
    Ady avatar
    588 posts

    Posted 13 Sep 2012 Link to this post

    Hello Erik,

     This seems to be a multi-threaded issue. We will look into making the concerned code thread-safe. Do you by any chance have a sample project where you face this error and can send us this project? I would like to try and reproduce this strange behavior.

    All the best,
    Ady
    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!
  6. Helder
    Helder avatar
    1 posts
    Member since:
    Sep 2012

    Posted 21 Sep 2012 Link to this post

    I have the problem. But i cant reproduce problem.
  7. Can
    Can avatar
    4 posts
    Member since:
    Sep 2014

    Posted 03 Sep Link to this post

    I started to get this error after moving "some" of the code that does the fluent mapping to a different project than the MetaDataSource, Context and Classes.

     

    The code I moved reads the connection string from web/app.config creates BackendConfiguration and feeds it to the Context and MetaDataSource. Note that, because the configuration had to be available during pre-compile time, I could not use ConfigurationSection. I did it with File Read and parsing XML.

     

    It was fine for a week, than I started to get this error in production (~10 people are using it in parallel)

     

    Do these infos ring any bell? I really need to solve this issue.

  8. Ady
    Admin
    Ady avatar
    588 posts

    Posted 07 Sep Link to this post

    Hello Can,

     Can you send us a sample solution that demonstrates the setup you have - How the projects reference each other and how most importantly how you obtain the BackendConfiguration instance?

    Does the error occur consistently? This seems to be a very hard to reproduce error.

    Regards,
    Ady
    Telerik by Progress
     
    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Back to Top
DevCraft banner