AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: Программирование
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 07.10.2020, 05:10   #1  
oleggy is offline
oleggy
Участник
 
282 / 36 (2) +++
Регистрация: 03.12.2019
Адрес: Россия
Цитата:
Сообщение от mazzy Посмотреть сообщение
она не зависает, а вычитывает практически весь АОТ из псевдо-таблицы UtilElements.
Эта таблица отражает содержимое AOD файлов и содержит всю бизнес-логику.
При последующих выборках, UtilElements будет брать объекты из кэша, поэтому зависаний не заметно.
Подскажите а если наблюдается такая проблема что зависание происходит постоянно.
Т.е. не только висит 1 минуту, но и при повторной попытке снова висит? По идее должно со второй попытки не должно тормозить.
По таблице Ledgerjournaltrans. Ее размеры:

Что это может быть?

У меня догатка что в коде не происходит сохранения в кэш.
Т.к. после ожидания 1 минуты и выбора какого то пункта в подменю Перекрестные ссылки, выводится как обычно таблица перекрестных ссылок но в добавок выводится infolog - Недопустимый тип контейнера данных.
Если словить его:
[c] \Classes\Info\add 14
[c] \Classes\Global\error 3
[c] \Classes\AfDataContainerDescriptors\createDataContainerDescriptor 69
[c] \Classes\AfDataContainerDescriptors\getDataContainerDescriptor 46
[c] \Classes\AfDataContainer\new 23
[c] \Classes\AfStronglyTypedDataContainer\new 20
[c] \Classes\CustCollectEInvoice_CustTable_NO\new 3


В методе createDataContainerDescriptor - 69:

