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

DIH 'db' example broken in 7.0.0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 7.0
    • Fix Version/s: 7.1
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      The DIH 'db' example is broken in 7.0.0, also in RC3.

      Steps to reproduce

      1. bin/solr -e dih
      2. open http://localhost:8983/solr/#/db/dataimport//dataimport
      3. Click "execute" button
      4. See that "Fetched: 0", should be 16
      5. Open /solr/example/example-DIH/logs/solr.log and see exception
      INFO  - 2017-09-11 08:16:59.663; [   x:db] org.apache.solr.handler.dataimport.DataImporter; Data Configuration loaded successfully
      INFO  - 2017-09-11 08:16:59.671; [   x:db] org.apache.solr.core.SolrCore; [db]  webapp=/solr path=/dataimport params={core=db&optimize=false&indent=on&commit=true&name=dataimport&clean=true&wt=json&command=full-import&_=1505117815960&verbose=false} status=0 QTime=24
      INFO  - 2017-09-11 08:16:59.671; [   x:db] org.apache.solr.handler.dataimport.DataImporter; Starting Full Import
      INFO  - 2017-09-11 08:16:59.676; [   x:db] org.apache.solr.core.SolrCore; [db]  webapp=/solr path=/dataimport params={indent=on&wt=json&command=status&_=1505117815960} status=0 QTime=0
      WARN  - 2017-09-11 08:16:59.687; [   x:db] org.apache.solr.handler.dataimport.SimplePropertiesWriter; Unable to read: dataimport.properties
      INFO  - 2017-09-11 08:16:59.764; [   x:db] org.apache.solr.handler.dataimport.JdbcDataSource$1; Creating a connection for entity item with URL: jdbc:hsqldb:/Users/janhoy/git/lucene-solr-2/solr/example/example-DIH/hsqldb/ex
      ERROR - 2017-09-11 08:17:00.417; [   x:db] org.apache.solr.common.SolrException; Exception while processing: item document : SolrInputDocument(fields: []):org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: select * from item Processing Document # 1
      	at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:69)
      	at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:327)
      	at org.apache.solr.handler.dataimport.JdbcDataSource.createResultSetIterator(JdbcDataSource.java:288)
      	at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:283)
      	at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:52)
      	at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
      	at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
      	at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:267)
      	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:476)
      	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:415)
      	at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:330)
      	at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:233)
      	at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:415)
      	at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:474)
      	at org.apache.solr.handler.dataimport.DataImporter.lambda$runAsync$0(DataImporter.java:457)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.sql.SQLException: error in script file line: 2 /Users/janhoy/git/lucene-solr-2/solr/example/example-DIH/hsqldb/ex system object cannot be modified in statement [CREATE CACHED TABLE ITEM(ID CHAR(8),NAME VARCHAR(100),MANU VARCHAR(50),WEIGHT REAL,PRICE REAL,POPULARITY INTEGER,INCLUDES VARCHAR(200),LAST_MODIFIED TIMESTAMP DEFAULT NOW)]
      	at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
      	at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
      	at org.hsqldb.jdbc.JDBCConnection.<init>(Unknown Source)
      	at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
      	at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
      	at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:192)
      	at org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:172)
      	at org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:528)
      	at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:317)
      	... 14 more
      Caused by: org.hsqldb.HsqlException: error in script file line: 2 /Users/janhoy/git/lucene-solr-2/solr/example/example-DIH/hsqldb/ex system object cannot be modified in statement [CREATE CACHED TABLE ITEM(ID CHAR(8),NAME VARCHAR(100),MANU VARCHAR(50),WEIGHT REAL,PRICE REAL,POPULARITY INTEGER,INCLUDES VARCHAR(200),LAST_MODIFIED TIMESTAMP DEFAULT NOW)]
      	at org.hsqldb.error.Error.error(Unknown Source)
      	at org.hsqldb.scriptio.ScriptReaderText.readDDL(Unknown Source)
      	at org.hsqldb.scriptio.ScriptReaderBase.readAll(Unknown Source)
      	at org.hsqldb.persist.Log.processScript(Unknown Source)
      	at org.hsqldb.persist.Log.open(Unknown Source)
      	at org.hsqldb.persist.Logger.open(Unknown Source)
      	at org.hsqldb.Database.reopen(Unknown Source)
      	at org.hsqldb.Database.open(Unknown Source)
      	at org.hsqldb.DatabaseManager.getDatabase(Unknown Source)
      	at org.hsqldb.DatabaseManager.newSession(Unknown Source)
      	... 21 more
      Caused by: org.hsqldb.HsqlException: system object cannot be modified
      	at org.hsqldb.error.Error.error(Unknown Source)
      	at org.hsqldb.error.Error.error(Unknown Source)
      	at org.hsqldb.StatementSchema.checkSchemaUpdateAuthorisation(Unknown Source)
      	at org.hsqldb.StatementSchema.setOrCheckObjectName(Unknown Source)
      	at org.hsqldb.StatementSchema.getResult(Unknown Source)
      	at org.hsqldb.StatementSchema.execute(Unknown Source)
      	at org.hsqldb.Session.executeCompiledStatement(Unknown Source)
      	... 30 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jdyer James Dyer
                Reporter:
                janhoy Jan Høydahl
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: