Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12472

SOLR JDBC issue with running queries

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 6.5.1
    • Fix Version/s: None
    • Component/s: SolrJ
    • Labels:
      None

      Description

      I am trying to work with the SOLR-JDBC.

      For some reason it works with DbVisualizer, but a simple java program ..

      Class.forName("org.apache.solr.client.solrj.io.sql.DriverImpl");

      Connection conn = DriverManager.getConnection("jdbc:solr://zootest01:2181/?collection=mycol");

      Statement stat = conn.createStatement();

      ResultSet rs = stat.executeQuery("select item_id from mycol limit 10");

      this fails with exception coming from :

      org.noggit.JSONParser$ParserException: JSON Parse Error : char=< ...

      It seems like the internal engine is returning HTML or XML while JSON is expected due to some reason.

      As there is totally no documentation at all about the Driver Properties or anything else, I've no idea what is causing this or why is works with SquirrelSql & dbVisualizer, and not with other tools like DBeaver for example, which have the very same issues as I get with simple java program.

      Any idea what is wrong there ? Cause definitely something is wrong, as I use a very simple Java sample which works fine with every other JDBC driver I've tested.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ravenrani Rani Y.
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: