Metadata in Failed State

jflynn
Member Posts: 34
I was hoping someone could shed some light on this issue. I installed R2 and received a lot of these errors. I installed a hotfix (6.00.32228) over the weekend and received one error today after upgrading. I know recompiling the object that is listed in the metadata error will fix it, but it's like driving a car with a wheel that falls off some times. Has anyone found a more permanent fix? After the hotfix, I put all of the databases in single user mode, unchecked the Enable for Microsoft Dynamics NAV Server, and then rechecked it to perform the recompile.
Here is what I believe is happening.
1. Service Tier starts, object cache is cleared
2. Request for object is passed from the RTC client to the Service Tier
3. If in cache, object is pulled from cache and services request from the cache
4. If not, a c# program is generated from the CSIDE code, compiled to a DLL in a temporary folder (assembly) and moved to the cache
Server 2003 - C:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\assembly
Server 2008 - C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\assembly
5. If this process fails, the DLL is left in the assembly folder and is not moved to the cache
6. Next request comes along and fails because DLL is already in temporary folder and process was not written to handle this situation.
7. Recompiling the object tells the object change listener to flush the cache for this object.
8. Obviously something gets reset and allows DLL to be removed.
9. A possible fix would be to trap the metadata error, and automatically reset the cache, and recompile the object.
Does anyone have a permanent solution?
Here is what I believe is happening.
1. Service Tier starts, object cache is cleared
2. Request for object is passed from the RTC client to the Service Tier
3. If in cache, object is pulled from cache and services request from the cache
4. If not, a c# program is generated from the CSIDE code, compiled to a DLL in a temporary folder (assembly) and moved to the cache
Server 2003 - C:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\assembly
Server 2008 - C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\assembly
5. If this process fails, the DLL is left in the assembly folder and is not moved to the cache
6. Next request comes along and fails because DLL is already in temporary folder and process was not written to handle this situation.
7. Recompiling the object tells the object change listener to flush the cache for this object.
8. Obviously something gets reset and allows DLL to be removed.
9. A possible fix would be to trap the metadata error, and automatically reset the cache, and recompile the object.
Does anyone have a permanent solution?
Joe
0
Comments
-
The problem is that each build could change the way how the assemblies are created from the C/AL, thus you need to recompile the objects each time you apply some different version of NAV to have the correct information the app needs to work with the assemblies.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions