Title: NullPointerException without any clues
Type: Severity: major
Components: Core Versions: 2.5b1
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: doublep, fwierzbicki
Priority: Keywords:

Created on 2009-04-02.14:45:43 by doublep, last changed 2009-04-02.16:37:59 by fwierzbicki.

msg4410 (view) Author: (doublep) Date: 2009-04-02.14:45:40
Setting to major, because this gives me no idea what I'm doing wrong
(probably nothing).  Used to work fine with 2.5b0, gives this with 2.5b1:

java.lang.NullPointerException: java.lang.NullPointerException

	at org.python.core.PyException.fillInStackTrace(
	at java.lang.Throwable.<init>(
	at java.lang.Exception.<init>(
	at java.lang.RuntimeException.<init>(
	at org.python.core.PyException.<init>(
	at org.python.core.PyException.<init>(
	at org.python.core.Py.JavaError(
	at org.python.core.PyFunction.__call__(
	at org.python.pycode._pyx1.f$0(<string>:1)
	at org.python.pycode._pyx1.call_function(<string>)
	at org.python.core.Py.runCode(
	at org.python.core.Py.exec(
	at org.python.util.PythonInterpreter.exec(
Caused by: java.lang.NullPointerException
	at org.python.core.PyObjectDerived.__tojava__(
	at org.python.core.Py.tojava(
	at org.python.core.PyBeanProperty._doset(
	at org.python.core.PyObject.__set__(
	at org.python.core.PyObject.object___setattr__(
	at org.python.core.PyObject.object___setattr__(
	at org.python.core.PyObject$object___setattr___exposer.__call__(Unknown
	at org.python.core.PyObjectDerived.__setattr__(
	at org.python.core.PyMethod.instancemethod___call__(
	at org.python.core.PyMethod.__call__(
	at org.python.core.PyType.invoke_new_(
	at org.python.core.PyType.type___call__(
	at org.python.core.PyType.__call__(
	at org.python.pycode._pyx0.service$1(/py/
	at org.python.pycode._pyx0.call_function(/py/

I cannot provide small example.

It seems that PyObjectDerived.__tojava__ is called with null 'c' argument.
msg4411 (view) Author: (doublep) Date: 2009-04-02.14:46:46
Erm, with 2.5b3.  Got confused with versions field.
msg4412 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-04-02.16:30:33
We can't help without clues -- can you provide big code sample?
msg4413 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-04-02.16:34:07
or even a description of what you where doing?  A bug report of an NPE
with no guidance at all cannot be fixed.  If you are accessing Java code
for example, the NPE could come from that and then there would be
nothing we could do from Jython.  A couple of NPEs have been fixed
lately, so maybe if you try again with trunk or with the next release
(probably will be a release candidate) that will come out shortly...
msg4414 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-04-02.16:37:59
Ah -- looking through your stack trace, I did find a clue. I am almost
certain that this is a dup of  An NPE
occured when you try to set a readonly property (so a Java class with a
setX but no corresponding getX) this is fixed in trunk.  Closing as a dup.
Date User Action Args
2009-04-02 16:37:59fwierzbickisetstatus: open -> closed
resolution: duplicate
messages: + msg4414
2009-04-02 16:34:07fwierzbickisetmessages: + msg4413
2009-04-02 16:30:34fwierzbickisetnosy: + fwierzbicki
messages: + msg4412
2009-04-02 14:46:46doublepsetmessages: + msg4411
2009-04-02 14:45:44doublepcreate