9 Replies Latest reply on Sep 12, 2013 9:04 AM by Vivedha Elango

    Error in executing the updateable Internal Materialised view

    Vivedha Elango Newbie

      Hi all,

      I am working on Internal Materialised view.

      If I execute this command on the VDB

      CALL SYSADMIN.refreshMatViewRow(viewname=>'RESTView.Air_Travel', key=>3);

      It is showing error as

      java.lang.String cannot be cast to java.lang.Integer

       

      As per the cache guide, I have set the cache to be updateable and set the primary key for the view.What should I give for key value?Is it the primary key value?

       

      The error in Server log:

      19:02:50,825 INFO  [MATVIEWS] Refreshing row '3' for materialized view RESTView.Air_Travel.

      19:02:50,876 ERROR [PROCESSOR] Unexpected exception for request zSTOp2lwpjxX.0

      java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

              at java.lang.Integer.compareTo(Unknown Source)

              at org.teiid.query.sql.symbol.Constant.compare(Constant.java:249)

              at org.teiid.query.processor.relational.ListNestedSortComparator.compare(ListNestedSortComparator.java:177)

              at org.teiid.query.processor.relational.ListNestedSortComparator.compare(ListNestedSortComparator.java:59)

              at java.util.Collections.indexedBinarySearch(Unknown Source)

              at java.util.Collections.binarySearch(Unknown Source)

              at org.teiid.common.buffer.SPage.search(SPage.java:139)

              at org.teiid.common.buffer.STree.find(STree.java:244)

              at org.teiid.common.buffer.STree.insert(STree.java:289)

              at org.teiid.query.tempdata.TempTable.updateTuple(TempTable.java:773)

              at org.teiid.query.tempdata.GlobalTableStoreImpl.updateMatViewRow(GlobalTableStoreImpl.java:297)

              at org.teiid.query.tempdata.TempTableDataManager.handleSystemProcedures(TempTableDataManager.java:334)

              at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:155)

              at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:134)

              at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:367)

              at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:156)

              at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:256)

              at org.teiid.query.processor.relational.RelationalPlan.open(RelationalPlan.java:167)

              at org.teiid.query.processor.QueryProcessor.init(QueryProcessor.java:182)

              at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:126)

              at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:105)

              at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:147)

              at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:375)

              at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:288)

              at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

              at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:216)

              at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:244)

              at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:122)

              at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:292)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

              at java.lang.Thread.run(Unknown Source)