Return-Path: X-Original-To: apmail-any23-dev-archive@www.apache.org Delivered-To: apmail-any23-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F2D0417526 for ; Mon, 2 Feb 2015 19:13:39 +0000 (UTC) Received: (qmail 34808 invoked by uid 500); 2 Feb 2015 19:13:34 -0000 Delivered-To: apmail-any23-dev-archive@any23.apache.org Received: (qmail 34762 invoked by uid 500); 2 Feb 2015 19:13:34 -0000 Mailing-List: contact dev-help@any23.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@any23.apache.org Delivered-To: mailing list dev@any23.apache.org Received: (qmail 34750 invoked by uid 99); 2 Feb 2015 19:13:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Feb 2015 19:13:34 +0000 Date: Mon, 2 Feb 2015 19:13:34 +0000 (UTC) From: "Souri (JIRA)" To: dev@any23.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ANY23-248) NTriplesWriter on hadoop : issue with MIME type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ANY23-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14301714#comment-14301714 ] Souri commented on ANY23-248: ----------------------------- I have any23-core in the classpath. I think that includes any23-mime. org.apache.any23 apache-any23-core 1.1 > NTriplesWriter on hadoop : issue with MIME type > ----------------------------------------------- > > Key: ANY23-248 > URL: https://issues.apache.org/jira/browse/ANY23-248 > Project: Apache Any23 > Issue Type: Bug > Affects Versions: 1.1 > Environment: hadoop,linux > Reporter: Souri > Priority: Minor > Fix For: 1.2 > > > I am trying to create n-triples from an html string. I am using the following code to do it: > StringDocumentSource documentSource = new StringDocumentSource(html, null); > ByteArrayOutputStream out = new ByteArrayOutputStream(); > final NTriplesWriter tripleHandler = new NTriplesWriter(out); > Any23 runner = new Any23(); > > runner.extract(documentSource,tripleHandler); > tripleHandler.close(); > String result = out.toString("us-ascii"); > return result; > This is giving me the error : > java.lang.NullPointerException > at org.apache.any23.extractor.SingleDocumentExtraction.filterExtractorsByMIMEType(SingleDocumentExtraction.java:421) > at org.apache.any23.extractor.SingleDocumentExtraction.run(SingleDocumentExtraction.java:223) > at org.apache.any23.Any23.extract(Any23.java:298) > at org.apache.any23.Any23.extract(Any23.java:433) > I am running this in hadoop. When I run locally with a single file it works, but doesn't work when run on hadoop. > Can someone please tell me how to go about this issue? -- This message was sent by Atlassian JIRA (v6.3.4#6332)