gpt4 book ai didi

java - 在 Eclipse 上运行基本字数统计程序时出错

转载 作者:行者123 更新时间:2023-12-02 22:04:43 27 4
gpt4 key购买 nike

让我告诉你,我是 hadoop 领域的初学者。所以,我指的是https://developer.yahoo.com/hadoop/tutorial/module3.html教程。我完成了所有设置并将所有代码复制到我的 eclipse map-reduce 项目中。就 wordcountmapper、wordcountreducer 和 wordcount.java 文件而言,没有显示错误。

现在,当我单击在 hadoop 上运行并在 VM 播放器上选择已设置的服务器并单击下一步时,之后没有任何 react 。相同的“使用选定的服务器页面在 hadoop 上运行”就像卡住了一样。进度信息面板的跨度非常短,因此无法检查它实际显示的内容。

但是,这是我每次完成所有这些步骤后在日志文件中得到的结果。请帮帮我。自最近两天以来,我一直在为此苦苦挣扎。就所需库而言,我已从 hadoop 安装路径添加了所有必需的 .jar 文件。

.log 文件内容 ---

!ENTRY org.eclipse.ui 4 0 2015-05-31 16:56:39.849
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ClassCastException: org.eclipse.swt.widgets.Table cannot be cast to org.eclipse.swt.widgets.TableColumn
at org.eclipse.swt.widgets.Table.getColumn(Table.java:766)
at org.eclipse.swt.widgets.Table.releaseChildren(Table.java:1532)
at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:840)
at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:120)
at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:501)
at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:932)
at org.eclipse.swt.widgets.Widget.release(Widget.java:816)
at org.eclipse.swt.widgets.Widget.dispose(Widget.java:445)
at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:282)
at org.eclipse.swt.widgets.Shell.dispose(Shell.java:566)
at org.eclipse.jface.window.Window.close(Window.java:330)
at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:971)
at org.eclipse.jface.dialogs.TrayDialog.close(TrayDialog.java:143)
at org.eclipse.jface.wizard.WizardDialog.hardClose(WizardDialog.java:797)
at org.eclipse.jface.wizard.WizardDialog.close(WizardDialog.java:427)
at org.eclipse.jface.wizard.WizardDialog.cancelPressed(WizardDialog.java:414)
at org.eclipse.jface.wizard.WizardDialog$1.widgetSelected(WizardDialog.java:293)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1006)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2413)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2164)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.apache.hadoop.eclipse.launch.HadoopApplicationLaunchShortcut.findLaunchConfiguration(HadoopApplicationLaunchShortcut.java:110)
at org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchShortcut.launch(JavaLaunchShortcut.java:109)
at org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchShortcut.searchAndLaunch(JavaLaunchShortcut.java:74)
at org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchShortcut.launch(JavaLaunchShortcut.java:227)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:429)
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:66)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1006)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2413)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2164)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)

最佳答案

该错误似乎与hadoop无关。我在该页面中也找不到对 SWT 表或列的任何引用。

您可以启动一个普通的 java 应用程序以查看它是否一切正常,然后从终端运行 wordcount ($HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples),以测试您的 hadoop 安装。之后你应该回到 eclipse 看看它是否一切正常(在 hadoop 中,从终端运行东西而不是直接从 eclipse 运行总是更少的问题)

关于java - 在 Eclipse 上运行基本字数统计程序时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30564221/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com