Sync-NAVTenant : "§", hexadecimal value 0x15, is an invalid character., line 196, position 226. строка:1 знак:1 + Sync-NAVTenant + ~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (0:Int32) [Sync-NAVTenant], NavCom mandException + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$SONY2015-2,Microsoft. Dynamics.Nav.Management.Cmdlets.SyncNavTenant
Server instance: S5-2015 User: IVAN_VAIO\Ivan Type: System.Xml.XmlException LineNumber: 196 LinePosition: 226 Message: "§", hexadecimal value 0x15, is an invalid character., line 196, position 226. StackTrace: в System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) в System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr) в System.Xml.XmlTextReaderImpl.ParseAttributes() в System.Xml.XmlTextReaderImpl.ParseElement() в System.Xml.XmlTextReaderImpl.ParseElementContent() в System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) в System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) в System.Xml.XmlDocument.Load(XmlReader reader) в Microsoft.Dynamics.Nav.Runtime.NavSqlMetadata.GetTableMetadataFromAppDatabase(Int32 tableId, NCLMetaTable& table, NavBLOB& rawMetadata, NavText& newHash) в Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.GetTableChanges(Boolean sortingPropertiesChanged, Boolean databaseConvertedFromNav2013) в Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.SynchronizeTenantDatabase(NavSession session, SyncMode syncMode) в Microsoft.Dynamics.Nav.Runtime.NavTenant.Microsoft.Dynamics.Nav.Runtime.ITenantSessionHandler.RunTenantActionInSystemSession(Action`2 action, Boolean throwExceptions) в Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.EnsureDatabaseInSync(SyncMode syncMode) в Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.<>c__DisplayClass48.<StartSyncProcessIfNotAlreadyStarted>b__46() в System.Threading.Tasks.Task.Execute() --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) в Microsoft.Dynamics.Nav.Runtime.NavSqlDatabaseSync.StartSyncProcessIfNotAlreadyStarted(SyncMode syncMode) в Microsoft.Dynamics.Nav.Runtime.NavTenantManagementTasks.SynchronizeTenantDatabase(String tenantId, SyncMode syncMode, Boolean async) в SyncInvokeSynchronizeTenantDatabase(Object , Object[] , Object[] ) в System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) в Microsoft.Dynamics.Nav.Service.ServiceOperationInvoker.ErrorMappingCombinator(ServiceOperation innerOperation, NSServiceBase serviceInstance, Object[] inputs, Object[]& outputs) Source: System.Xml HResult: -2146232000
Answers
I had this also recently and was wondering the same: what XML file is containing this. What it appeared to be in my case was the MenuSuite 1090 (so for our add-on) that contained an invalid XML character in the Name property of one of the menusuite nodes.
XML does not allow all characters. Google for something like "XML invalid characters" and you will see.
How did I find out in what XML file, i.e. what C/SIDE object, this is to be found?
As I am working with TFS as our source control system, I have all C/SIDE objects in .txt files in one directory. From TFs I can do a directory search using regular expressions. This is the expression (using hex values) I used to find the object file(s) containing illegal XML characters: [\x00-\x08\x0B\x0C\x0E-\x1F]
hope this can help you.
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
Yes, sure, I did! Full text export and rigorous notepad++ and grep search!
Don't know what to do now. I will try to erase objects and run Sync-NAVTenant on subsets of objects, maybe this can help to find out which object causes error (if the problem is in objects at all).
Yes, the right way to solve the problem was exporting all objects in .txt file and searching. But in my case I had to search for another symbol, not 0x15. It was Cyrillic (Russian) letter 'с' unintentionally used instead of Latin 'c' in one of identifiers. Both letters look the same, but they are different characters.
It seems that NAV2009 and NAV2013 work fine with 'с', but NAV2015 doesn't want to. Three working days lost for just one erroneous keystroke.
Regards,
Ivan
Still on my list to write a blog post on my issue. Started already but not yet finished. Glad I could be of use to you.
Please mark this posted as solved.
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
1. Deleted approximately one half of tables and tried Sync-NAVTenant. It worked without the error, hence the broken one was in the deleted half! Repeated this step several times...
2. Exported a 'suspicious' subset of tables, used a long regexp [^a-zA-Z=.,;...... and searched for every unusual character... And here it is!
BTW: have written a blog post on my findings [url-http://dynamicsuser.net/blogs/vanvugt/archive/2015/04/18/hunting-mr-x-uhhh-0x1c.aspx]here[/url].
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community