Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-464

Errors in the example code supplied with the Jena download

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • ARQ 2.9.4, Jena 2.10.1
    • Jena 2.11.0
    • ARQ, Jena
    • I don't think this is relevant, however just in case: Eclipse Juno Service Release 2, Java 1.7, Ubuntu 12.04 64-bit, Jena 2.10.1

    Description

      Two types of errors in the example code:

      Error 1: (simple solution given)

      When trying to run the example code in src-examples/arq/examples/update I got the error message:

      Exception in thread "main" com.hp.hpl.jena.query.QueryParseException: Encountered " <IRIref> "<http://example/g2> "" at line 1, column 38.
      Was expecting:
      "graph" ...

      An example of the offending code from UpdateExecuteOperations.java is:

      UpdateFactory.parse(request, "LOAD <file:etc/update-data.ttl> INTO <http://example/g2>") ;

      When I tried changing "INTO" to "INTO GRAPH" the examples worked fine.

      Error 2: (solution unknown)

      After importing all the src-examples into an eclipse project (properly configured with all the libraries in apache-jena-2.10.1/lib) all the example code compiled except for src-examples/org/apache/jena/example/Base.java

      Because several examples depend on Base.java those examples cannot be run.

      In Base.java Eclipse complains that org.apache.commons.cli.* cannot be resolved.

      Furthermore there are numerous other compile errors throughout that file, which may be related to the missing import.

      I resolved the error re CommandLine by importing jena.cmdline.CommandLine

      To resolve the error re ParseException there are multiple possible imports and it is not clear which is required.

      Regarding the other errors (Options, GnuParser, HelpFormatter) eclipse could not find anything from the Jena libraries to suggest for import.

      Attachments

        Activity

          People

            andy Andy Seaborne
            anandavala John Ringland
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified