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 8418435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:19:41+00:00 2026-06-10T02:19:41+00:00

Dear Friends I m using Jena framework with RDF database model with virtuoso in

  • 0

Dear Friends I m using Jena framework with RDF database model with virtuoso
in my project. my jena version is jena-core2.7.2 and jena-arq-2.9.2

Here is the my code which is giving me error

public JsonArray getCountryAutoSuggestData()
{
    JsonArray countryArray = new JsonArray();
    Model model = DataModel.getModel();
    String mystr = " PREFIX plcontologyurl:<http://www.plcontology.com/#> "
            + " PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> "
            + "select ?cn"
            + " where "
            + " { "
            + " ?d plcontologyurl:Country_Name ?cn . "
            + "}";
    Query query = QueryFactory.create(mystr);
    QueryExecution qe = QueryExecutionFactory.create(query, model);
    QuerySolutionMap qMap = new QuerySolutionMap();
    qe.setInitialBinding(qMap);
    ResultSet rs = qe.execSelect();
    while(rs.hasNext())
    {
        qMap = (QuerySolutionMap)rs.next();
        countryArray.add(new JsonPrimitive(qMap.getLiteral("cn").getString()));
    }
    return countryArray;
}

Error is java.lang.InstantiationError: com.hp.hpl.jena.sparql.engine.binding.BindingMap
at line
while(rs.hasNext())

I tried looking for the problem and I found one relevant discussion

They are saying that now com.hp.hpl.jena.sparql.engine.binding.BindingMap is not a simple
class now in this version but an interface now.

If it is like that then how to run sparql query in the current version.
Please give an example based on the code i have shared.
Thanks in advance.

  • 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-10T02:19:43+00:00Added an answer on June 10, 2026 at 2:19 am

    You have a mix of versions on the classpath.

    The information you link to is correct – BindingMap became an interface so if you see java.lang.InstantiationError it means the calling code is from an earlier version of ARQ.

    Check you don’t have more than one copy of Jena code on the classpath, and there are not copies in endorsed directories of the JVM.

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

Sidebar

Related Questions

Dear friends,I want to extract text 平均3.6 星 from this code segment excerpted from
hi my dear friends : the below code works perfect in ie9 , but
Dear Friends, Any idea why the msgrcv is receiving a blank buffer? Here is
Dear fellow homo sapiens, I've created this graph using the code below (except without
dear All. I'm using integer PKs in some tables of mysql database. Before input
Dear friends, I need your help. I need to send .bmp file to another
Dear Friends from Stackoverflow, Please help me with a problem that i'm having when
Dear members of the Stackoverflow community, We are developing a web application using the
Dear friends, i'm concerned if i'm making a bad use of references in C++
Dear experts, I was trying to dynamically generate DOM elements using JS. I read

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.