14.10.2015, 17:11 | #1 |
Участник
|
AX 2012 R3: Business Connector не может получить экземпляр класса XMLDocument
Стал на днях исследовать, почему Visual Studio при открытии зависает.
Оказалось, оно запускает новую клиентскую сессию через Business Connector, пытается запустить логику системы контроля версий, и в какой-то момент сессия молча падает на вызове XmlDocument::newXML(), после чего открывается новая сессия и дальше по кругу. Могу вопроизвести при помощи такого скрипта на C#: X++: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Dynamics.BusinessConnectorNet; namespace ReproXmlDocumentError { class Program { public static void createObjectInAX(string _objectName) { Axapta ax; try { ax = new Axapta(); ax.Logon(null, null, null, null); AxaptaObject o = ax.CreateAxaptaObject(_objectName); if (o != null) { Console.WriteLine( "Object {0} was successfully created", _objectName); } } catch (Exception e) { Console.WriteLine( "Object {0} was not created. Error: {1}", _objectName, e.Message); } } static void Main(string[] args) { createObjectInAX("CostSheet"); createObjectInAX("XMLDocument"); createObjectInAX("TextBuffer"); Console.ReadKey(); } } } После запуска в Event Viewer можно найти записи, где самое конкретное: "The specified resource type cannot be found in the image file". Пробовал запустить этот же скрипт на демо-машинах AX 2012 R3 RTM и AX 2012 R3 CU9: всё нормально, XMLDocument создается. Если запустить аналогичный скрипт, но на X++ в клиенте -- тоже без проблем. Что бы это такое могло быть, что стандартный класс XmlDocument не работает через бизнес-коннектор? AX 2012 R3 Kernel version: 6.3.2000.3774 Application version: 6.3.2000.323 |
|
15.10.2015, 10:47 | #2 |
Участник
|
Проверьте вот эту информацию:
Цитата:
This problem is related to the lack of memory in Windows. It may be resolved by closing unused applications and by increasing the Windows Virtual memory setting.
Цитата:
Make sure that the user has development privileges by setting the security key to SysDevelopment on the control that calls this method.
Последний раз редактировалось Товарищ ♂uatr; 15.10.2015 в 10:52. |
|
15.10.2015, 11:17 | #3 |
Участник
|
Я бы глянул Fusion лог, может какая длл не грузиться и поэтому обьект не создается.
Если длл определить удалось, глянул бы сидит ли она в GAC. http://stackoverflow.com/questions/2...-fusion-in-net PS Не забудьте отключить ...
__________________
AxAssist 2012 - Productivity Tool for Dynamics AX 2012/2009/4.0/3.0 |
|
15.10.2015, 13:17 | #4 |
Участник
|
Включил Fusion лог.
Цитата:
*** Assembly Binder Log Entry (15-Oct-15 @ 11:09:14 AM) ***
The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under executable C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe --- A detailed error log follows. === Pre-bind state information === LOG: DisplayName = Microsoft.IntelliTrace.ObjectModel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified) LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = msvsmon.exe Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe.Config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/Microsoft.IntelliTrace.ObjectModel.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/Microsoft.IntelliTrace.ObjectModel/Microsoft.IntelliTrace.ObjectModel.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/Microsoft.IntelliTrace.ObjectModel.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/Microsoft.IntelliTrace.ObjectModel/Microsoft.IntelliTrace.ObjectModel.EXE. LOG: All probing URLs attempted and failed. *** Assembly Binder Log Entry (15-Oct-15 @ 11:09:14 AM) *** The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under executable C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe --- A detailed error log follows. === Pre-bind state information === LOG: DisplayName = Microsoft.IntelliTrace.ObjectModel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified) LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = msvsmon.exe Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe.Config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/Microsoft.IntelliTrace.ObjectModel.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/Microsoft.IntelliTrace.ObjectModel/Microsoft.IntelliTrace.ObjectModel.DLL. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/Microsoft.IntelliTrace.ObjectModel.EXE. LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Remote Debugger/x64/Microsoft.IntelliTrace.ObjectModel/Microsoft.IntelliTrace.ObjectModel.EXE. LOG: All probing URLs attempted and failed. Цитата:
'ReproXmlDocumentError.vshost.exe' (CLR v4.0.30319: ReproXmlDocumentError.vshost.exe): Loaded 'C:\windows\assembly\GAC_64\Microsoft.Dynamics.AX.ManagedInterop\6.3.0.0__31bf3856ad364e35\Microsoft.Dynamics.AX.ManagedInterop.dll'. Cannot find or open the PDB file.
'ReproXmlDocumentError.vshost.exe' (CLR v4.0.30319: ReproXmlDocumentError.vshost.exe): Loaded 'C:\windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_08e793bfa83a89b5\msvcm90.dll'. Cannot find or open the PDB file. 'ReproXmlDocumentError.vshost.exe' (CLR v4.0.30319: ReproXmlDocumentError.vshost.exe): Loaded 'C:\windows\assembly\GAC_64\Microsoft.Dynamics.AX.ManagedInteropCore\6.3.0.0__31bf3856ad364e35\Microsoft.Dynamics.AX.ManagedInteropCore.dll'. Cannot find or open the PDB file. 'ReproXmlDocumentError.vshost.exe' (CLR v4.0.30319: ReproXmlDocumentError.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll'. Cannot find or open the PDB file. 'ReproXmlDocumentError.vshost.exe' (CLR v4.0.30319: ReproXmlDocumentError.vshost.exe): Loaded 'C:\Program Files\Microsoft Dynamics AX\60\BusinessConnector\Bin\Microsoft.Dynamics.Xml.dll'. Cannot find or open the PDB file. The thread 0x5c80 has exited with code 259 (0x103). The thread 0x5c9c has exited with code 259 (0x103). The program '[22640] ReproXmlDocumentError.vshost.exe' has exited with code 0 (0x0). The program '[22640] ReproXmlDocumentError.vshost.exe: Program Trace' has exited with code 0 (0x0). Цитата:
'ReproXmlDocumentError.vshost.exe' (CLR v4.0.30319: ReproXmlDocumentError.vshost.exe): Loaded 'C:\windows\assembly\GAC_64\Microsoft.Dynamics.AX.ManagedInterop\6.3.0.0__31bf3856ad364e35\Microsoft.Dynamics.AX.ManagedInterop.dll'. Cannot find or open the PDB file.
'ReproXmlDocumentError.vshost.exe' (CLR v4.0.30319: ReproXmlDocumentError.vshost.exe): Loaded 'C:\windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_08e793bfa83a89b5\msvcm90.dll'. Cannot find or open the PDB file. 'ReproXmlDocumentError.vshost.exe' (CLR v4.0.30319: ReproXmlDocumentError.vshost.exe): Loaded 'C:\windows\assembly\GAC_64\Microsoft.Dynamics.AX.ManagedInteropCore\6.3.0.0__31bf3856ad364e35\Microsoft.Dynamics.AX.ManagedInteropCore.dll'. Cannot find or open the PDB file. 'ReproXmlDocumentError.vshost.exe' (CLR v4.0.30319: ReproXmlDocumentError.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll'. Cannot find or open the PDB file. A first chance exception of type 'Microsoft.Dynamics.BusinessConnectorNet.XppException' occurred in Microsoft.Dynamics.BusinessConnectorNet.dll The thread 0x7ac has exited with code 259 (0x103). The thread 0x2b24 has exited with code 259 (0x103). The program '[18044] ReproXmlDocumentError.vshost.exe: Program Trace' has exited with code 0 (0x0). The program '[18044] ReproXmlDocumentError.vshost.exe' has exited with code 0 (0x0). Папки C:\Program Files\Microsoft Dynamics AX\60\BusinessConnector\Bin на обеих машинах идентичны. |
|
|
|