AOS Failed to Start

By Jackie Olson | July 9, 2015

The AOS failed to start error is found in System event viewer: ‘The Microsoft Dynamics AX Object Server 6.3$01-DemoDataAX service terminated with service-specific error Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O.’

I was in the process of upgrading to AX 2012 R3 from AX 2012 RTM. I was at the point where I had installed the R3 database, and was then installing the R3 AOS per the AX 2012 Upgrade guide.

During the install of the R3 AOS component, setup failed on starting the AOS.

 

What was the cause of the AOS failed start?

One of the pre-requisite steps in the upgrade process is that you have to remove any customization from the system classes. These are the classes you need to check: Info, Session, Application, Company, Site, ClassFactory, Global, VersionControl, SysStartupCmd*, SysSetupForm*, SYS*, and Batch Framework

We tried to override the ISV changes by removing the code in VAR layer but that did not work.

The workaround was to remove the ISV code from modelelementdata table. This is not supported by Microsoft so proceed at your own risk. However, we did complete the upgrade and there have been no negative effects from this workaround.

 

Here are some scripts we used to find the offending codes. Run these against axRTMDEV01 and AXRTMDEV01_model:

--for classfactory
select * from ModelElement where name='ViewSRSreport' -- element handle=555; parentid=61445
 
select * from modelelement where axid=61445-- class = classfactory; elementhandle=529
 
select * from modelelement where parentid=61445  --ElementHandle 545 createViewer; 555 viewSRSReport; 557 CreateViewerInternal
 
select * from ModelElementData where elementhandle=555
 
--for info
select * from ModelElement where name='info' and elementtype =45--axid is 61444; element handle is 101
select * from ModelElement where name='info' and elementtype =23
 
select * from modelelement where parentid=61444
 
select * from modelelementdata where modelid<>17 and elementhandle between 102 and 220 --element handle 192 and 127 startuppost canShutdown
 
select * from modelelementdata where elementhandle=192
 
 
--for session (no mods)
select * from ModelElement where name='session' and elementtype =45--axid is 61440; element handle is 25
select * from ModelElement where name='info' and elementtype =23
select * from modelelement where parentid=61440
select * from modelelementdata where elementhandle=26
select * from modelelementdata where elementhandle=27
select * from modelelementdata where elementhandle=28
select * from modelelementdata where elementhandle=29
select * from modelelementdata where elementhandle=30
select * from modelelementdata where elementhandle=31
select * from modelelementdata where elementhandle=32
select * from modelelementdata where elementhandle=33
 
 
--for application
select * from ModelElement where name='application' and elementtype =45--axid is 61441; element handle is 34
select * from ModelElement where name='application' and elementtype =23
select * from modelelement where parentid=61441
select MODIFIEDBY, modelid, * from modelelementdata where modelid<>17 and elementhandle between 35 and 92 --element handle 35 classDeclaration and 66 new
select * from modelelementdata where modelid<>17 and elementhandle between 779523 and 779532
 
--for classfactory
select * from ModelElement where name='classfactory' and elementtype =45--axid is 61445, element handle is 529
select * from ModelElement where name='classfactory' and elementtype =23
select * from modelelement where parentid=61445
select * from modelelementdata where modelid<>17 and elementhandle between 530 and 563 --element handle 545, 555, 557 and  model 76
select * from modelelementdata where  elementhandle=557022
select * from modelelementdata where modelid<>17 and elementhandle between 779570 and 779575
 
---items to delete
delete modelelementdata where modelid=76 and elementhandle=545 --ClassFactory:createViewer
delete modelelementdata where modelid=76 and elementhandle=555  -- ClassFactory:viewSRSReport
delete modelelementdata where modelid=76 and elementhandle=557  -- ClassFactory:CreateViewerInternal
delete modelelementdata where modelid=82 and elementhandle=192  -- Info:startuppost
delete modelelementdata where modelid=71 and elementhandle=127  -- Info:canShutdown
delete modelelementdata where modelid=65 and elementhandle=35  -- Application:classDeclaration
delete modelelementdata where modelid=65 and elementhandle=66  --Application:new
 
 select MODIFIEDBY, ModelId, * from ModelElementData where elementhandle in (192,127)
 select MODIFIEDBY, ModelId, * from ModelElementData where elementhandle in (545, 555, 557)
 select MODIFIEDBY, ModelId, * from ModelElementData where elementhandle in (35, 66)
  select MODIFIEDBY, ModelId, * from ModelElementData where MODIFIEDBY = 'jolso' and modelid <> 17

  select * from ModelManifest  -- 22 extensions 104, 105 

  select * from ModelElement where name='erp_numberseqinitializationtecm'

