IWAB0014E Apache CXF 2.X发生意外异常

时间:2017-02-01 10:53:56

标签: java apache web-services

当我尝试创建Web服务时,它显示出错误。我使用Apache CXF 2.X来完成这项任务。

我试图贬低这个

  

Windows - >偏好设置 - >添加 - >添加了CXF 2.x

但问题并没有解决。

这是我的界面代码

@WebService
public interface ISubstraction {
 public int substract(int x, int y)
}

这是我的实施代码

@WebService(endpointInterface ="com.webservice.ISubstraction")
public class SubstractionImpl implements ISubstraction {
  @Override
  public int substract(int x, int y) {
     int z = x-y;
     return z;
 }

}

这是例外



IWAB0014E Unexpected exception occurred.
  The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
      org.jdom.IllegalNameException: The name "" is not legal for JDOM/XML namespaces: Namespace URIs must be non-null and non-empty Strings.
      at org.jdom.Namespace.getNamespace(Namespace.java:162)
      at org.eclipse.jst.ws.internal.cxf.core.utils.SpringUtils.createJAXWSEndpoint(SpringUtils.java:414)
      at org.eclipse.jst.ws.internal.cxf.creation.core.commands.Java2WSCommand.execute(Java2WSCommand.java:103)
      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:212)
      at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)
      at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
      at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
      at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:993)
      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:869)
      at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:419)
      at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:618)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
      at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
      at org.eclipse.jface.window.Window.open(Window.java:794)
      at org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard.run(DynamicPopupWizard.java:130)
      at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:247)
      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
      at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
      at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
      at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1519)




如果你有意,请给我答案。谢谢你

0 个答案:

没有答案