Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9072569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:11:59+00:00 2026-06-16T18:11:59+00:00

Possible Duplicate: org.xml.sax.SAXParseException: Content is not allowed in prolog I would like to import

  • 0

Possible Duplicate:
org.xml.sax.SAXParseException: Content is not allowed in prolog

I would like to import a skos (rdf/xml) thesaurus in Jena model. The skos thesaurus is available in http://www.culturaitalia.it/pico/thesaurus/4.2/thesaurus_4.2.0.skos.xml. I copied that to a local file (in picoFileName) and I used this code to import it in a Model:

    ...
    pico = ModelFactory.createDefaultModel();
    InputStream in = FileManager.get().open(picoFileName);
    if (in == null) {
        throw new IllegalArgumentException( "File: " + picoFileName + " not found");
    }
    pico.read(new InputStreamReader(in), "");
    ... 

I receive this error:

Exception in thread "main" com.hp.hpl.jena.shared.JenaException:   org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler.fatalError(RDFDefaultErrorHandler.java:60)
at com.hp.hpl.jena.rdf.arp.impl.ARPSaxErrorHandler.fatalError(ARPSaxErrorHandler.java:51)
at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.warning(XMLHandler.java:211)
at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.fatalError(XMLHandler.java:241)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.parse(RDFXMLParser.java:155)
at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:173)
at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:160)
at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:199)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:229)
at it.etc.rdf.LodWithPico.<init>(LodWithPico.java:24)
at it.etc.rdf.TestLodWithPico.main(TestLodWithPico.java:6)
    Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
... 18 more

The skos thesaurus is validated in w3c rdf/xml validator and in skos validator. What is wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T18:12:00+00:00Added an answer on June 16, 2026 at 6:12 pm

    Sorry, there was something wrong in the input file. I copied file content in an other file and it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: What's the best place to find Git reference content online while kernel.org
Possible Duplicate: Block TOR Servers I would like to know if it is possible
Possible Duplicate: Nokogiri/Xpath namespace query I have an XML file like this: <?xml version=1.0
Possible Duplicate: How to make org syntax links in any emacs buffer look like
Possible Duplicate: Parse XML with Namespace using SimpleXML PHP SimpleXML Namespace Problem <?php header(Content-Type:
Possible Duplicate: XmlSerializer: remove unnecessary xsi and xsd namespaces I'm generating some XML using
Possible Duplicate: Any known problems/bugs with objectContribution (popup) to CVS History view? It's not
Possible Duplicate: Best Way to Sprite Images? Hi i have been using this http://spritegen.website-performance.org
Possible Duplicate: WAMP Stack PHP Fatal error: Class ‘SoapClient’ not found I downloaded a
Possible Duplicate: foreach and simplexml I have got my XML document loading correct but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.