IBM Support

Generating a Liberty JAX-WS 2.2 web service client in a workbench started with JRE 6 fails with a wsimport error when using WebSphere Developer Tools for Eclipse

Troubleshooting


Problem

In a WebSphere Developer Tools for Eclipse workbench started with JRE 6, a Liberty JAX-WS 2.2 web service client cannot be generated for a service with a method that implements a throwable exception (java.lang.Exception).

Symptom

The web service client is not generated. The following message is displayed: "Errors occurred during wsimport."

In the stack trace, the following error message is logged:
Caused by: java.lang.NoSuchMethodException: javax.xml.bind.annotation.XmlElementRef.required()

Cause

The required method, javax.xml.bind.annotation.XmlElementRef.required(), that is needed by the Liberty runtime to generate the web service client is not included in the JRE.

Environment

This problem could also occur if Rational Application Developer is installed into an existing Eclipse IDE that is configured to use JRE 6.

Resolving The Problem

Generate the web service client by using JAX-WS 2.1, or change the JRE that is used to launch the workbench to Java 7.

This solution also applies to Rational Application Developer that is installed on an existing Eclipse IDE. Use the Eclipse IDE with the JVM (Java 7) that is provided by Rational Application Developer.

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Developer Toolkit for Eclipse","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21639356