jeudi 23 juin 2016
Terminal javac does not see jar files and symbol variables
I created a bulk insert. The application will work in terminal. It parses the documents in specified folder and stores them in both Solr and HBase.
I will write folder name on terminal java bulk //home//linux//pdfFolder. Thats why I am using args[0] in File folder = new File(args[0]);.
Bulk.java works without no error on eclipse Java application compiler, but when I try to compile it on terminal javac /home/linux/workspace/SearchEngine/app/controllers//Bulk.java. it shows errors even I do try to compile it in its path linux@linux:~/workspace/SearchEngine/app/controllers$
What should I do in order to run Bulk.java in terminal?
Error list:
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:20: error: package org.apache.commons.io does not exist
import org.apache.commons.io.FileUtils;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:21: error: package org.apache.commons.io does not exist
import org.apache.commons.io.IOUtils;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:22: error: package org.apache.hadoop.conf does not exist
import org.apache.hadoop.conf.Configuration;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:23: error: package org.apache.hadoop.hbase does not exist
import org.apache.hadoop.hbase.HBaseConfiguration;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:24: error: package org.apache.hadoop.hbase.client does not exist
import org.apache.hadoop.hbase.client.HTable;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:25: error: package org.apache.hadoop.hbase.client does not exist
import org.apache.hadoop.hbase.client.Put;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:26: error: package org.apache.hadoop.hbase.util does not exist
import org.apache.hadoop.hbase.util.Bytes;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:27: error: package org.apache.pdfbox.pdmodel does not exist
import org.apache.pdfbox.pdmodel.PDDocument;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:28: error: package org.apache.pdfbox.pdmodel does not exist
import org.apache.pdfbox.pdmodel.PDDocumentInformation;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:29: error: package org.apache.pdfbox.rendering does not exist
import org.apache.pdfbox.rendering.PDFRenderer;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:30: error: package org.apache.pdfbox.text does not exist
import org.apache.pdfbox.text.PDFTextStripper;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:31: error: package org.apache.solr.client.solrj does not exist
import org.apache.solr.client.solrj.SolrServerException;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:32: error: package org.apache.solr.client.solrj.impl does not exist
import org.apache.solr.client.solrj.impl.HttpSolrClient;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:33: error: package org.apache.solr.common does not exist
import org.apache.solr.common.SolrInputDocument;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:35: error: package models does not exist
import models.Index;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:38: error: package play does not exist
import play.*;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:39: error: package play does not exist
import play.Play;
^
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:45: error: cannot find symbol
static HttpSolrClient solr = null;
^
symbol: class HttpSolrClient
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:46: error: cannot find symbol
static Configuration config = HBaseConfiguration.create();
^
symbol: class Configuration
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:62: error: cannot find symbol
public static void main(String[] args) throws IOException, SolrServerException {
^
symbol: class SolrServerException
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:46: error: cannot find symbol
static Configuration config = HBaseConfiguration.create();
^
symbol: variable HBaseConfiguration
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:64: error: cannot find symbol
List<String> lines = FileUtils.readLines(new File(namePath), "utf-8");
^
symbol: variable FileUtils
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:67: error: cannot find symbol
Index indexed = new Index();
^
symbol: class Index
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:67: error: cannot find symbol
Index indexed = new Index();
^
symbol: class Index
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:72: error: cannot find symbol
HTable hTable = new HTable(config, "books");
^
symbol: class HTable
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:72: error: cannot find symbol
HTable hTable = new HTable(config, "books");
^
symbol: class HTable
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:80: error: cannot find symbol
FileUtils obj = new FileUtils();
^
symbol: class FileUtils
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:80: error: cannot find symbol
FileUtils obj = new FileUtils();
^
symbol: class FileUtils
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:82: error: cannot find symbol
PDDocument document = null;
^
symbol: class PDDocument
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:83: error: cannot find symbol
PDFTextStripper pdfstripper = null;
^
symbol: class PDFTextStripper
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:84: error: cannot find symbol
PDDocumentInformation info = null;
^
symbol: class PDDocumentInformation
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:87: error: cannot find symbol
document = PDDocument.load(pdf, "");
^
symbol: variable PDDocument
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:88: error: cannot find symbol
pdfstripper = new PDFTextStripper();
^
symbol: class PDFTextStripper
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:121: error: cannot find symbol
solr = new HttpSolrClient("http://localhost:8983/solr/senior");
^
symbol: class HttpSolrClient
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:122: error: cannot find symbol
SolrInputDocument doc = new SolrInputDocument();
^
symbol: class SolrInputDocument
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:122: error: cannot find symbol
SolrInputDocument doc = new SolrInputDocument();
^
symbol: class SolrInputDocument
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:145: error: cannot find symbol
Put p = new Put(Bytes.toBytes(indexed.getRandom()));
^
symbol: class Put
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:145: error: cannot find symbol
Put p = new Put(Bytes.toBytes(indexed.getRandom()));
^
symbol: class Put
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:145: error: cannot find symbol
Put p = new Put(Bytes.toBytes(indexed.getRandom()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:147: error: cannot find symbol
PDFRenderer pdfRenderer = new PDFRenderer(document);
^
symbol: class PDFRenderer
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:147: error: cannot find symbol
PDFRenderer pdfRenderer = new PDFRenderer(document);
^
symbol: class PDFRenderer
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:167: error: cannot find symbol
p.add(Bytes.toBytes("content"), Bytes.toBytes("raw"), IOUtils.toByteArray(fin));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:167: error: cannot find symbol
p.add(Bytes.toBytes("content"), Bytes.toBytes("raw"), IOUtils.toByteArray(fin));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:167: error: cannot find symbol
p.add(Bytes.toBytes("content"), Bytes.toBytes("raw"), IOUtils.toByteArray(fin));
^
symbol: variable IOUtils
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:169: error: cannot find symbol
p.add(Bytes.toBytes("picture"), Bytes.toBytes("raw"), byteImage);
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:169: error: cannot find symbol
p.add(Bytes.toBytes("picture"), Bytes.toBytes("raw"), byteImage);
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:171: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("fileName"), Bytes.toBytes(fileName));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:171: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("fileName"), Bytes.toBytes(fileName));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:171: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("fileName"), Bytes.toBytes(fileName));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:172: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("author"), Bytes.toBytes(indexed.getAuthor()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:172: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("author"), Bytes.toBytes(indexed.getAuthor()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:172: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("author"), Bytes.toBytes(indexed.getAuthor()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:173: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("content"), Bytes.toBytes(allTogether.toString()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:173: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("content"), Bytes.toBytes(allTogether.toString()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:173: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("content"), Bytes.toBytes(allTogether.toString()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:174: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("nPage"), Bytes.toBytes(indexed.getnPage()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:174: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("nPage"), Bytes.toBytes(indexed.getnPage()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:174: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("nPage"), Bytes.toBytes(indexed.getnPage()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:175: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("title"), Bytes.toBytes(indexed.getTitle()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:175: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("title"), Bytes.toBytes(indexed.getTitle()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:175: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("title"), Bytes.toBytes(indexed.getTitle()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:176: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("creationDate"), Bytes.toBytes(indexed.getCreationDate().toString()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:176: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("creationDate"), Bytes.toBytes(indexed.getCreationDate().toString()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:176: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("creationDate"), Bytes.toBytes(indexed.getCreationDate().toString()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:177: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("producer"), Bytes.toBytes(indexed.getProducer()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:177: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("producer"), Bytes.toBytes(indexed.getProducer()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:177: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("producer"), Bytes.toBytes(indexed.getProducer()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:178: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("fileName"), Bytes.toBytes(indexed.getFileName()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:178: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("fileName"), Bytes.toBytes(indexed.getFileName()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:178: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("fileName"), Bytes.toBytes(indexed.getFileName()));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:179: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("downloadCounter"), Bytes.toBytes(0L));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:179: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("downloadCounter"), Bytes.toBytes(0L));
^
symbol: variable Bytes
location: class Bulk
/home/linux/workspace/SearchEngine/app/controllers/Bulk.java:179: error: cannot find symbol
p.add(Bytes.toBytes("book"), Bytes.toBytes("downloadCounter"), Bytes.toBytes(0L));
^
symbol: variable Bytes
location: class Bulk
73 errors
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire