Object reference not set error after moving to 2009 R2

Joe_Mathis
Member Posts: 173
Weird... :-k
Is anyone else having issues with it on a SQL 2005 instance?
Works fine on the SQL 2008 R2 instance, but when I try to connect to a database on SQL 2005 I get the list of company names then a sudden stop message.
"Microsoft Dynamics NAV has encountered a problem and needs to close.
We are sorry for the inconvenience."
I send the error report which has ...
EventType : dynamicsnavserviceexception P1 : microsoft.dynamics.nav.client
P2 : 6.0.32012.0 P3 : 4d030e65
P4 : microsoft.dynamics.nav.client.builder.dll P5 : 6.0.32012.0
P6 : 4d030e62 P7 : dc P8 : 4c P9 : system.nullreferenceexception
Client and service are both NAV 2009 R2. Have to change the ClientUserSetting.config file after this in order to even see the RTC selection screen again. If I don't change it I get the same error.
I guess I can move the databases as this is just dev database for me, but didn't read anything about compatibility with 2005 going away.
EDIT: Found this on the download page: An overview of system requirements for Microsoft Dynamics NAV 2009 R2. Note that the system requirements have not changed since Microsoft Dynamics NAV 2009 SP1.
Put the database on the SQL 2008 box and it still has the error.
Reading the dumpfile says:
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Is anyone else having issues with it on a SQL 2005 instance?
Works fine on the SQL 2008 R2 instance, but when I try to connect to a database on SQL 2005 I get the list of company names then a sudden stop message.
"Microsoft Dynamics NAV has encountered a problem and needs to close.
We are sorry for the inconvenience."
I send the error report which has ...
EventType : dynamicsnavserviceexception P1 : microsoft.dynamics.nav.client
P2 : 6.0.32012.0 P3 : 4d030e65
P4 : microsoft.dynamics.nav.client.builder.dll P5 : 6.0.32012.0
P6 : 4d030e62 P7 : dc P8 : 4c P9 : system.nullreferenceexception
Client and service are both NAV 2009 R2. Have to change the ClientUserSetting.config file after this in order to even see the RTC selection screen again. If I don't change it I get the same error.
I guess I can move the databases as this is just dev database for me, but didn't read anything about compatibility with 2005 going away.
EDIT: Found this on the download page: An overview of system requirements for Microsoft Dynamics NAV 2009 R2. Note that the system requirements have not changed since Microsoft Dynamics NAV 2009 SP1.
Put the database on the SQL 2008 box and it still has the error.
Reading the dumpfile says:
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
0
Answers
-
Had to change the title of the post because I am able to get another database on the SQL 2005 running.
It's 3 databases that were running SP1 that were executable convereted to R2 that will not start.
Recompiled all of the objects in 1 and just the pages in the other 2 and all three give the same message with the same dump file.
Will post whatever answers I find of course, but any suggestions are welcome.
EDIT:
It was a trigger in CU#1 the CompanyOpen had code to open a form. (Variation of the database info screen ala Waldo) SP1 didn't seem to care about it, but R2 doesn't like it, added a check for service tier (ISSERVICETIER) and now it works properly.0 -
I would be interested in seeing your 'before' and 'after' code. I do think the new behavior is by design, but I would like to make sure.Best regards,
Jens Møller-Pedersen [MSFT]
This posting is provided 'AS IS' with no warranties, and confers no rights.0 -
No Problem...
It is in Codeunit 1, the CompanyOpen trigger. The form is just a simple form with the database and company name, the license name, and then some colors that are controlled by settings on the Database Info Setup table (for me it's table 99991) which is a table out of the customers licensed range.
Before:CompanyOpen() IF GUIALLOWED THEN LogInStart; IF GUIALLOWED THEN IF recDatabaseInfoSetup.WRITEPERMISSION THEN BEGIN CLEAR(recDatabaseInfoSetup); IF recDatabaseInfoSetup.GET THEN IF recDatabaseInfoSetup."Show Database Info Form" THEN FORM.RUN(FORM::"Database Info"); END;
After:CompanyOpen() IF GUIALLOWED THEN LogInStart; IF GUIALLOWED AND NOT ISSERVICETIER THEN IF recDatabaseInfoSetup.WRITEPERMISSION THEN BEGIN CLEAR(recDatabaseInfoSetup); IF recDatabaseInfoSetup.GET THEN IF recDatabaseInfoSetup."Show Database Info Form" THEN FORM.RUN(FORM::"Database Info"); END;
I may have to remove it all together, and add something into the role center instead. A co-worker had some issue when the RTC brought up a CC to run a report that it tried to open the page, but then gave an error. The report still ran and we changed it to an RTC report shortly after, but if we have to have a CC report, then we can't have this error message showing up for the customer... actually it will probably only affect our company because the table should be out of the range and the code won't try to run the page/form.
Either way, I will probably figure out something different.0 -
This thread saved me a lot of time and hair. When moving our ISV application to RTC we had a "splash" screen that had a branch for "GUIALLOWED", but needed the ISSERVICETIER test to not make the RTC fall on its face with the cryptic message. Same thing - CU1 was the culprit. Thank you, thank you, thank you, thank you.... \:D/Mark Tyler
Pacific City, OR0 -
I can't remember how many times the board saved me...
That's why I post the solutions too.
You are very welcome.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