Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

NPE when using the RTC Build Ant tasks

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?

1 vote


Accepted answer

Permanent link
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

1 vote

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 562
× 25

Question asked: May 24 '12, 3:55 p.m.

Question was seen: 4,638 times

Last updated: Jun 04 '12, 9:37 a.m.

Confirmation Cancel Confirm