What does this error mean? How to fix?

8 posts, 1 answers
  1. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 20 Nov 2012 Link to this post

    The following error occured while trying to update DB from code. Update is not possible. No clue is given why update is not working, or which file... So can you do something with the error? For me it is just not meaningful.


    Telerik.OpenAccess: Checking if database DBNAME exists...
    OpenAccess: XmlException
    Beim Analysieren von 'EntityName' ist ein Fehler aufgetreten. Zeile 1, Position 1329.
       bei System.Xml.XmlTextReaderImpl.Throw(Exception e)
       bei System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
       bei System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
       bei System.Xml.XmlTextReaderImpl.ParseAttributes()
       bei System.Xml.XmlTextReaderImpl.ParseElement()
       bei System.Xml.XmlTextReaderImpl.ParseElementContent()
       bei System.Xml.XmlTextReaderImpl.Read()
       bei System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
       bei System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
       bei System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
       bei System.Xml.XmlDocument.Load(XmlReader reader)
       bei System.Xml.XmlDocument.LoadXml(String xml)
       bei Telerik.OpenAccess.SPI.Backends.CreateRuntimeConfigManager(String connectionId, XmlElement configOverride, Assembly[] entryAssemblies, Assembly callingAssembly, BackendConfiguration props)
       bei OpenAccessRuntime.DatabaseAdapter.AssertPersistenceManagerFactory(String usr, String password, Boolean open)
       bei OpenAccessRuntime.DatabaseAdapter.GetObjectScope(TransactionProvider provider)
       bei OpenAccessRuntime.DatabaseAdapter.Telerik.OpenAccess.SPI.IDatabaseAdapter.GetObjectScope()
       bei Telerik.OpenAccess.Database.GetObjectScope()
       bei Telerik.OpenAccess.Sdk.Addin.Sql.CreateDBCommands.DoesSQLServerDBExists(String databaseName, String serverName, String userId, String password, Boolean integratedSecurity, String driver, String backend, String connectionParams, Boolean conStringInConParams, CreateOrUpdateCaller createOrUpdateCaller)
       bei Telerik.OpenAccess.Sdk.Addin.Sql.CreateDBCommands.CheckForCreateOrUpdateDB(VAProject project)
       bei Telerik.OpenAccess.Sdk.Addin.Core.BuildEventHandlerBase.Enhance(VAProject _project, String projectConfigName, String platformName, String productName)
    OpenAccess Error: Beim Analysieren von 'EntityName' ist ein Fehler aufgetreten. Zeile 1, Position 1329.


    Create DatabaseSchema complete -- 1 errors, 0 warnings


    Die Erstellung wurde abgebrochen.========== OpenAccess All: 3 succeeded, 1 failed, 21 skipped ==========
        OpenAccess : Build Cancelled due to enhancement error(s).

  2. Ady
    Admin
    Ady avatar
    588 posts

    Posted 22 Nov 2012 Link to this post

    Hello Wolfgang,

    I assume you are using the 'classic' IObjectScope API.  This seems to be an error while trying to parse the app.config file. Can you verify whether it is well formed? Did you make any particular change after which you start experiencing this error?

    Greetings,
    Ady
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
  3. DevCraft banner
  4. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 22 Nov 2012 Link to this post

    Hi,

    Yes, we're using the 'classic' IObjectScope API. 

    The problem is that it happens not on all PCs. Therefore it does not seem to be the app.config (which is parsable and well-formed ).

    If doing these steps an update seems to work, but not via contextmenu ( having UpdataDAtabase set to true and compiling anew).

    (only schamatic, shortened a lot)
    ISChemaHandler schemaHnd =  this.database.GetSchemaHandler();
    schemaHnd.ExecuteDDLScript(schemaHnd.CreateUpdateDDLScript(null));

    So the problem seems to occur when building the projekt.

    I have tried the following:

    1. Repair Telerik - has not worked.
    2. Uninstall Telerik, Restart, reinstall telerik, restart
    3, Checked in projects for correct telerik version
    4. Checked in Telerik ... Help - Product Info for correct version
    5. Checked GAC for correct version
    6. Installed a VM from scratch - there the problem did not occur with the same project - but it is not feasable to install development pcs for production anew  (also as the VM has not all tools which are needed it is not clear wether this is a third party effect - but the error message is still not helpful, is it possible to enhance logging while building?)
    7. Trying devenv /setup for quick check if something needs to be repaired
    8. Disabling all virus scanner/firewall processes
    9. ...

    So still i'm helpless, the error message also gives no clue what is wrong.

    On this machine for the used project no update within this project to a database with telerik classic was done before. Also another machine which had Openaccess  updated since some old Vanatec 4.3 versions did not have the problem with same project.
  5. Ady
    Admin
    Ady avatar
    588 posts

    Posted 23 Nov 2012 Link to this post

    Hi Wolfgang,

     When using the menu entry to update the database, the workflow is slightly different. Can you check the 'ConnectionId' project property (Select the project in the Solution explorer and press F4 to see the project properties). Is it the same as the one used in the 'Database.Get' call?
    Can you send me the problematic project so that I can try and reproduce the error?

    Kind regards,
    Ady
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
  6. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 23 Nov 2012 Link to this post

    The ConnectionID in App.config, in project property and in database.get seem to be the same.

    Unfortuanally sending a project or exact sourcecode is not allowed.

    Nevertheless it seems to be stated as XMLError? What should that mean?
  7. Ady
    Admin
    Ady avatar
    588 posts

    Posted 28 Nov 2012 Link to this post

    Hi Wolfgang,

     As a part of the post build enhancement step OpenAcess tries to check whether the database exists and whether it needs to be migrated. Under certain conditions OpenAccess builds an xml document based on the assemblies referenced by the project. There seems to be an error in the generated xml document.
    Can you try temporarily removing unrelated assembly references to narrow down to the exact reason?

    Regards,
    Ady
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
  8. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 14 Oct 2013 Link to this post

    The error was gone for a while. 

    Now I installed Telerik JustTrace, was again very disappointed and uninstalled it. After the deinstallation the error is back again. No changes in code. Just deinstallation of JustTrace. Tried to repair OpenAccess - no success.
  9. Answer
    Ady
    Admin
    Ady avatar
    588 posts

    Posted 17 Oct 2013 Link to this post

    Hi Wolfgang,

     It seems to be happening during the post build step. Do you update the persistent model frequently? Maybe you do not need the step of updating the schema every time you build the project. 
    Can you set the 'UpdateSchema' property to 'false' and in case you need to update the database you can use the SchemaHandler API to update the database.
    This could be 1 way of avoiding this error. 
    This error seems to be caused by the loaded assemblies when the project is built. We traverse the list of loaded assemblies and generate an in-memory xml document. Seems that one of the loaded assemblies is causing the error. Do you have any other add-ins loaded?

    Regards,
    Ady
    Telerik
    OpenAccess ORM Q3 2013 Beta is available for immediate download in your account. Get it now and play with the latest bits. See what's new >>
Back to Top
DevCraft banner