Hadoop-1.2.1 plug-in with Eclipse indigo (3.7.2) Ubuntu 12.04 error

跟風遠走 提交于 2019-12-13 04:33:23

问题


Newbie, so please go slow. Tried to install eclipse plugin as explained here

https://docs.google.com/document/d/1yuZ4IjlquPkmC1zXtCeL4GUNKT1uY1xnS_SCBJHps6A/edit?pli=1

Ended at getting the following error. At my wit's end. Can someone help please.

   Buildfile: /usr/local/hadoop/src/contrib/eclipse-plugin/build.xml
    check-contrib:
    init:
         [echo] contrib: eclipse-plugin
    init-contrib:
    ivy-download:
          [get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.1.0/ivy-2.1.0.jar
          [get] To: /usr/local/hadoop/ivy/ivy-2.1.0.jar
          [get] Not modified - so not downloaded
    ivy-probe-antlib:
    ivy-init-antlib:
    ivy-init:
    [ivy:configure] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
    [ivy:configure] :: loading settings :: file = /usr/local/hadoop/ivy/ivysettings.xml
    ivy-resolve-common:
    ivy-retrieve-common:
    [ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
    [ivy:cachepath] :: loading settings :: file = /usr/local/hadoop/ivy/ivysettings.xml
    compile:
         [echo] contrib: eclipse-plugin

        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/build.xml:74: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
        [javac] Compiling 45 source files to /usr/local/hadoop/build/contrib/eclipse-plugin/classes
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/Activator.java:22: error: package org.eclipse.ui.plugin does not exist
        [javac] import org.eclipse.ui.plugin.AbstractUIPlugin;
        [javac]                             ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/Activator.java:23: error: package org.osgi.framework does not exist
        [javac] import org.osgi.framework.BundleContext;
        [javac]                          ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/Activator.java:28: error: cannot find symbol
        [javac] public class Activator extends AbstractUIPlugin {
        [javac]                                ^
        [javac]   symbol: class AbstractUIPlugin
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/Activator.java:56: error: cannot find symbol
        [javac]   public void start(BundleContext context) throws Exception {
        [javac]                     ^
        [javac]   symbol:   class BundleContext
        [javac]   location: class Activator
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/Activator.java:62: error: cannot find symbol
        [javac]   public void stop(BundleContext context) throws Exception {
        [javac]                    ^
        [javac]   symbol:   class BundleContext
        [javac]   location: class Activator
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ErrorMessageDialog.java:21: error: package org.eclipse.jface.dialogs does not exist
        [javac] import org.eclipse.jface.dialogs.MessageDialog;
        [javac]                                 ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ErrorMessageDialog.java:22: error: package org.eclipse.swt.widgets does not exist
        [javac] import org.eclipse.swt.widgets.Display;
        [javac]                               ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/HadoopPerspectiveFactory.java:22: error: package org.eclipse.jdt.ui does not exist
        [javac] import org.eclipse.jdt.ui.JavaUI;
        [javac]                          ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/HadoopPerspectiveFactory.java:23: error: cannot find symbol
        [javac] import org.eclipse.ui.IFolderLayout;
        [javac]                      ^
        [javac]   symbol:   class IFolderLayout
        [javac]   location: package org.eclipse.ui
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/HadoopPerspectiveFactory.java:24: error: cannot find symbol
        [javac] import org.eclipse.ui.IPageLayout;
        [javac]                      ^
        [javac]   symbol:   class IPageLayout
        [javac]   location: package org.eclipse.ui
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/HadoopPerspectiveFactory.java:25: error: cannot find symbol
        [javac] import org.eclipse.ui.IPerspectiveFactory;
        [javac]                      ^
        [javac]   symbol:   class IPerspectiveFactory
        [javac]   location: package org.eclipse.ui
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/HadoopPerspectiveFactory.java:34: error: cannot find symbol
        [javac] public class HadoopPerspectiveFactory implements IPerspectiveFactory {
        [javac]                                                  ^
        [javac]   symbol: class IPerspectiveFactory
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/HadoopPerspectiveFactory.java:37: error: cannot find symbol
        [javac]   public void createInitialLayout(IPageLayout layout) {
        [javac]                                   ^
        [javac]   symbol:   class IPageLayout
        [javac]   location: class HadoopPerspectiveFactory
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:25: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.FileLocator;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:26: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.Path;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:27: error: package org.eclipse.jface.resource does not exist
        [javac] import org.eclipse.jface.resource.ImageDescriptor;
        [javac]                                  ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:28: error: package org.eclipse.swt.graphics does not exist
        [javac] import org.eclipse.swt.graphics.Image;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:29: error: cannot find symbol
        [javac] import org.eclipse.ui.ISharedImages;
        [javac]                      ^
        [javac]   symbol:   class ISharedImages
        [javac]   location: package org.eclipse.ui
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:30: error: cannot find symbol
        [javac] import org.eclipse.ui.PlatformUI;
        [javac]                      ^
        [javac]   symbol:   class PlatformUI
        [javac]   location: package org.eclipse.ui
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:31: error: package org.eclipse.ui.plugin does not exist
        [javac] import org.eclipse.ui.plugin.AbstractUIPlugin;
        [javac]                             ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:32: error: package org.osgi.framework does not exist
        [javac] import org.osgi.framework.Bundle;
        [javac]                          ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:39: error: cannot find symbol
        [javac]   private final Bundle bundle = Activator.getDefault().getBundle();
        [javac]                 ^
        [javac]   symbol:   class Bundle
        [javac]   location: class ImageLibrary
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:46: error: cannot find symbol
        [javac]   private ISharedImages sharedImages =
        [javac]           ^
        [javac]   symbol:   class ISharedImages
        [javac]   location: class ImageLibrary
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:60: error: cannot find symbol
        [javac]   public static ImageDescriptor get(String name) {
        [javac]                 ^
        [javac]   symbol:   class ImageDescriptor
        [javac]   location: class ImageLibrary
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:70: error: cannot find symbol
        [javac]   public static Image getImage(String name) {
        [javac]                 ^
        [javac]   symbol:   class Image
        [javac]   location: class ImageLibrary
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:92: error: cannot find symbol
        [javac]   private Map<String, ImageDescriptor> descMap =
        [javac]                       ^
        [javac]   symbol:   class ImageDescriptor
        [javac]   location: class ImageLibrary
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:95: error: cannot find symbol
        [javac]   private Map<String, Image> imageMap = new HashMap<String, Image>();
        [javac]                       ^
        [javac]   symbol:   class Image
        [javac]   location: class ImageLibrary
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:144: error: cannot find symbol
        [javac]   private ImageDescriptor getImageDescriptorByName(String name) {
        [javac]           ^
        [javac]   symbol:   class ImageDescriptor
        [javac]   location: class ImageLibrary
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:154: error: cannot find symbol
        [javac]   private Image getImageByName(String name) {
        [javac]           ^
        [javac]   symbol:   class Image
        [javac]   location: class ImageLibrary
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java:164: error: cannot find symbol
        [javac]   private ImageDescriptor getSharedByName(String name) {
        [javac]           ^
        [javac]   symbol:   class ImageDescriptor
        [javac]   location: class ImageLibrary
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:29: error: package org.eclipse.core.resources does not exist
        [javac] import org.eclipse.core.resources.IProject;
        [javac]                                  ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:30: error: package org.eclipse.core.resources does not exist
        [javac] import org.eclipse.core.resources.IProjectNature;
        [javac]                                  ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:31: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.CoreException;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:32: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.NullProgressMonitor;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:33: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.Path;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:34: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.QualifiedName;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:35: error: package org.eclipse.jdt.core does not exist
        [javac] import org.eclipse.jdt.core.IClasspathEntry;
        [javac]                            ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:36: error: package org.eclipse.jdt.core does not exist
        [javac] import org.eclipse.jdt.core.IJavaProject;
        [javac]                            ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:37: error: package org.eclipse.jdt.core does not exist
        [javac] import org.eclipse.jdt.core.JavaCore;
        [javac]                            ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:44: error: cannot find symbol
        [javac] public class MapReduceNature implements IProjectNature {
        [javac]                                         ^
        [javac]   symbol: class IProjectNature
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:48: error: cannot find symbol
        [javac]   private IProject project;
        [javac]           ^
        [javac]   symbol:   class IProject
        [javac]   location: class MapReduceNature
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:57: error: cannot find symbol
        [javac]   public void configure() throws CoreException {
        [javac]                                  ^
        [javac]   symbol:   class CoreException
        [javac]   location: class MapReduceNature
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:131: error: cannot find symbol
        [javac]   public void deconfigure() throws CoreException {
        [javac]                                    ^
        [javac]   symbol:   class CoreException
        [javac]   location: class MapReduceNature
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:139: error: cannot find symbol
        [javac]   public IProject getProject() {
        [javac]          ^
        [javac]   symbol:   class IProject
        [javac]   location: class MapReduceNature
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/MapReduceNature.java:148: error: cannot find symbol
        [javac]   public void setProject(IProject project) {
        [javac]                          ^
        [javac]   symbol:   class IProject
        [javac]   location: class MapReduceNature
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:21: error: package org.eclipse.core.resources does not exist
        [javac] import org.eclipse.core.resources.IFile;
        [javac]                                  ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:22: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.CoreException;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:23: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.IProgressMonitor;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:24: error: package org.eclipse.jdt.core does not exist
        [javac] import org.eclipse.jdt.core.IJavaElement;
        [javac]                            ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:25: error: package org.eclipse.jdt.internal.ui.wizards does not exist
        [javac] import org.eclipse.jdt.internal.ui.wizards.NewElementWizard;
        [javac]                                           ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:26: error: package org.eclipse.jface.operation does not exist
        [javac] import org.eclipse.jface.operation.IRunnableWithProgress;
        [javac]                                   ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:27: error: package org.eclipse.jface.viewers does not exist
        [javac] import org.eclipse.jface.viewers.IStructuredSelection;
        [javac]                                 ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:28: error: cannot find symbol
        [javac] import org.eclipse.ui.INewWizard;
        [javac]                      ^
        [javac]   symbol:   class INewWizard
        [javac]   location: package org.eclipse.ui
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:29: error: cannot find symbol
        [javac] import org.eclipse.ui.IWorkbench;
        [javac]                      ^
        [javac]   symbol:   class IWorkbench
        [javac]   location: package org.eclipse.ui
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:36: error: cannot find symbol
        [javac] public class NewDriverWizard extends NewElementWizard implements INewWizard,
        [javac]                                      ^
        [javac]   symbol: class NewElementWizard
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:36: error: cannot find symbol
        [javac] public class NewDriverWizard extends NewElementWizard implements INewWizard,
        [javac]                                                                  ^
        [javac]   symbol: class INewWizard
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:37: error: cannot find symbol
        [javac]     IRunnableWithProgress {
        [javac]     ^
        [javac]   symbol: class IRunnableWithProgress
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:22: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.CoreException;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:23: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.IProgressMonitor;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:24: error: package org.eclipse.core.runtime does not exist
        [javac] import org.eclipse.core.runtime.IStatus;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:25: error: package org.eclipse.jdt.core does not exist
        [javac] import org.eclipse.jdt.core.IType;
        [javac]                            ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:26: error: package org.eclipse.jdt.core does not exist
        [javac] import org.eclipse.jdt.core.JavaModelException;
        [javac]                            ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:27: error: package org.eclipse.jdt.core.search does not exist
        [javac] import org.eclipse.jdt.core.search.SearchEngine;
        [javac]                                   ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:28: error: package org.eclipse.jdt.ui does not exist
        [javac] import org.eclipse.jdt.ui.IJavaElementSearchConstants;
        [javac]                          ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:29: error: package org.eclipse.jdt.ui does not exist
        [javac] import org.eclipse.jdt.ui.JavaUI;
        [javac]                          ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:30: error: package org.eclipse.jdt.ui.wizards does not exist
        [javac] import org.eclipse.jdt.ui.wizards.NewTypeWizardPage;
        [javac]                                  ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:31: error: package org.eclipse.jface.dialogs does not exist
        [javac] import org.eclipse.jface.dialogs.ProgressMonitorDialog;
        [javac]                                 ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:32: error: package org.eclipse.jface.viewers does not exist
        [javac] import org.eclipse.jface.viewers.IStructuredSelection;
        [javac]                                 ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:33: error: package org.eclipse.jface.window does not exist
        [javac] import org.eclipse.jface.window.Window;
        [javac]                                ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:34: error: package org.eclipse.swt does not exist
        [javac] import org.eclipse.swt.SWT;
        [javac]                       ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:35: error: package org.eclipse.swt.layout does not exist
        [javac] import org.eclipse.swt.layout.GridData;
        [javac]                              ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:36: error: package org.eclipse.swt.layout does not exist
        [javac] import org.eclipse.swt.layout.GridLayout;
        [javac]                              ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:37: error: package org.eclipse.swt.widgets does not exist
        [javac] import org.eclipse.swt.widgets.Button;
        [javac]                               ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:38: error: package org.eclipse.swt.widgets does not exist
        [javac] import org.eclipse.swt.widgets.Composite;
        [javac]                               ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:39: error: package org.eclipse.swt.widgets does not exist
        [javac] import org.eclipse.swt.widgets.Event;
        [javac]                               ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:40: error: package org.eclipse.swt.widgets does not exist
        [javac] import org.eclipse.swt.widgets.Label;
        [javac]                               ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:41: error: package org.eclipse.swt.widgets does not exist
        [javac] import org.eclipse.swt.widgets.Listener;
        [javac]                               ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:42: error: package org.eclipse.swt.widgets does not exist
        [javac] import org.eclipse.swt.widgets.Text;
        [javac]                               ^
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:43: error: cannot find symbol
        [javac] import org.eclipse.ui.dialogs.SelectionDialog;
        [javac]                              ^
        [javac]   symbol:   class SelectionDialog
        [javac]   location: package org.eclipse.ui.dialogs
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizardPage.java:50: error: cannot find symbol
        [javac] public class NewDriverWizardPage extends NewTypeWizardPage {
        [javac]                                          ^
        [javac]   symbol: class NewTypeWizardPage
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:44: error: cannot find symbol
        [javac]   public void run(IProgressMonitor monitor) {
        [javac]                   ^
        [javac]   symbol:   class IProgressMonitor
        [javac]   location: class NewDriverWizard
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:61: error: cannot find symbol
        [javac]   public void init(IWorkbench workbench, IStructuredSelection selection) {
        [javac]                    ^
        [javac]   symbol:   class IWorkbench
        [javac]   location: class NewDriverWizard
        [javac] /usr/local/hadoop/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/NewDriverWizard.java:61: error: cannot find symbol

. . .

    BUILD FAILED

/usr/local/hadoop/src/contrib/eclipse-plugin/build.xml:74: Compile failed; see the compiler error output for details.

Total time: 4 seconds

回答1:


I had some trouble with this as well. In order to build successfully, I had to include more Eclipse plugin directories. In my installation, Eclipse Indigo has at least 3 "plugins" directories: /usr/lib/eclipse/plugins; /usr/lib/eclipse/dropins/jdt/plugins; /usr/lib/eclipse/dropins/sdk/plugins.

The Hadoop plugin configuration file only considers the first directory, so you have to add the following code to build.xml (change the eclipse-sdk-jars):

<path id="eclipse-sdk-jars">
<fileset dir="${eclipse.home}/plugins/">
  <include name="org.eclipse.ui*.jar"/>
  <include name="org.eclipse.jdt*.jar"/>
  <include name="org.eclipse.core*.jar"/>
  <include name="org.eclipse.equinox*.jar"/>
  <include name="org.eclipse.debug*.jar"/>
  <include name="org.eclipse.osgi*.jar"/>
  <include name="org.eclipse.swt*.jar"/>
  <include name="org.eclipse.jface*.jar"/>

  <include name="org.eclipse.team.cvs.ssh2*.jar"/>
  <include name="com.jcraft.jsch*.jar"/>
</fileset>
<fileset dir ="${eclipse.home}/dropins/jdt/plugins/">
  <include name="org.eclipse.ui*.jar"/>
  <include name="org.eclipse.jdt*.jar"/>
  <include name="org.eclipse.core*.jar"/>
  <include name="org.eclipse.equinox*.jar"/>
  <include name="org.eclipse.debug*.jar"/>
  <include name="org.eclipse.osgi*.jar"/>
  <include name="org.eclipse.swt*.jar"/>
  <include name="org.eclipse.jface*.jar"/>
  <include name="org.eclipse.team.cvs.ssh2*.jar"/>
  <include name="com.jcraft.jsch*.jar"/>
</fileset>
<fileset dir ="${eclipse.home}/dropins/sdk/plugins/">
  <include name="org.eclipse.ui*.jar"/>
  <include name="org.eclipse.jdt*.jar"/>
  <include name="org.eclipse.core*.jar"/>
  <include name="org.eclipse.equinox*.jar"/>
  <include name="org.eclipse.debug*.jar"/>
  <include name="org.eclipse.osgi*.jar"/>
  <include name="org.eclipse.swt*.jar"/>
  <include name="org.eclipse.jface*.jar"/>
  <include name="org.eclipse.team.cvs.ssh2*.jar"/>
  <include name="com.jcraft.jsch*.jar"/>
</fileset>
</path>

This allowed me to build successfully, and create the needed jar file. However, even after adding it to the Eclipse plugins directory, there is no MapReduce perspective or project. So, if you're able to overcome this last hurdle let me know.



来源:https://stackoverflow.com/questions/18806784/hadoop-1-2-1-plug-in-with-eclipse-indigo-3-7-2-ubuntu-12-04-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!