It's all about the answers!

Ask a question

NPE when using the RTC Build Ant tasks


Spencer Murata (2.3k115970) | asked May 24 '12, 3:55 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Jun 04 '12, 9:37 a.m.
When using the org.apache.axis2.wsdl.WSDL2Java ant task in the same script as the RTC Build ant tasks, the RTC Build Ant tasks after the execution of the WSDL2Java ant task causes intermittent Null Pointer Exceptions. Why does this happen?

Accepted answer


permanent link
Spencer Murata (2.3k115970) | answered May 24 '12, 3:59 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
IBM does not control or support WSDL2Java Ant task, but it appears to reset the JVM as part of the task. This disrupts the RTC Build Ant tasks as they require the Jazz platform to be loaded prior to the task executing. The initialization happens automatically as part of the ant task, but the WSDL2Java does something to the JVM after it executes that causes that initialization to get zapped. To workaround the problem, spawn the WSDL2Java task in its own JVM via the java Ant task with the attribute fork set to "true", like so:
<java>
This will keep the platform initialization safe from whatever WSDL2Java does. If there are other Ant tasks out there that change the JVM, the same approach could be taken.

When using the org.apache.axis2.wsdl.WSDL2Java ant task in the same script as the RTC Build ant tasks, the RTC Build Ant tasks after the execution of the WSDL2Java ant task causes intermittent Null Pointer Exceptions. Why does this happen?
Spencer Murata selected this answer as the correct answer

Your answer


Register or to post your answer.