IWAB0014E发生意外异常

时间:2015-02-02 16:55:52

标签: apache web-services soap

我正在尝试使用eclipse创建一个简单的soap web服务应用程序,我遇到了这个错误。

我正在使用Tomcat v7.0服务器和eclipse开普勒。有没有人可以帮我解决这个例外?

IWAB0014E发生了意外的异常。

  java.lang.NullPointerException
  at org.eclipse.jst.ws.internal.creation.ui.extension.PreServiceDevelopCommand.execute(PreServiceDevelopCommand.java:143)
  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:1028)
  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:908)
  at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:428)
  at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:628)
  at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
  at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
  at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
  at org.eclipse.jface.window.Window.open(Window.java:802)
  at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:259)
  at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:279)
  at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
  at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
  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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
  at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
  at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
  at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
  at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
  at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
  at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
  at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
  at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:420)
  at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
  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:1057)
  at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
  at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
  at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
  at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
  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:354)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
  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:636)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

4 个答案:

答案 0 :(得分:1)

您的代码会在

处抛出NullPointerException
  

PreServiceDevelopCommand.java:143

NullPointerException表示您想使用未初始化的引用。最常见的情况是您要使用成员或调用未使用new运算符或工厂方法初始化的对象的方法。检查第143行发生错误的文件,看看那里可能是null

来自文档的官方说明:

  

当应用程序在某个情况下尝试使用null时抛出   对象是必需的。其中包括:

- Calling the instance method of a null object.
- Accessing or modifying the field of a null object.
- Taking the length of null as if it were an array.
- Accessing or modifying the slots of null as if it were an array.
- Throwing null as if it were a Throwable value.

答案 1 :(得分:1)

由于Axis2设置不当,这种情况正在发生。

步骤:

下载Axis2:Link - > http://ws.apache.org/axis2/download.cgi 在eclipse中指向Axis2运行时目录:菜单 - >窗口 - >偏好 - >网络服务 - > Axis2首选项

答案 2 :(得分:0)

尝试清理您尝试生成Web服务的pojo类。

清理课程并重新编译。

它对我有用。

答案 3 :(得分:0)

删除您已创建的客户端将解决问题。