X++:
private static AfDataContainerDescriptor createDataContainerDescriptor(str _dataContainerType, Map _constructionContext)
{
    str                         methodName;
    SysDictClass                metadataDictClass;
    container                   dataContainerMetadata, dataContainerDescriptorPackage;
    AfDataContainerDescriptor   dataContainerDescriptor;


    // Check if the requested data container descriptor is persisted in the runtime cache
    dataContainerDescriptorPackage = AifRuntimeCacheManager::retrieveEntry(AifRuntimeCacheEntryType::AfDataContainerDescriptors, _dataContainerType);
    if (conlen(dataContainerDescriptorPackage) > 0)
    {
        // Construct the data container descriptor.
        dataContainerDescriptor = AfDataContainerDescriptor::constructFromPackage(dataContainerDescriptorPackage, _constructionContext);
    }
    else
    {
        // Get a dictionary for AfDataContainerDescriptors class.
        metadataDictClass = new SysDictClass(classnum(AfDataContainerDescriptors));

        // Build the name of the method.
        methodName = strfmt('get\%1Metadata', _dataContainerType);

        // Check if the method exists.
        if (metadataDictClass.hasStaticMethod(methodName))
        {
            // The method exists, call it to get the metadata.
            new ExecutePermission().assert();
            // BP deviation documented
            dataContainerMetadata = metadataDictClass.callStatic(methodName, _dataContainerType);
            CodeAccessPermission::revertAssert();
        }
        else
        {
            // The method does not exist, try to get Axd data container metadata.
            dataContainerMetadata = AfDataContainerDescriptors::createAxdDataContainerMetadata(_dataContainerType);
        }

        if (conlen(dataContainerMetadata) > 0)
        {
            // Check the type of the returned metadata
            if (_dataContainerType != conpeek(dataContainerMetadata, #DataContainerTypeIndex))
            {
                // The type of the returned metadata does not match the requested data container type,
                // throw an error.
                throw error("@SYS125458");
            }

            // Construct a data container descriptor from the metadata.
            dataContainerDescriptor = AfDataContainerDescriptor::constructFromMetadata(dataContainerMetadata, _constructionContext);
        }
        else
        {
            // The metadata was not found. Throw an error.
            throw error("@SYS125462"); // <- ошибка тут
        }

        // Persist the data container descriptor in the runtime cache
        AifRuntimeCacheManager::cacheEntry(AifRuntimeCacheEntryType::AfDataContainerDescriptors, _dataContainerType, dataContainerDescriptor.pack());
    }

    return dataContainerDescriptor;
}

Указывает на то что контейнер dataContainerMetadata - пустой.
Я конечно буду смотреть по коду, где данный контейнер должен заполнятся.
Просто вдруг кто сталкивался?
Изображения
 

Последний раз редактировалось oleggy; 07.10.2020 в 06:00.
Старый 11.11.2020, 06:40   #2  
oleggy is offline
oleggy
Участник
 
282 / 36 (2) +++
Регистрация: 03.12.2019
Адрес: Россия
Вроде разобрался из за чего в AX09 постоянно зависает. Дело в том что не происходит сохранение в кэш.

А не происходит из-за того что при обсчете всего AOT наталкивается на такой класс (см. ниже) который пытается инициализировать, генерируется исключение. Выделил данный класс в простой джоб. У всех так?

X++:
static void Job561(Args _args)
{
    CustDocument_CustTable custDocument_CustTable;
    ;

    custDocument_CustTable = new CustDocument_CustTable();
}


Если провалится в new в данном классе видно что тут:

[c] \Classes\AfDataContainerDescriptors\createAxdDataContainerMetadata 19
[c] \Classes\AfDataContainerDescriptors\createDataContainerDescriptor 50
[c] \Classes\AfDataContainerDescriptors\getDataContainerDescriptor 46
[c] \Classes\AfDataContainer\new 23
[c] \Classes\AfStronglyTypedDataContainer\new 20
[c] \Classes\CustDocument_CustTable\new 3
[c] \Classes\AfDataContainerDescriptors\createAxdDataContainerMetadata 19
[c] \Classes\AfDataContainerDescriptors\createDataContainerDescriptor 50
[c] \Classes\AfDataContainerDescriptors\getDataContainerDescriptor 46
[c] \Classes\AfDataContainer\new 23
[c] \Classes\AfStronglyTypedDataContainer\new 20
[c] \Classes\CustDocument_CustTable\new 3


пытается найти класс которого нет в AOT - AxdCustDocument.
Из-за этого и валится.
Я посмотрел, этого класса и не было раньше. Странно.

Создал класс заглушку:

X++:
class AxdCustDocument extends AxdBase
{
}

AifActionInfoList getActionList()
{
    AifActionInfoList ret;

    ret = super();

    return ret;
}

void getConstraintList(Common _curRec, AifConstraintList _constraintList)
{
    super(_curRec, _constraintList);
}

LabelString getLabel()
{
    LabelString ret;

    ret = super();

    return ret;
}


Но теперь валится
Ошибка времени выполнения: QueryBuildDataSource Объект не инициализирован.

(C)\Classes\QueryBuildDataSource\table
(C)\Classes\AfDataContainerDescriptor\createDataItemsFromAxdDataSource - line 38
(C)\Classes\AfDataContainerDescriptor\constructFromMetadata - line 121
(C)\Classes\AfDataContainerDescriptors\createDataContainerDescriptor - line 64
(C)\Classes\AfDataContainerDescriptors\getDataContainerDescriptor - line 46
(C)\Classes\AfDataContainer\new - line 23
(C)\Classes\AfStronglyTypedDataContainer\new - line 20
(C)\Classes\CustDocument_CustTable\new - line 3


Ошибка тут:

X++:
private void createDataItemsFromAxdDataSource(AxdBase _axd, Map _constructionContext)
{
    Query                   axdQuery;
    QueryBuildDataSource    dataSource, childDataSource;
    int                     childDataSourceIndex, childDataSourceCount;
    AxInternalBase          axbc;
    SysDictTable            dictTable;
    Common                  table;
    Set                     tableDataItems;
    Set                     dataSourceDataItems;
    Set                     excludedDataItems;
    str                     documentHashDataItemName;
    int                     nextSerializationOrder = 1;


    // Get Axd query
    axdQuery = _axd.getQuery();

    // Get data source
    dataSource = axdQuery.dataSourceName(this.get_DataSourceName());

    // Create data item descriptors from the data source
    dictTable = new SysDictTable(dataSource.table()); // <-- тут ошибка
    table = dictTable.makeRecord();
    axbc = AxInternalBase::construct(table);
    if (axbc != null)
    ...
}



Причем this.get_DataSourceName() возвращает CustTable, все должно быть корректно.
но dataSource равен null.

Подскажите почему он равен null ?

Последний раз редактировалось oleggy; 11.11.2020 в 08:05.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
dynamicsaxse: May-June 2017 release – Dynamics AX 2012 R3 Blog bot DAX Blogs 0 21.06.2017 00:12
emeadaxsupport: Documentation collection: Inplace upgrade MS Dynamcis AX 2012 RTM --> AX 2012 R2 CU7 Blog bot DAX Blogs 0 22.06.2014 01:19
axsa: MDM Adapter - Extending Dynamics AX 2012 R3 Master Data Management Blog bot DAX Blogs 0 22.05.2014 03:28
axinthefield: Compatibility Testing for Microsoft Dynamics AX Blog bot DAX Blogs 0 23.06.2012 02:26
xplusplus: Dynamics AX Application Object Tree (AOT) Blog bot DAX Blogs 0 25.11.2010 18:11

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 21:15.