AnsweredAssumed Answered

mapreduce pragram unable to access hadoop lib

Question asked by hadoop23 on Nov 2, 2013
Latest reply on Nov 10, 2013 by hadoop23
Hi,

In my program ,I have
<code>

import java.io.*;
import org.apache.hadoop.*;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.util.PDFTextStripper;

location of hadoop lib is under repository whose path is :
**/home/munish/.m2/repository/org/apache/hadoop/hadoop-core/1.2.0**

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project PDFParserTest: Compilation failure: Compilation failure:
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[14,19] cannot find symbol
[ERROR] symbol  : class FSDataInputStream
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[16,3] cannot find symbol
[ERROR] symbol  : class Configuration
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[16,28] cannot find symbol
[ERROR] symbol  : class Configuration
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[17,25] cannot find symbol
[ERROR] symbol  : class Path
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[18,25] cannot find symbol
[ERROR] symbol  : class Path
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[19,3] java.io.FileSystem is not public in java.io; cannot be accessed from outside package
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[19,27] java.io.FileSystem is not public in java.io; cannot be accessed from outside package
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[21,4] cannot find symbol
[ERROR] symbol  : class Path
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[21,20] cannot find symbol
[ERROR] symbol  : class Path
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[27,4] cannot find symbol
[ERROR] symbol  : class FSDataInputStream
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[29,37] cannot find symbol
[ERROR] symbol  : variable file
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[29,53] operator + cannot be applied to file.lastIndexOf,int
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[30,8] cannot find symbol
[ERROR] symbol  : variable file
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[29,22] cannot find symbol
[ERROR] symbol  : variable file
[ERROR] location: class pdftest.PDFParserTest
[ERROR] /usr/local/pdftest/src/main/java/pdftest/PDFParserTest.java:[41,65] cannot find symbol
[ERROR] symbol  : constructor FileOutputStream(java.io.OutputStream)
[ERROR] location: class java.io.FileOutputStream
[ERROR] -> [Help 1]

</code>
Can you please answer which path to be given while importing package?
Thanks,

Outcomes