wood burning stoves 2.0*
The moose likes Distributed Java and the fly likes NullPointer Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "NullPointer Exception" Watch "NullPointer Exception" New topic

NullPointer Exception

sri rallapalli
Ranch Hand

Joined: Mar 15, 2005
Posts: 88
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?

Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Check / post the stack trace of the NullPointerException.

Rahul Bhattacharjee
LinkedIn - Blog
sri rallapalli
Ranch Hand

Joined: Mar 15, 2005
Posts: 88
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

Joined: Nov 29, 2005
Posts: 2308
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

Joined: Mar 15, 2005
Posts: 88
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...

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12759
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.

Girish M S

Joined: May 29, 2007
Posts: 5
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.

G M S<br /> <a href="mailto:g.debugger@gmail.com" rel="nofollow">g.debugger@gmail.com</a>
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60752

"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.

JavaRanch Sheriff

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
subject: NullPointer Exception
Similar Threads
What JARs are needed on the client side to access EJBs deployed on a Websphere 7 server?
Don't understand mode flag
Exception Handling
Passed 87%, some thoughts....