Note that there are some explanatory texts on larger screens.

plurals
  1. POThe method search() in the type "x" is not applicable for the arguments (String)
    primarykey
    data
    text
    <p>Setup Mac OSX 10.6.7, Eclipse, Tomcat 1.6 </p> <p>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,</p> <p>The JSP</p> <pre><code>&lt;% 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)); %&gt; </code></pre> <p>The Java</p> <pre><code>public String search(String dbConcept) { setSlicepediaProductionMode(true); List&lt;SliceHit&gt; 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&lt;SliceHit&gt; 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; } } </code></pre> <p>The Error</p> <pre><code>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)); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload