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:
- Create a Web Project
- Create a WSDL file inside the project
- Right-click on the WSDL file and select Web Services > Generate Java Bean Skeleton
- 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:
- Right click on the web project
- Select Properties > Java Build Path > Source
- Make a note of the name of the source folder(s) listed in box Source Folders on the build path
- Look at the file system with the Windows Explorer
- Verify that all the source folders effectively exists
Resolving the problem
SOLUTION
- 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)
- Click on the Web Project in the Package Explorer or Project Explorer in Rational Application Developer, and press
F5to refresh the project structure
- Generate the Web Service again
| Segment | Product | Component | Platform | Version | Edition |
|---|---|---|---|---|---|
| Commerce | WebSphere Commerce Developer Professional Edition | Customization / Application Development | Windows | 6.0 | Developer Professional Edition |
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.