Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4519

JDG prevent execution of delete or update on child objects

    XMLWordPrintable

    Details

      Description

      When using JDG and complex pojos, delete query issued against child tables end with error.

      • 1-1 relation:
        When deleting a child object, whole parent object is deleted
      • 1-n relation:
        An exception is thrown:
        Unable to find source-code formatter for language: plain. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
        13:31:28,926 WARN  [org.teiid.CONNECTOR] (Worker7_QueryProcessorQueue91) Connector worker process failed for atomic-request=rKsoeHUfbaAW.21.0.21: org.teiid.translator.TranslatorException: TEIID31111 No such accessible property/method number on class java.util.ArrayList.
                  at org.teiid.translator.object.ObjectUpdateExecution.handleDelete(ObjectUpdateExecution.java:388) [translator-object-8.12.6.6_3.jar:8.12.6.6_3]
                  at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:137) [translator-object-8.12.6.6_3.jar:8.12.6.6_3]
                  at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) [translator-object-8.12.6.6_3.jar:8.12.6.6_3]
                  at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:402) [teiid-engine-8.12.6.6_3-redhat-1.jar:8.12.6.6_3-redhat-1]
                  at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:364) [teiid-engine-8.12.6.6_3-redhat-1.jar:8.12.6.6_3-redhat-1]
                  at sun.reflect.GeneratedMethodAccessor211.invoke(Unknown Source) [:1.8.0_102]
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_102]
                  at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_102]
                  at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.6.6_3-redhat-1.jar:8.12.6.6_3-redhat-1]
                  at com.sun.proxy.$Proxy81.execute(Unknown Source)
                  at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.6.6_3-redhat-1.jar:8.12.6.6_3-redhat-1]
                  at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.6.6_3-redhat-1.jar:8.12.6.6_3-redhat-1]
                  at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.6.6_3-redhat-1.jar:8.12.6.6_3-redhat-1]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_102]
                  at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.6.6_3-redhat-1.jar:8.12.6.6_3-redhat-1]
                  at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.6.6_3-redhat-1.jar:8.12.6.6_3-redhat-1]
                  at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.6.6_3-redhat-1.jar:8.12.6.6_3-redhat-1]
                  at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.6.6_3-redhat-1.jar:8.12.6.6_3-redhat-1]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_102]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_102]
                  at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_102]
        Caused by: javax.script.ScriptException: TEIID31111 No such accessible property/method number on class java.util.ArrayList.
                  at org.teiid.translator.object.ObjectScriptEngine$1.eval(ObjectScriptEngine.java:144) [translator-object-8.12.6.6_3.jar:8.12.6.6_3]
                  at org.teiid.translator.object.ObjectUpdateExecution.handleDelete(ObjectUpdateExecution.java:372) [translator-object-8.12.6.6_3.jar:8.12.6.6_3]
                  ... 20 more
        

      These two cases should be handled. Given the lack of DELETE support, all the DELETE queries on child entities should throw exception instead.

      The DELETE on parent should be enabled though.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              van.halbert Van Halbert (Inactive)
              Reporter:
              jstastny Jan Stastny
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: