Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

space.notify : NullPointerException

Thread view: 
Eitan M - 13 Aug 2007 16:03 GMT
Hello.

I am using jini javaspace,
I am getting the NullPointerException, and I don't understand what may be
the reason for that :

My code :
-----------

(space is valid javaspace).

space.notify(gr, null, listener, Lease.FOREVER,
new MarshalledObject(new String("changeroup")));

... after above I get the exception.

listener is declared as  :

private class BoardListener extends UnicastRemoteObject implements
RemoteEventListener {

private static final long serialVersionUID = 5168300461166715862L;

... and listener is not null ...

Even breakpoint on that listener isn't reachable yet.

Thanks :)
Thomas Fritsch - 13 Aug 2007 22:39 GMT
> I am using jini javaspace,
> I am getting the NullPointerException, and I don't understand what may be
> the reason for that :
And we don't understand either, because you didn't post enough
information to pin down your problem.
(1) Instead of posting just the name "NullPointerException",
  please copy/paste the *whole* exception stack trace.
  It might look like this:
  java.lang.NullPointerException
    at your.package.YourObject.yourMethod(YourObject.java:123)
    at com.sun.bla.Blub.foo(Blub.java:456)
    ...
    at Thread.run(Thread.java:23)
  The class names, method names, file names, and line numbers
  will be essential for analyzing.
(2) Instead of posting a single line where you suspect the error
  to be, post a bigger chunk of code (may be the complete class).
  And please write the actual line numbers besides it, so that
  the line numbers given in the exception stack trace can be
  identified.

> My code :
> -----------
[quoted text clipped - 16 lines]
>
> Even breakpoint on that listener isn't reachable yet.

Signature

Thomas

Roedy Green - 14 Aug 2007 03:06 GMT
>... after above I get the exception.

Print out a stack dump  with e.printStackTrace() to figure out exactly
where the exception happened.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.