IBM Support

"Failed to localize" error messages might occur when using web service and client wizards for JAX-WS scenarios

Technote (troubleshooting)


Problem(Abstract)

If you create a web service or client that has input that causes errors in the underlying JAX-WS tools (wsgen, wsimport, and xjc), then an error message containing the string "failed to localize" might occur. However, it might be difficult to determine the underlying problem from the remainder of the error message details; the error message does not clearly state the cause of the problem.

Symptom

An error message from the web service or client wizard containing "failed to localize."

Cause

The wsgen, wsimport and xjc tools are not running correctly within the workbench.

Diagnosing the problem

In the following example, a user attempts to create a JAX-WS Web service from an existing Java bean, and the bean specifies an endpoint interface. In this case, the bean does not implement all methods of the endpoint interface, and therefore an error occurs.

The following error message occurs (note the "failed to localize" strings):

Errors occurred during wsgen.
Errors occurred during wsgen.
[failed to localize] wscompile.error([failed to localize] wscompile.compilationFailed())

Note: ap round: 1
Problem encountered during annotation processing;
see stacktrace below for more information.
com.sun.tools.internal.ws.processor.modeler.ModelerException: [failed to localize] modeler.nestedModelError(com.sun.xml.internal.ws.util.localization.LocalizableMessage@2bff2bff)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.onError(WebServiceAP.java:233)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.classImplementsSEI(WebServiceVisitor.java:534)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.isLegalImplementation(WebServiceVisitor.java:507)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.shouldProcessWebService(WebServiceVisitor.java:318)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:121)
at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:107)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:323)
at com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:264)
at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:83)
at com.sun.tools.apt.comp.Apt.main(Apt.java:466)
at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:269)
at com.sun.tools.apt.main.Main.compile(Main.java:1113)
at com.sun.tools.apt.main.Main.compile(Main.java:975)
at com.sun.tools.apt.Main.processing(Main.java:106)
at com.sun.tools.apt.Main.process(Main.java:96)
at com.sun.tools.apt.Main.process(Main.java:78)
at com.sun.tools.internal.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:209)
at com.sun.tools.internal.ws.wscompile.WsgenTool.run(WsgenTool.java:136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at com.ibm.ast.ws.jaxws.emitter.jdk6.command.WsGenCommand.execute(WsGenCommand.java:93)
at com.ibm.ast.ws.jaxws.emitter.command.WsGenCommand.execute(WsGenCommand.java:64)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:359)
at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:254)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:264)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:91)
at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.getNextPage(WizardPageManager.java:154)
at org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizardPage.getNextPage(SimpleWizardPage.java:136)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:813)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard.run(DynamicPopupWizard.java:130)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2357)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2209)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511)
at org.eclipse.equinox.launcher.Main.run(Main.java:1284)
at org.eclipse.equinox.launcher.Main.main(Main.java:1260)

Resolving the problem

There is no workaround for the unclear error message problem.


However, many of the problems that caused the "failed to localize" error message might be caught by validators during development time (such as the JAX-WS annotations processor for Java-first scenarios, and the WSDL and XSD validators for WSDL-first scenarios),

In some cases, the command line command is also written to the .log file. If you run the command in a command prompt, you might see the error message directly.

Cross Reference information
Segment Product Component Platform Version Edition
Software Development Rational Application Developer for WebSphere Software Web Tooling Windows, Linux 7.5, 7.5.1, 7.5.2, 7.5.3

Document information

More support for: Rational Application Developer for WebSphere Software
Web Services Development

Software version: 7.5, 7.5.1, 7.5.2, 7.5.3

Operating system(s): Linux, Windows

Reference #: 1389891

Modified date: 24 August 2010