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