• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NullPointer Exception

 
sri rallapalli
Ranch Hand
Posts: 88
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am new to CORBA, i have written an idl file, and a pecific method is returning an arra, , in the server, i have created 2 objects and added to the array object, then returned to the client. From the client i am trying to call the the function, now at the server side, i am getting a NullpointerException, in the Helper class. I am not sure whats happening over there. Any light on this?

Regards,
Sri.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check / post the stack trace of the NullPointerException.
 
sri rallapalli
Ranch Hand
Posts: 88
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is not a programatic exception. I am not able to catch that. Once i called the serverside function, it is getting called, and then it is trying to send the result back to the client, during the transfer to the client it is giving this exception, some where in the Helper classes, those classes have been generated after compiling the IDL file.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sri rallapalli:
it is not a programatic exception.


Is sri your correct name ? If not check with the naming policy.

Its not good , but for tacking the exception you might want to catch Exception instead of checked exceptions and print the stack trace for more information about that.Later on you can undo the changes and modify the faulty code accordingly.
 
sri rallapalli
Ranch Hand
Posts: 88
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What ever I am writing in the server function I am putting it in the
Try { } and then I am trying to catch the exception. But it is not getting caught here.

In the server logs it is showing something like: Visibroker for java runtime caught exception; java.lang.NullPointerException.

And then showing some xxxHelper.java, etc.

can anyone help me please...

regards,
Sri.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And then showing some xxxHelper.java, etc.


The information you need to solve the problem is probably burried in that "etc." - When you get an exception, don't panic - copy as much of the stack trace as you can get to a separate file for later analysis.

Bill
 
Girish M S
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you mentioned, you are new to CORBA, please make sure any simple function instead of going directly for array or so. Then try to get it done by clearing step by step.

Other way is to post your code along with the stack trace of your exception.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"G M S",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic