space.notify : NullPointerException

E

Eitan M

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 :)
 
T

Thomas Fritsch

Eitan said:
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.
 
R

Roedy Green

... after above I get the exception.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top