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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:39:27+00:00 2026-06-06T02:39:27+00:00

Setup Mac OSX 10.6.7, Eclipse, Tomcat 1.6 I am trying to call a string

  • 0

Setup Mac OSX 10.6.7, Eclipse, Tomcat 1.6

I am trying to call a string from a Java file to my JSP to display it to the user but I keep getting the below error. Any help is as always much appreciated,

The JSP

<%
Injector injector = Guice.createInjector(new GuiceInjector());
SliceConnector r = injector.getInstance(SliceConnector.class);  
out.println(r.search());    

String dbConcept = "http://dbpedia.org/resource/human_rights";
System.out.println(r.search(dbConcept));
%>

The Java

public String search(String dbConcept)
{
    setSlicepediaProductionMode(true);

    List<SliceHit> sliceHits = searchForSlices();
    if (sliceHits == null) {
        System.err.println("Timeout occurred while fetching slices");
        return "error";
    }
    if (!sliceHits.isEmpty()) {
        System.out.println("Found some slices Yuhuuuu ! :-) ");
        String sliceContent = createSlices(sliceHits);
        System.out.println("Slice content:");
        System.out.println(sliceContent);
        return sliceContent;
    } else {
        System.out.println("No Slices were found for this query");
    }
    System.out.println("Slice Consumer stopped activity");      
    return "SliceConnector";
}

private void setSlicepediaProductionMode(boolean productionMode)
{
    sliceSearcher.setProductionMode(productionMode);
    sliceCreator.setProductionMode(productionMode);
}
private List<SliceHit> searchForSlices() {
    SlicepediaQuery sliceQuery = new SlicepediaQuery();

    String dbConcept = "http://dbpedia.org/resource/human_rights";

    sliceSearcher.setSliceQuery(sliceQuery);
    if (sliceSearcher.run()) 
    {
        return sliceSearcher.getSliceHits();
    } else 
    {
        return null;
    }
}

The Error

exception

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 141 in the jsp file: /SimpleResponse2.jsp
The method search() in the type SliceConnector is not applicable for the arguments (String)
138:            
139:            
140:        String dbConcept = "http://dbpedia.org/resource/human_rights";
141:        System.out.println(r.search(dbConcept));
  • 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-06T02:39:28+00:00Added an answer on June 6, 2026 at 2:39 am

    I see that you are calling search() twice, first without argument, the second time with a string. In the code posted you only provide for the latter case, so you should already get an error at the first call.

    Correct the first call and make sure you are referencing to the right file(s).

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

Sidebar

Related Questions

Setup Mac OSX 10.6.8, Apache Tomcat 6.0.16, Java1.6.0_29, Eclipse IDE Indigo. I asked a
I am trying to install PIL on Mac OSX 10.7.4 but after several hours
Setup OSX 10.7.4, Eclipse, Pydev, Python 2.7, Tweepy-1.9 Hey, I was originally trying to
I'm trying to download Eclipse IDE for Android development. I've downloaded the setup but
I am trying to get my Mac setup as a php server, however, as
I'm trying to install matplotlib on my mac setup. I find that setup.py has
What is the procedure to setup Google Test to work under Eclipse on Mac
I'm having problems trying to setup an external diff program for svn on Mac
(Step 1) I'm trying to get openCV to run from python on my mac
I have copied my home folder from a Mac OSX 10.5 to a new

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.