Generating a Web Service fails with NullPointerException at platformUtils.getPlatformURL

Technote (troubleshooting)


Problem(Abstract)

Generating a Web Service Java Bean Skeleton fails with error java.lang.NullPointerException
at com.ibm.etools.webservice.was.consumption.util.PlatformUtils.getPlatformURL in IBM Rational Application Developer v6.0.1.2 InterimFix001.

Symptom

The following steps reproduce the problem:

  1. Create a Web Project

  2. Create a WSDL file inside the project

  3. Right-click on the WSDL file and select Web Services > Generate Java Bean Skeleton

  4. Fill in all the pages of the wizard and click Finish


Result: The following error is produced:

IWAB0014E Unexpected exception occurred.
 null
     java.lang.NullPointerException
     at com.ibm.etools.webservice.was.consumption.util.PlatformUtils.
getPlatformURL(Unknown Source)
     at com.ibm.etools.webservice.was.creation.ui.task.
DefaultsForWSDL2SkeletonTask.execute(Unknown Source)

Cause

The method:



com.ibm.etools.webservice.was.consumption.util.PlatformUtils.getPlatformURL


can be used - among other tasks - to calculate the Java Source Folder of the Web Module.

If the Java Source Folder does not physically exist, such an error will occur. This problem can happen if you import the project from a Source Code Management System.

The Source Folder name is referenced by the .classpath file contained in the project. If there are no source files when the project is first shared in the Source Code Management system, it is possible that the source folder will not be created when importing the project into Rational Application Developer.


Diagnosing the problem

Follow these steps to diagnose the problem:

  1. Right click on the web project

  2. Select Properties > Java Build Path > Source

  3. Make a note of the name of the source folder(s) listed in box Source Folders on the build path

  4. Look at the file system with the Windows Explorer

  5. Verify that all the source folders effectively exists

Resolving the problem

SOLUTION

  1. Create any the source folders that do not exist in the Microsoft Windows Explorer (Make sure to respect the capitalization of the folder names as they appear in the Java Build Path dialog)

  2. Click on the Web Project in the Package Explorer or Project Explorer in Rational Application Developer, and press F5 to refresh the project structure

  3. Generate the Web Service again

Cross reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce Developer Professional Edition Customization / Application Development Windows 6.0 Developer Professional Edition

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Application Developer for WebSphere Software
Web Services Development

Software version:

6.0, 6.0.0.1, 6.0.1, 6.0.1.1, 6.0.1.2

Operating system(s):

Windows

Reference #:

1622945

Modified date:

2013-03-21

Translate my page

Machine Translation

Content navigation