• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NullPointer Exception

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check / post the stack trace of the NullPointerException.
 
sri rallapalli
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
crispy bacon. crispy tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic