8 Replies Latest reply on Mar 20, 2010 8:17 PM by Steven Hawkins Branched to a new discussion.

    Unsupported Feature when executing procedure

    Ahmed Elmeswari Newbie

      Hello,

       

      I have updated my existing source model by importing an Oracle procedure that has one IN parameter and one OUT parameter.  As a side note, when updating an existing model, all of the objects currently on the model are marked for deletion.  So I actually have to uncheck all of those, otherwise they will be deleted and only the new object (in this case the procedure) will be added.  Anyway, back to the issue at hand.  I created a virtual procedure in the existing view model that has one Procedure Parameter to represent the IN paramater, and within the NewProcedureResult I have one column representing the OUT parameter.  I synch up the VDB and excute it with Transaction Autowrap set to PESSIMISTIC.  I click the procedure in the SQLExplorer and generate the exec statement.  The generated statement is EXEC JOPES_VL.JOPES.JOPES_SET_ROLE( 'TMT_USER' ).  When I run this statement i get the following error:

       

      com.metamatrix.jdbc.MMSQLException: Error Code:17023 Message:Error Code:17023 Message:Error occurred on connector JOPES_PL XA Connector<9> - Error Code:17023 Message:Unsupported feature

      at com.metamatrix.jdbc.MMSQLException.create(MMSQLException.java:123)

      at com.metamatrix.jdbc.MMSQLException.create(MMSQLException.java:71)

      at com.metamatrix.jdbc.MMStatement.executeSql(MMStatement.java:423)

      at com.metamatrix.jdbc.MMStatement.execute(MMStatement.java:318)

      at net.sourceforge.sqlexplorer.sqlpanel.SqlExecProgress.processQuery(SqlExecProgress.java:192)

      at net.sourceforge.sqlexplorer.sqlpanel.SqlExecProgress.run(SqlExecProgress.java:121)

      at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

      Caused by: [MetaMatrixComponentException] 17023: Error Code:17023 Message:Error Code:17023 Message:Error occurred on connector JOPES_PL XA Connector<9> - Error Code:17023 Message:Unsupported feature

      1 [ConnectorException]Error Code:17023 Message:Error occurred on connector JOPES_PL XA Connector<9> - Error Code:17023 Message:Unsupported feature

      2 [ConnectorException]Error Code:17023 Message:Unsupported feature

      3 [SQLException]Unsupported feature

      at org.teiid.dqp.internal.process.DataTierTupleSource.switchBatch(DataTierTupleSource.java:128)

      at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:89)

      at com.metamatrix.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:132)

      at com.metamatrix.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:261)

      at com.metamatrix.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:165)

      at com.metamatrix.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:261)

      at com.metamatrix.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:165)

      at com.metamatrix.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:261)

      at com.metamatrix.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:110)

      at com.metamatrix.query.processor.QueryProcessor.process(QueryProcessor.java:160)

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

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

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

      at com.metamatrix.common.queue.WorkerPoolFactory$StatsCapturingSharedThreadPoolExecutor$1.run(WorkerPoolFactory.java:211)

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

      at java.lang.Thread.run(Thread.java:619)

      Caused by: org.teiid.connector.api.ConnectorException: Error Code:17023 Message:Error occurred on connector JOPES_PL XA Connector<9> - Error Code:17023 Message:Unsupported feature

      at org.teiid.dqp.internal.datamgr.impl.ConnectorWorkItem.handleError(ConnectorWorkItem.java:238)

      at org.teiid.dqp.internal.datamgr.impl.ConnectorWorkItem.process(ConnectorWorkItem.java:174)

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

      at org.teiid.dqp.internal.datamgr.impl.SynchConnectorWorkItem.run(SynchConnectorWorkItem.java:69)

      ... 4 more

      Caused by: org.teiid.connector.api.ConnectorException: Error Code:17023 Message:Unsupported feature

      at org.teiid.connector.jdbc.JDBCProcedureExecution.getOutputParameterValues(JDBCProcedureExecution.java:131)

      at org.teiid.dqp.internal.datamgr.impl.ProcedureBatchHandler.getParameterRow(ProcedureBatchHandler.java:88)

      at org.teiid.dqp.internal.datamgr.impl.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:405)

      at org.teiid.dqp.internal.datamgr.impl.ConnectorWorkItem.processNewRequest(ConnectorWorkItem.java:283)

      at org.teiid.dqp.internal.datamgr.impl.ConnectorWorkItem.process(ConnectorWorkItem.java:157)

      ... 6 more

      Caused by: java.sql.SQLException: Unsupported feature

      at oracle.jdbc.driver.OracleParameterMetaData.getParameterType(OracleParameterMetaData.java:166)

      at org.teiid.connector.jdbc.JDBCProcedureExecution.addParameterValue(JDBCProcedureExecution.java:138)

      at org.teiid.connector.jdbc.JDBCProcedureExecution.getOutputParameterValues(JDBCProcedureExecution.java:126)

      ... 10 more

       

       

      I looks like it is having an issue with the parameter type.  Both the IN and OUT parameters have a VARCHAR2 native type and a string datatype.  I am using the ojdbc6.jar and the connection class is oracle.jdbc.xa.client.OracleXADataSource

       

      Any thoughts?

        • 1. Re: Unsupported Feature when executing procedure
          Steven Hawkins Master

          Hi Ahmed,

           

          Teiid 7.0 was changed to avoid the getParameterType, which as you've seen isn't well supported.  Can you try Teiid 7.0 MS 2 to see if it fixes your issue.  Otherwise you'll have to patch the JDBCProcedureExecution class.

          • 2. Re: Unsupported Feature when executing procedure
            Ahmed Elmeswari Newbie

            Hi Steve,

             

            I have a test that pointed to teiid 6.2 that passes.  I switched it to point to teiid-7.0.0-SNAPSHOT and it failed with the following error:

             

            Here is the test:

             

            def url = 'jdbc:teiid:DAL@/opt/teiid-7.0.0-SNAPSHOT/deploy.properties'
                       
                        def sql = '''select EQT_ID, EQT_ID_CD, EQT_MDL_SRS_ID, CCC1_TY_CD, CCC2_XTNT_CD, CCC3_CNTZN_CD,
                            EQT_LDM, EQT_WDM, EQT_HDM, EQT_VL, EQT_AR, EQT_WT, EQT_ORIG_UIC, SCTY_CLSN_CD, EQT_CREATE_DT,
                            EQT_UPD_DT, EQT_UPD_USER_ID, SITE_ID_CG1 from "DAL"."JOPES_VL.JOPES.EQUIPMENT_TYPE_REF"'''
                           
                            def db = Sql.newInstance(url,'admin','teiid','org.teiid.jdbc.TeiidDataSource')
                            db.eachRow(sql){row ->
                            assertNotNull row
                    }

             

             

            Here is the exception:

             

            java.lang.NoSuchMethodError: com.metamatrix.common.types.DataTypeManager.addSourceTransform(Ljava/lang/Class;Lcom/metamatrix/common/types/SourceTransform;)V
                at com.metamatrix.common.buffer.impl.BufferManagerImpl.initialize(BufferManagerImpl.java:331)
                at com.metamatrix.dqp.embedded.services.EmbeddedBufferService.startService(EmbeddedBufferService.java:101)
                at com.metamatrix.dqp.embedded.services.EmbeddedBaseDQPService.start(EmbeddedBaseDQPService.java:66)
                at com.metamatrix.common.application.ApplicationEnvironment.installService(ApplicationEnvironment.java:76)
                at org.teiid.dqp.internal.process.DQPCore.start(DQPCore.java:588)
                at com.metamatrix.jdbc.EmbeddedConnectionFactoryImpl.initialize(EmbeddedConnectionFactoryImpl.java:158)
                at org.teiid.jdbc.EmbeddedProfile$EmbeddedTransport.<init>(EmbeddedProfile.java:346)
                at org.teiid.jdbc.EmbeddedProfile.getDQPTransport(EmbeddedProfile.java:167)
                at org.teiid.jdbc.EmbeddedProfile.createConnection(EmbeddedProfile.java:146)
                at org.teiid.jdbc.EmbeddedProfile.connect(EmbeddedProfile.java:109)
                at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:92)
                at java.sql.DriverManager.getConnection(DriverManager.java:582)
                at java.sql.DriverManager.getConnection(DriverManager.java:185)
                at groovy.sql.Sql.newInstance(Sql.java:157)
                at groovy.sql.Sql.newInstance(Sql.java:178)
                at groovy.sql.Sql$newInstance.call(Unknown Source)
                at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:137)
                at mil.disa.apex.dal.MetaMatrixJdbcTest.testGetMeSomething7dot0(MetaMatrixJdbcTest.groovy:37)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at junit.framework.TestCase.runTest(TestCase.java:164)
                at junit.framework.TestCase.runBare(TestCase.java:130)
                at junit.framework.TestResult$1.protect(TestResult.java:106)
                at junit.framework.TestResult.runProtected(TestResult.java:124)
                at junit.framework.TestResult.run(TestResult.java:109)
                at junit.framework.TestCase.run(TestCase.java:120)
                at junit.framework.TestSuite.runTest(TestSuite.java:230)
                at junit.framework.TestSuite.run(TestSuite.java:225)
                at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
                at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

            • 3. Re: Unsupported Feature when executing procedure
              Ahmed Elmeswari Newbie
              As a side note, when I execute the vdb in Teiid Designer 6.3, is it starting the vdb in embedded mode in a Teiid 6.2 environment?
              • 4. Re: Unsupported Feature when executing procedure
                Ramesh Reddy Master

                Are you using the client jar for from 7.0.M2 from your test?

                 

                Yes,  Desinger 6.3 uses the Teiid 6.2 runtime. Teiid has moved on to 7.0 skipping the 6.3.

                 

                Ramesh..

                • 5. Re: Unsupported Feature when executing procedure
                  Ahmed Elmeswari Newbie
                  Under C:\opt\teiid-7.0.0-SNAPSHOT\client there is a teiid-7.0.0-SNAPSHOT-client.jar.  I have copied that in the lib directory under the project which the test resides in.  I still get the same error
                  • 6. Re: Unsupported Feature when executing procedure
                    Ramesh Reddy Master

                    Looks like you have conflict in the 6.2 and 7.0 jars in your test. They both are visible in your classpath. You need to correct that to fix the issue.

                    • 7. Re: Unsupported Feature when executing procedure
                      Ahmed Elmeswari Newbie

                      I set my classpath specifically to point to teiid 7.0.  Still get the same failure.

                      • 8. Re: Unsupported Feature when executing procedure
                        Steven Hawkins Master

                        Hi Ahmed,

                         

                        To get this error you have a 6.2 jdbc client jar either in your application class path or in the lib of the teiid 7.0 installation.  Can you check the client classpath e.g System.getProperty("java.class.path") or otherwise inspect the classloader of the DataTypeManager class to see where it is getting loaded from?

                         

                        Steve