gpt4 book ai didi

java - 无法创建 Hadoop Eclipse 服务器

转载 作者:可可西里 更新时间:2023-11-01 15:38:43 26 4
gpt4 key购买 nike

我在 Linux 12.1 上安装了 hadoop 2.2.0我成功创建了一个 hadoop 插件 jar 文件并使用 this 插件复制到 eclipse 插件文件夹中。当我尝试在 eclipse 中创建 dfs 服务器时出现以下错误。我尝试了不同的 Guava 版本,但我仍然有同样的错误。

有人可以帮我解决这个问题吗?

谢谢。

java.lang.NoClassDefFoundError: com/google/common/collect/Interners
at org.apache.hadoop.util.StringInterner.(StringInterner.java:48)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2108)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2001)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1918)
at org.apache.hadoop.conf.Configuration.get(Configuration.java:721)
at org.apache.hadoop.eclipse.server.HadoopServer.addPluginConfigDefaultProperties(HadoopServer.java:450)
at org.apache.hadoop.eclipse.server.HadoopServer.(HadoopServer.java:229)
at org.apache.hadoop.eclipse.servers.HadoopLocationWizard.(HadoopLocationWizard.java:88)
at org.apache.hadoop.eclipse.actions.NewLocationAction$1.(NewLocationAction.java:41)
at org.apache.hadoop.eclipse.actions.NewLocationAction.run(NewLocationAction.java:40)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:588)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:505)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:456)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4421)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3771)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3391)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1122)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1006)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:146)
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:565)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Interners cannot be found by osgi.identity; osgi.identity="org.apache.hadoop.eclipse"; type="osgi.bundle"; version:Version="0.18.0"; singleton:="true"
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:411)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:331)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:323)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 40 more

最佳答案

缺少指向您正在使用的插件的链接。所以我所能做的就是诊断症状:

堆栈跟踪的相关部分是:

Caused by: 
java.lang.ClassNotFoundException: com.google.common.collect.Interners cannot be found
by osgi.identity; osgi.identity="org.apache.hadoop.eclipse"; type="osgi.bundle";
version:Version="0.18.0"; singleton:="true"

因此您的类路径中缺少一个 jar。 Maven Central 有一个包含此类的 jar 列表:

希望这对您有所帮助。

关于java - 无法创建 Hadoop Eclipse 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20779869/

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