13 Replies Latest reply: Aug 22, 2013 7:54 AM by Dennis Aarts RSS

    "Object reference not set to an instance of an object." on run

    Dennis Aarts

      Dear members,

       

      Today I tried to "Build and Run..." a rule base that i created some time ago and executed correctly. Now I get the error "Object reference not set to an instance of an object." when I try to execute the rule base using Oracle Web Determinations (the build is still succesful). When I execute the rule base using "Build and Debug..." no errors are presented and the rule base is executed succesfully as well. I can also access the rule base in my web browser without having any problems. I expect that the cause of the problems lay in the recent installation of Google Chrome and / or Mozilla Firefox, yet I don't know where to look for a solution. I already tried to install the latest version of Oracle Policy Modeling, but the error hasn't been resolved by that.

        • 1. Re: "Object reference not set to an instance of an object." on run
          Frank.Hampshire-Oracle

          Hi,

           

          The error seems pretty mysterious. My first suspicion is that something is wrong with the tomcat server which is embedded with OPM.

           

          You might try the following:

          1. Delete the "release" folder in your project. The release folder holds the interview web application. It will be recreated when you choose "Build and Debug"

          2. Reinstall OPM.

           

           

          Cheers

          Frank

          • 2. Re: "Object reference not set to an instance of an object." on run
            Dennis Aarts

            Dear Frank,

             

            Thanks for the reply. I already tried to remove and reinstall OPM (see initial post), but without success. Based on your post I tried to remove the release-folder as well, but this didn't resolve the problem either. In the meantime I got some more information. The problem occurs with every rule base, even if I try to build and run an empty one. Furthermore I have installed Maven previously, which makes use of Jetty. Could it be that this interferes with Tomcat? Since I can acccess the rule base using a direct URL in my browser, I know that the Tomcat server starts and runs correctly though. The error doesn't come along with any specific information, which makes problem solving extremely difficult.

            • 3. Re: "Object reference not set to an instance of an object." on run
              Bradtuckett-Oracle

              "Object reference not set to an instance of an object." is not a Java error - it is the .NET class System.NullReferenceException, so this suggests that something is not correct in your system configuration. Can you confirm which OPM version you are using please.

              • 4. Re: "Object reference not set to an instance of an object." on run
                Dennis Aarts

                Dear Brad,

                 

                The problem first occured using version 10.4.2.??. Previously everything worked fine in this version though. Of course I reinstalled the latest version of OPM, meaning that I currently use version 10.4.4.21.

                • 5. Re: "Object reference not set to an instance of an object." on run
                  Bradtuckett-Oracle

                  Thanks - we will investigate the code in 10.4.2 to see what might explain this problem - it could be encountering missing or incorrect environment or registry settings.

                  • 6. Re: "Object reference not set to an instance of an object." on run
                    Dennis Aarts

                    Dear Brad,

                     

                    Thank you for taking this problem into account. I expect it to be missing / incorrect environment or registry settings as well, caused by the installation of one of the above applications.

                    • 7. Re: "Object reference not set to an instance of an object." on run
                      Frank.Hampshire-Oracle

                      Dennis,

                       

                      It sounds a lot like OPM is having problems opening the browser window. The most likely cause is that there is some problem determining the default browser.

                       

                      If you haven't already tried this, try explicitly setting one of your browsers as the default browser to see if this helps.

                       

                      Cheers

                      Frank

                      • 8. Re: "Object reference not set to an instance of an object." on run
                        Dennis Aarts

                        Dear Frank,

                         

                        Thank you for putting me into this direction. I never looked into the default browser settings, because they never changed. That is, Microsoft Internet Explorer is and has always been my default browser. Yet making Mozilla FireFox or Google Chrome my default browser resolved the problem (partialy). Since we're analysts we of course want to know how the problem occured. Furthermore, since the problem isn't completely resolved yet, there seems to be some sort of bug left in Oracle Policy Modeling.

                         

                        • I used Oracle Policy Modeling for half a year without having any problems. The rule base was always run correctly in Microsoft Internet Explorer (which was set as the default browser).
                        • I installed both Google Chrome and Mozilla FireFox at the same time, but didn't change my default browser settings (thus Microsoft Internet Explorer stayed the default browser).
                        • Running a rule base now caused the "Object reference not set to an instance of an object." even though the default browser was set correctly.
                        • I changed the default browser to Google Chrome or Mozilla FireFox (which of the two doesn't matter) and the rule base was run correctly in the specific browser.
                        • I changed the default browser back to Microsoft Internet Explorer but Oracle Policy Modeling keeps using my previously set default browser (Google Chrome or Mozilla FireFox).

                         

                        From this I guess we may conclude that Oracle Policy Modeling doesn't look for the right registry key to determine the default browser. That is, Oracle Policy Modeling is unable to identify Microsoft Internet Explorer as the default browser, where other applications (like Google Chrome and Mozilla FireFox) do this correctly. I expect that the key HKEY_CURRENT_USER\Software\Classes\http is looked up (which didn't exist after I installed Google Chrome and Mozilla FireFox), but for the Windows operating system this key is only used up to Windows XP. From Windows Vista onward the key HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice should be used to look up the default browser settings.

                        • 9. Re: "Object reference not set to an instance of an object." on run
                          Jasmine Lee-Oracle

                          Have you checked that your version of Internet Explorer is supported? In the OPA system requirements documentation, you'll see that support for IE6 was dropped from 10.4 onwards. So if you were using OPA 10.3 + IE6 (which should work), but then migrated the rulebase to 10.4.x and didn't upgrade your version of IE, you would have problems.

                           

                           

                          For OPA system requirements, see the 'System Requirements' section at the bottom of the OPA OTN page: http://www.oracle.com/technetwork/apps-tech/policy-automation/overview/index.html

                           

                           

                          Cheers,

                          Jasmine

                          • 10. Re: "Object reference not set to an instance of an object." on run
                            Frank.Hampshire-Oracle

                            From memory (I haven't looked at the source code) we just use a standard .NET browser control, so its unlikely we are explicitly looking for the default browser. We should just be relying on the standard windows setting for default browser.

                             

                            Perhaps a re-install or update of Internet Explorer, or re-specifying it as the default browser might help.

                            • 11. Re: "Object reference not set to an instance of an object." on run
                              Bradtuckett-Oracle

                              The registry key OPM looks for is HKEY_CLASSES_ROOT\HTTP\shell\open\command.  This exists on my Windows 7 machine, however I agree that the correct per-user setting would be preferable.  We will improve this in a future release.

                              • 12. Re: "Object reference not set to an instance of an object." on run
                                Dennis Aarts

                                Dear Jasmine,

                                 

                                Thank you for providing a helpful post. Yet, as I noted in my first post, I didn't upgrade Oracle Policy Manager until the error occured. Neither did I downgrade Microsoft Internet Explorer, which means that the error couldn't have been caused by an outdated version of IE.

                                • 13. Re: "Object reference not set to an instance of an object." on run
                                  Dennis Aarts

                                  Dear Brad,

                                   

                                  The registry key Oracle Policy Manager looks for (HKEY_CLASSES_ROOT\HTTP\shell\open\command) exists in Windows Vista and onwards only after setting Google Chrome or Mozilla FireFox (and maybe some other browsers) as the default browser. In Windows Vista and onwards this value isn't set, nor changed, when Microsoft Internet Explorer is set as the default browser. This explains why the "Object reference not set to an instance of an object." error occured, the key OPM was looking for didn't exists. Furthermore this also explains why Microsoft Internet Explorer isn't used anymore by Oracle Policy Manager even though it is set as the default browser, the registry key used by OPM isn't updated by Microsoft Internet Explorer.