Skip to Content

Error with B1Studio in HANA 9.2PL04

Hi all,

We installed B1 version 9.2 PL04 HANA version, and we need to change some UDO forms layouts with B1Studio.

However, when we run B1Studio it always gives the following error:

There is an error in XML Document (59,2)

When we open the exception details, it starts with:

************** Exception Text **************
System.InvalidOperationException: There is an error in XML document (59, 2). ---> System.Xml.XmlException: There are multiple root elements. Line 59, position 2.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()

Can't figure what it is and we have tried both on a Windows 7 and Windows 8 machines.

Any help?

Manuel Dias

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 27, 2016 at 08:16 PM

    Hi Manuel,

    Hmm.. these lines are where the problem is occurring

    at B1Studio.Common.IO.DataExchangeManager.LoadFromXml(Type serType,String filePath)
    
    at B1Studio.UI.StudioMenuBuilder.Build(String filePath, MenuItemConfig& menu, ILocalizationService localizationService)

    Whatever file is being loaded there, is likely corrupted (since it contains two root elements).

    The class seems to be StudioMenuBuilder and in B1Studio installation directory, there is a B1Studio.Menu.xml that you can check.

    Here are the contents of my B1Studio.Menu.xml:

    <?xml version="1.0"?>
    <MenuItemTags xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <Items>
        <MenuItemTag Name="New" Text="Menu_New" ImagePath="" Command=""  CommandAssembly="" ShortCut="" Visible="Visible" IsSeparator="false">
          <Items>
            <MenuItemTag Name="Project" Text="Menu_Pjt" ImagePath="" Command=""  CommandAssembly="" ShortCut="" Visible="Visible" IsSeparator="false">
              <Items>
                <MenuItemTag Name="AddOn" Text="Menu_Addon" ImagePath="" Command="B1Studio.Designer.UI.NewProjectCommand"  CommandAssembly="B1Studio.Designer.UI" ShortCut="Ctrl+N" Visible="Visible" IsSeparator="false">
                  <Parameter CanExecute="true" TypeName="Add-on" Category=""/>
                </MenuItemTag>
                <MenuItemTag Name="Workflow" Text="Menu_Workflow" ImagePath="" Command="B1Studio.Designer.UI.NewProjectCommand"  CommandAssembly="B1Studio.Designer.UI" ShortCut="Ctrl+Shift+N" Visible="Visible" IsSeparator="false">
                  <Parameter CanExecute="true" TypeName="Workflow" Category=""/>
                </MenuItemTag>
              </Items>
            </MenuItemTag>
          </Items>
        </MenuItemTag>
        <MenuItemTag Name="Open" Text="Menu_Open" ImagePath="" Command=""  CommandAssembly="" ShortCut="" Visible="Visible" IsSeparator="false">
          <Items>
            <MenuItemTag Name="OpenProject" Text="Menu_Solution_Pjt" ImagePath="" Command="B1Studio.Designer.UI.SolutionOpenProjectCommand"  CommandAssembly="B1Studio.Designer.UI" ShortCut="Ctrl+Shift+O" Visible="Visible" IsSeparator="false">
              <Parameter CanExecute="true" TypeName="" Category=""/>
            </MenuItemTag>
            <MenuItemTag Name="OpenFile" Text="Menu_File" ImagePath="" Command="B1Studio.Designer.UI.OpenExternalFileCommand"  CommandAssembly="B1Studio.Designer.UI" ShortCut="Ctrl+O" Visible="Visible" IsSeparator="false">
              <Parameter CanExecute="true" TypeName="" Category=""/>
            </MenuItemTag>
          </Items>
        </MenuItemTag>
        <MenuItemTag Name="Separator1" Text="" ImagePath="" Command=""  CommandAssembly="" ShortCut="" Visible="Visible" IsSeparator="true"/>
        <MenuItemTag Name="SaveCurrentFile" Text="Menu_SaveCurrentFile" ImagePath="" Command="B1Studio.Designer.UI.SaveProjectItemCommand"  CommandAssembly="B1Studio.Designer.UI" ShortCut="Ctrl+S" Visible="Visible" IsSeparator="false">
          <Parameter CanExecute="false" TypeName="" Category="Save"/>
        </MenuItemTag>
        <MenuItemTag Name="ExportCurrentFileAs" Text="Menu_ExportCurrentFileAs" ImagePath="" Command="B1Studio.Designer.UI.ExportProjectItemCommand"  CommandAssembly="B1Studio.Designer.UI" ShortCut="Ctrl+Shift+E" Visible="Visible" IsSeparator="false" >
          <Parameter CanExecute="false" TypeName="" Category="Save"/>
        </MenuItemTag>
        <MenuItemTag Name="SaveAll" Text="Menu_SaveAll" ImagePath="" Command="B1Studio.Designer.UI.SaveSolutionCommand"  CommandAssembly="B1Studio.Designer.UI" ShortCut="Ctrl+Shift+S" Visible="Visible" IsSeparator="false">
          <Parameter CanExecute="true" TypeName="" Category=""/>
        </MenuItemTag>
    	<MenuItemTag Name="" Text="" ImagePath="" Command=""  CommandAssembly="" ShortCut="" Visible="Visible" IsSeparator="true"/>
    	<!--<MenuItemTag Name="Workflow" Text="" ImagePath="" Command=""  CommandAssembly="" ShortCut="" Visible="Visible" IsSeparator="false">
          <Items>
            <MenuItemTag Name="Error Check" Text="" ImagePath="" Command=""  CommandAssembly="" ShortCut="" Visible="Visible" IsSeparator="false">
              <Parameter CanExecute="false" TypeName="Error Check" Category="WorkflowMainMenu"/>
            </MenuItemTag>
            <MenuItemTag Name="Export" Text="" ImagePath="" Command="B1Studio.Designer.Workflow.Commands.ExportImageCommand"  CommandAssembly="B1Studio.Designer.WFPackage.UI" ShortCut="" Visible="Visible" IsSeparator="false">
              <Parameter CanExecute="false" TypeName="Export" Category="WorkflowMainMenu"/>
            </MenuItemTag>
          </Items>
        </MenuItemTag>
        <MenuItemTag Name="Separator1" Text="" ImagePath="" Command=""  CommandAssembly="" ShortCut="" Visible="Visible" IsSeparator="true"/>-->
        <MenuItemTag Name="View" Text="Menu_ViewStartPage" ImagePath="" Command="B1Studio.Designer.UI.ShowStartPageCommand"  CommandAssembly="B1Studio.Designer.UI" ShortCut="" Visible="Visible" IsSeparator="false">
          <Parameter CanExecute="true" TypeName="" Category=""/>
        </MenuItemTag>
        <MenuItemTag Name="Exit" Text="Menu_Exit" ImagePath="" Command="B1Studio.Designer.UI.SolutionExitCommand"  CommandAssembly="B1Studio.Designer.UI" ShortCut="Alt+F4" Visible="Visible" IsSeparator="false">
          <Parameter CanExecute="true" TypeName="" Category=""/>
        </MenuItemTag>	
      </Items>
    </MenuItemTags>
    
    

    Pedro Magueija

    LinkedIn | Twitter | Blog

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 27, 2016 at 05:41 PM

    Hi Pedro,

    The exception error doesn't provide information about the XML referring to the error.

    I only find this generic XML contents on the generic "B1Studio.Shell.exe.config" file that exists in the B1Studio folder:

    <?xml version="1.0"?>
    <configuration>
    	<startup>
    		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    	</startup>
    </configuration>
    

    It seems a internal config error, either from Microsoft.NET or other component.

    The full exception error show by B1Studio is the following:

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    
    ************** Exception Text **************
    System.InvalidOperationException: There is an error in XML document (59, 2). ---> System.Xml.XmlException: There are multiple root elements. Line 59, position 2.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
       at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlTextReader.Read()
       at System.Xml.XmlReader.ReadEndElement()
       at System.Xml.Serialization.XmlSerializationReader.ReadEndElement()
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMenuItemTags.Read5_MenuItemTags(Boolean isNullable, Boolean checkType)
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderMenuItemTags.Read6_MenuItemTags()
       --- End of inner exception stack trace ---
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
       at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
       at B1Studio.Common.IO.DataExchangeManager.LoadFromXml(Type serType, String filePath)
       at B1Studio.UI.StudioMenuBuilder.Build(String filePath, MenuItemConfig& menu, ILocalizationService localizationService)
       at B1Studio.UI.StudioMenu.InitMenu(ILocalizationService localizationService)
       at B1Studio.Designer.WinFormShell.CaptionViewContainerPresenter.InitLayout(Control parent)
       at B1Studio.Designer.WinFormShell.CaptionBarRegion.InitBound(Int32 x, Int32 y, Int32 width, Int32 height)
       at B1Studio.UI.ShellMDIFrame.InitializeInternal()
       at B1Studio.UI.ShellMDIFrame.OnSizeChanged(EventArgs e)
       at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
       at System.Windows.Forms.Control.UpdateBounds()
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at B1Studio.UI.ShellMDIFrame.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    B1Studio.Shell
        Assembly Version: 1.0.0.0
        Win32 Version: 9.20.140.04
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Shell/B1Studio.Shell.exe
    ----------------------------------------
    B1Studio.UI
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Shell/B1Studio.UI.DLL
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34250 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.36337 built by: FX452RTMLDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.36350 built by: FX452RTMLDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    B1Studio.Common
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Common/B1Studio.Common.dll
    ----------------------------------------
    B1Studio.Interface
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Common/B1Studio.Interface.dll
    ----------------------------------------
    B1Studio.UserPreference.2010
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Common/B1Studio.UserPreference.2010.dll
    ----------------------------------------
    System.Core
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34281 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    Microsoft.GeneratedCode
        Assembly Version: 1.0.0.0
        Win32 Version: 4.0.30319.34281 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    Microsoft.GeneratedCode
        Assembly Version: 1.0.0.0
        Win32 Version: 4.0.30319.34281 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    B1Studio.Designer.FormPackage
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Modules/Designer/Packages/FormPackage/B1Studio.Designer.FormPackage.dll
    ----------------------------------------
    B1CustomControl
        Assembly Version: 1.0.6085.40865
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Modules/Designer/Packages/FormPackage/B1CustomControl.DLL
    ----------------------------------------
    B1Studio.Designer.UI
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Modules/Designer/B1Studio.Designer.UI.dll
    ----------------------------------------
    B1Studio.Localization.2010
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Common/B1Studio.Localization.2010.dll
    ----------------------------------------
    B1Studio.Localization.2010.resources
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Common/ar-SA/B1Studio.Localization.2010.resources.dll
    ----------------------------------------
    DesignerModule
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Modules/Designer/DesignerModule.dll
    ----------------------------------------
    B1Studio.Designer.Core
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Modules/Designer/B1Studio.Designer.Core.DLL
    ----------------------------------------
    B1Studio.Designer.Framework
        Assembly Version: 0.0.0.0
        Win32 Version: 0.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Modules/Designer/B1Studio.Designer.Framework.DLL
    ----------------------------------------
    Microsoft.GeneratedCode
        Assembly Version: 1.0.0.0
        Win32 Version: 4.0.30319.34281 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    Microsoft.GeneratedCode
        Assembly Version: 1.0.0.0
        Win32 Version: 4.0.30319.34281 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    B1Studio.Designer.WinFormShell
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Shell/B1Studio.Designer.WinFormShell.DLL
    ----------------------------------------
    B1.Windows.Controls.Basic.WPF
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Common/B1.Windows.Controls.Basic.WPF.dll
    ----------------------------------------
    WindowsFormsIntegration
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll
    ----------------------------------------
    PresentationFramework
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34292
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
    ----------------------------------------
    WindowsBase
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34292 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
    ----------------------------------------
    PresentationCore
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34292 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
    ----------------------------------------
    System.Xaml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34292 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
    ----------------------------------------
    B1.Windows.Controls.Resources
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Common/B1.Windows.Controls.Resources.dll
    ----------------------------------------
    B1.Windows.Controls.Resources.resources
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/SAP/SAP%20Business%20One%20Studio/Bin/Common/ar-SA/B1.Windows.Controls.Resources.resources.dll
    ----------------------------------------
    PresentationFramework.Aero2
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero2/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero2.dll
    ----------------------------------------
    Microsoft.GeneratedCode
        Assembly Version: 1.0.0.0
        Win32 Version: 4.0.30319.34281 built by: FX452RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    
    
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    
    For example:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    
    

    Thanks,

    Manuel Dias

    Add comment
    10|10000 characters needed characters exceeded