Getting NullPointerException in TDOMWriter...

Hi there,

I updated the classes on my application when installed Tamino 4.1 and everything crashed. I am getting the exception:
com.softwareag.tamino.db.API.invocation.TInvocationRetryHandlerException, tag: $Name: JavaTaminoAPI_2_1_0
39 $) stacktrace:
Nested Exception (com.softwareag.tamino.db.API.invocation.TInvocationRequestNotW
ritableException, tag: $Name: JavaTaminoAPI_2_1_0_39 $) stacktrace:
Nested Exception (java.lang.NullPointerException, tag: $Name: JavaTaminoAPI_2_1

0_39 $) stacktrace:
java.lang.NullPointerException
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.writeRawWithP
redefinedEntities(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.access$1600(U
nknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter$TTextNodeWrit
er.write(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.writeNode(Unk
nown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.writeNodeList
(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.writeChildNod
es(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.access$1200(U
nknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter$TElementNodeW
riter.write(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.writeNode(Unk
nown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.writeNodeList
(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.writeChildNod
es(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.access$1200(U
nknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter$TElementNodeW
riter.write(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.writeNode(Unk
nown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.writeNodeList
(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.writeChildNod
es(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter.access$1200(U
nknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMWriter$TElementNodeW
riter.write(Unknown Source)

I am using Weblogic 7.0 SP2. Any suggestions?


Thanks in advance,

– Juan

What do you mean with “I updated the classes on my application when installed Tamino 4.1 and everything crashed.”?

Did you exchange the API .jar file?
Did you recompile?
Or what else did you do?

I found the problem.
My node had an internal node with the value of “null”, say:

null


Apparently the TDOMWriter class uses JAXB or some sort of serialization that makes a value of null become a null pointer, therefore the exception.
I changed the node to be empty and it all worked.

To answer your questions: I updated my application to include the new version of the Tamino4JAPI.jar, recompiled the entire app. and updated Xerces and Xalan to be in synch. with the versions on the API… thought that was the problem, but it isn’t. Try inserting a node in Tamino where the value of an internal node is null.

Thanks!