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


Under the terms of this license, you are authorized to share and redistribute the content across various mediums, subject to adherence to the specified conditions: you must provide proper attribution to Stoneridge as the original creator in a manner that does not imply their endorsement of your use, the material is to be utilized solely for non-commercial purposes, and alterations, modifications, or derivative works based on the original material are strictly prohibited.

Responsibility rests with the licensee to ensure that their use of the material does not violate any other rights.

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!