nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Usama Tahir (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (NUTCH-2591) Can not import org.json.simple.JSONObject in Nutch 2.3.1
Date Fri, 01 Jun 2018 09:33:00 GMT

     [ https://issues.apache.org/jira/browse/NUTCH-2591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Usama Tahir updated NUTCH-2591:
-------------------------------
    Description: 
I am modifying Nutch 2.3.1 and integrating CLD2 language detector in *FetcherReducer.java*
class. I made a separate class name *LangInfo.java* in *org.apache.nutch.fetcher* package.

In this LangInfo.java class i tried to write import org.json.simple.JSONObject;

and org.json.simple.parser;

but when i build it using *ant runtime* command in Nutch directory it fails with error

 

*src/java/org/apache/nutch/fetcher/**LangInfo**.java:20: error: package org.json.simple.JSONObject
does not exist*

 

*src/java/org/apache/nutch/fetcher/**LangInfo**.java:21: error: package org.json.simple.parser
does not exist***

 

But when i open it in eclipse, eclipse does not shows error on this import. and if i go to
project properties > Libraries there i found *json-simple-1.1.0.jar.* it means this jar
file already exists. but why i am always getting errors due to this import?

i have attached two screenshots with this issue:

1- jar.png (this is eclipse screenshot showing json-simple-1.1.0.jar exists)

2- error.png (this is terminal build error log. when i run ant runtime command)

Kindly help me ASAP.

TIA.

 

  was:
I am modifying Nutch 2.3.1 and integrating CLD2 language detector in *FetcherReducer.java*
class. I made a separate class name *LangInfo.java* in *org.apache.nutch.fetcher* package.

In this LangInfo.java class i tried to write import org.json.simple.JSONObject;

and org.json.simple.parser;

but when i build it using *ant runtime* command in Nutch directory it fails with error

 

*src/java/org/apache/nutch/fetcher/**LangInfo**.java:20: error: package org.json.simple.JSONObject
does not exist*

 

*src/java/org/apache/nutch/fetcher/**LangInfo**.java:21: error: package org.json.simple.parser
does not exist***

 

But when i open it in eclipse, eclipse does not shows error on this import. and if i go to
project properties > Libraries there i found *json-simple-1.1.0.jar.* it means this jar
file already exists. but why i am always getting errors due to this import?

Kindly help me ASAP.

TIA.

 


> Can not import org.json.simple.JSONObject in Nutch 2.3.1
> --------------------------------------------------------
>
>                 Key: NUTCH-2591
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2591
>             Project: Nutch
>          Issue Type: Bug
>          Components: fetcher, parser, plugin
>    Affects Versions: 2.3.1
>         Environment: Operating System: Ubuntu 16.04
> Hadoop: 2.5.2
> Hbase: 0.98.8-hadoop2
>            Reporter: Usama Tahir
>            Priority: Major
>         Attachments: error.png, jar.png
>
>
> I am modifying Nutch 2.3.1 and integrating CLD2 language detector in *FetcherReducer.java*
class. I made a separate class name *LangInfo.java* in *org.apache.nutch.fetcher* package.
> In this LangInfo.java class i tried to write import org.json.simple.JSONObject;
> and org.json.simple.parser;
> but when i build it using *ant runtime* command in Nutch directory it fails with error
>  
> *src/java/org/apache/nutch/fetcher/**LangInfo**.java:20: error: package org.json.simple.JSONObject
does not exist*
>  
> *src/java/org/apache/nutch/fetcher/**LangInfo**.java:21: error: package org.json.simple.parser
does not exist***
>  
> But when i open it in eclipse, eclipse does not shows error on this import. and if i
go to project properties > Libraries there i found *json-simple-1.1.0.jar.* it means this
jar file already exists. but why i am always getting errors due to this import?
> i have attached two screenshots with this issue:
> 1- jar.png (this is eclipse screenshot showing json-simple-1.1.0.jar exists)
> 2- error.png (this is terminal build error log. when i run ant runtime command)
> Kindly help me ASAP.
> TIA.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message