Can't create a connection - "Object reference not set to an instance of..."

Hi,

I’m trying out SQL Optimizer 8.0.0 for Oracle and it’s not going so well. When I try to create a direct connection I get a dialog that says,

“The following unhandled error has occurred: Object reference not set to an instance of an object.”

My connection parameters are good - I’m using them in Oracle SQL Developer, plus our code works. I’m using Windows XP and the server has Oracle 10g R2, but I don’t think it’s even getting to the point where the server matters.

Could the problem be that our development isn’t connected to the Internet? Of course our development server and database are on the same network as our development machines, but that whole network is isolated.

Since our dev network isn’t connected to the Internet I can’t send the support bundle. And no, I can’t just put it on a thumb drive and walk it to this machine…it’s not quite that easy.

Thanks,

Paul

Hi Paul,

Would you please send the log files by using “Attach Files” here?

Steps as follows:

  1. Launch the Quest SQL Optimizer for Oracle
  2. Click “Help | Support Bundle” to open the Support Bundle
  3. Repeat the steps that you can create the “Object not reference” error
  4. Once the error occured, go back to the Support Bundle page
  5. Click “Save and Close” button to save the log files
  6. Send us back the file by attaching them here.

I’ll try to investigate the problem once I get the files.

Regards,
Polly

Hi Paul,

Since there’s not enough information provided to know what is the main cause for the error, the log files may help much.

However, if you find difficulties on sending us the files, an other alternative is you can describe more for everyting you did (any button clicks or modules launched) and saw from you started using the application and got this error. I will try to replicate the error as your the steps.

=====
Note: Here is another thing you can try:

We have a known issue reported earlier that get the “Object reference not set…” error in Version 8.0.0, which is due to the layout problem, and it can be solved by:

  1. Launch the Quest SQL Optimizer for Oracle
  2. At the top-right corner of the application, click “Options”, an Options windows will be shown.
  3. At the left hand side of the Option Window, navigate the tree list “General | Options”
  4. Click on the “Restore…” button at right hand side. Select the “Optimize SQL” check box and click “Apply” button.
  5. Try to repeat your steps again to see if the error still here.

=====

If your problem cannot be solved as the above case stated, please try to decribe more for your steps, or try to send us the log files.

Thanks for your help.

Regards,
Polly

Polly,

As I noted in my original post I cannot directly upload the support bundle. Our development network is separate from the Internet and I can’t move files from one network to the other.

Paul

Hi Paul,

Yes, I understand your development environment cannot connect to the Internet now.

Please help to try Restore Layout in the Application as my previous message stated, and let me know if the issue can help your case.

If the Restore Layout cannot help, I may need to replicate your case in other direction. So, please help to provoide more detailed steps, what you did and what you see, for your case. I’ll try to replicate it on the WinXP and Ora10g R2 environment.

Thanks,
Polly

Polly,

Restore Layout did not fix it. Neither did uninstalling and reinstalling the application. Here is part of the call stack at the top of sqlTuning1.txt:

Call Stack
******************************************

0: at Quest.Tuning.Common.DebugLog.TLogEngine.SendException(Exception e)
1: at Quest.Tuning.Common.DebugLog.TLogMessage.SendException(LogCategory aCategory, Exception aEx)
2: at Quest.Tuning.Common.DebugLog.TLogMessage.HandleException(LogCategory aCategory, Exception aEx)
3: at Quest.Tuning.Common.DebugLog.TLogMessage.HandleException(Exception aEx)
4: at Quest.Tuning.Oracle.Main.Program.Application_ThreadException(Object sender, ThreadExceptionEventArgs e)
5: at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
6: at System.Windows.Forms.Control.WndProcException(Exception e)
7: at System.Windows.Forms.Control.ControlNativeWindow.OnThreadException(Exception e)
8: at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
9: at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

16: at Quest.Tuning.Oracle.Main.ucMainAllModules.ucMainTabs1_ChangedAction(Actions aAction)
17: at Quest.Tuning.Oracle.Main.ucMainTabls.barButtonConnection_ItemClick(Object sender, ItemClickEventArgs e)
18: at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
19: at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)
20: at DevExpress.XtraBars.BarItemLink.OnLinkClick()
21: at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
22: at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
23: at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
24: at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
25: at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)

38: at Quest.Tuning.Oracle.Main.Program.Main()


Further down in that file there are errors that the Support Bundle encountered. Here is an example:


Could not load file or assembly ‘file:///c:\dir_to_install\BaselineLib.dll’ or one of its dependencies. The module was expected to contain an assembly manifest.


That is repeated with different filenames for the rest of the log. I checked and all those files are present in the location stated in the log file.

Hopefully this helps some.

Paul

Hi Paul,

When you launch the application, click “Connect” at the top-right corner, and a Connection Manager form will be shown.

If you’re using a direct connect method, the following fields must be filled:

  1. User
  2. Password
  3. Host
  4. Port
  5. Service Name / SID
  6. Connect as:
  7. Installed Clients | Connect Using (pick a client to connect)

Please let me know what you chose to use for the “Connect as” and “Installed Client | Connect Using”.

Also, besides the Installed Clients | Connect Using field, there’s a drop down box with a “…” button. Click on the “…” button, a Oracle Home Editor form will be shown, please help to check if all the fields under the client you picked are correct, and let me know the client version you’re using and if the “Status” field show you “Home is valid” there or not.

Thanks,
Polly

Polly,

I can’t do step 7. There is nothing in the drop down box labeled “Connect Using:” and nothing happens when I click on the button with the “…”.

Paul

Hi Paul,

For using the product, you need to install an Oracle Client before you can connect to the database throught the application. Please try to install one on your machine, and make sure you can connect to the database through the client, then retry you steps to see if the error still there or not.

Thanks,
Polly

Thanks Polly, that did the trick. I had Instant Client on my machine but neglected to update my Windows path environment variable to point to the directory. Once I did that all was well.

Perhaps your developers could either make a more helpful error message or disable “create” until a client is selected.

Thanks again!

Paul

Hi Paul,

Nice to know your issue solved.

We’ll provide an enhancement as you suggested in the coming release.

We’d like to hear more from you for any suggestions/feedbacks for our product in the future.

Regards,
Polly