IBM Support

Compilation error with duplicate methods when using the JAX-RS 2.0 wadl2java command-line tool

Troubleshooting


Problem

A duplicate method error is displayed when compliling the java artifacts for JAX-RS 2.0 web service applications which is generated by the wadl2java tool.

Symptom

The wadl2java tool that generates Java artifacts has the compilation error caused by the duplicate method error.

Cause

The JAX-RS 2.0 wadl2java command-line tool is used to generate java artifacts using a Web Application Description Language (WADL) file that is generated by the JAX-RS 2.0 run time.
The following code snippet shows an example of the wadl2java command that could cause this:
wadl2java -p package-name-d output-directory -impl -verbose wadlFile
For more information on using the wadl2java tool, see http://www-01.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/rwlp_command_wadl.html.

Resolving The Problem

Rename the method that causes the duplicate error.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Web Services (for example: SOAP or UDDI or WSGW or WSIF)","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF014","label":"iOS"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"},{"code":"PF013","label":"Inspur K-UX"}],"Version":"8.5.5.6","Edition":"Liberty","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21959528