---These are the items we ended up deleting
delete modelelementdata where modelid=76 and elementhandle=545 --ClassFactory:createViewer
delete modelelementdata where modelid=76 and elementhandle=555  -- ClassFactory:viewSRSReport
delete modelelementdata where modelid=76 and elementhandle=557  -- ClassFactory:CreateViewerInternal
delete modelelementdata where modelid=82 and elementhandle=192  -- Info:startuppost
delete modelelementdata where modelid=71 and elementhandle=127  -- Info:canShutdown
delete modelelementdata where modelid=65 and elementhandle=35  -- Application:classDeclaration
delete modelelementdata where modelid=65 and elementhandle=66  --Application:new

 

After the delete, run these to verify only Microsoft’s system classes are present:

select a.MODIFIEDBY, a.ModelId, b.name from ModelElementData a 
   join ModelManifest b on a.modelid = b.ModelId where a.elementhandle in (192,127)

select a.MODIFIEDBY, a.ModelId, b.name from ModelElementData a 
   join ModelManifest b on a.modelid = b.ModelId where a.elementhandle in (545,555,557)

select a.MODIFIEDBY, a.ModelId, b.name from ModelElementData a 
   join ModelManifest b on a.modelid = b.ModelId where a.elementhandle in (35,66)

By deleting the offending objects, we were then able to start the AOS then installed the AX 2012 R3 client and Management utilities then proceed with the upgrade.

We also opened a support case with Microsoft and here’s another alternative to this issue:

I tested an alternative to deleting the objects directly. I created a test table in a VAR layer (assume that is the ISV). I then changed to the CUS layer and set my model to a new custom model. I then made a change to the table and fields. This involved adding a comment of “.” to the “Developer Documentation” property on the table, and a “.” to the “Help Text” property on each field. I made an export of the CUS model just as a backup, and delete the VAR model. I found that what I had left was the table and fields in the CUS layer. Therefore, all table IDs and Fields were kept.

 

Related Posts

Recommended Reading:

Managing Your Business Through Uncertain Times Using Dynamics 365 Finance and Operations

  Dynamics 365 Finance and Operations (F&O) can help you make informed decisions on how to move your business forward. […]

Read the Article
5.13.22 Power Platform

Using Power BI Object Level Security

  The following article will demonstrate how to use Power BI Object Level Security to disable column data based on […]

Read the Article
5.12.22 Dynamics CRM

How to Use the Stoneridge Support Portal

Stoneridge Software’s support portal is an intuitive and useful function that makes it easy for you to access resources to […]

Read the Article
5.6.22 Dynamics GP

Dynamics GP Transaction Removal: Purchase Orders

  Are you having performance issues with Purchase Orders?  Do you find that there are old Purchase Orders on your […]

Read the Article
5.5.22 Dynamics GP

The Real Story about the Long-Term Future of Dynamics GP Support

I’ve seen a number of people put forward comment that Dynamics GP is going away and you have to get […]

Read the Article

New Features in Dynamics 365 Business Central 2022 Wave 1 Release – Financial Enhancements

The Dynamics 365 Businses Central 2022 Wave 1 Release has a lot of new and exciting features to help your […]

Read the Article
4.29.22 Dynamics GP

Dynamics GP Transaction Removals: Bank Reconciliation

  This is part 2 of a 3 part series on Dynamics GP Transaction Removals. These quick tips will hopefully […]

Read the Article
4.28.22 Dynamics GP

Uncommonly Used Features – Integrate Purchasing and Payables to Fixed Assets in Dynamics GP

Being able to integrate Purchasing and Payables to Fixed Assets in Dynamics GP will help you create visibility for your […]

Read the Article

New Features in the Dynamics 365 Business Central 2022 Wave 1 Release – Ease-of-Use Features

  There are many new features in the Dynamics 365 Business Central 2022 Wave 1 Release to get excited about! […]

Read the Article

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X