3 Replies Latest reply on Feb 16, 2012 6:20 AM by Rakesh Balguri

    QueryResolverException

    Rakesh Balguri Expert

      Hi all,

       

      I have a stored procedure whose metadata is defined as follows:

       

              final Procedure auditProcedure = metadataFactory.addProcedure("checkAuditAdmin");

              metadataFactory.addProcedureResultSetColumn("USER_ACCESS", TypeFacility.RUNTIME_NAMES.STRING, auditProcedure);

              metadataFactory.addProcedureResultSetColumn("USER_ID", TypeFacility.RUNTIME_NAMES.STRING, auditProcedure);

       

      And the model is defined as

       

      <model name="command_history_audit_proc">

              <translator type="commandhistory-audit" datasource=""/>

          </model>

       

      I copied the jar file for the translator to JBoss.

       

      When I try to call the stored procedure using call command_history_audit_proc.checkAuditAdmin, I get the following exception

      Can someone tell me the reason for this exception and how to solve this.

       

      I am using teiid 7.6

       

      org.teiid.jdbc.TeiidSQLException: command_history_audit_proc.checkAuditAdmin does not exist.

           at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:113)

           at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:70)

           at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:617)

           at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:70)

           at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:537)

           at org.teiid.client.util.ResultsFuture.addCompletionListener(ResultsFuture.java:139)

           at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:533)

           at org.teiid.jdbc.StatementImpl.executeQuery(StatementImpl.java:338)

           at com.ca.chorus.server.teiid.bootstrap.TeiidBootstrap.generateSchema(TeiidBootstrap.java:405)

           at com.ca.chorus.server.teiid.bootstrap.TeiidBootstrap.run(TeiidBootstrap.java:257)

           at com.ca.chorus.extension.ServiceStarter.call(ServiceStarter.java:94)

           at com.ca.chorus.server.startup.ChorusPrimordialJbossBean$1.call(ChorusPrimordialJbossBean.java:96)

           at com.ca.chorus.server.startup.ChorusPrimordialJbossBean$1.call(ChorusPrimordialJbossBean.java:92)

           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)

           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)

           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

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

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

      Caused by: [QueryResolverException]command_history_audit_proc.checkAuditAdmin does not exist.

      1 [QueryMetadataException]command_history_audit_proc.checkAuditAdmin does not exist.

           at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:296)

           at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.resolveSubQuery(SimpleQueryResolver.java:254)

           at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:411)

           at org.teiid.query.sql.lang.SubqueryFromClause.acceptVisitor(SubqueryFromClause.java:127)

           at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

           at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:72)

           at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:265)

           at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:570)

           at org.teiid.query.sql.lang.From.acceptVisitor(From.java:146)

           at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

           at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:232)

           at org.teiid.query.resolver.command.SimpleQueryResolver.resolveCommand(SimpleQueryResolver.java:103)

           at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:294)

           at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.resolveSubQuery(SimpleQueryResolver.java:254)

           at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:411)

           at org.teiid.query.sql.lang.SubqueryFromClause.acceptVisitor(SubqueryFromClause.java:127)

           at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

           at org.teiid.query.sql.navigator.AbstractNavigator.visitNodes(AbstractNavigator.java:72)

           at org.teiid.query.sql.navigator.PreOrPostOrderNavigator.visit(PreOrPostOrderNavigator.java:265)

           at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:570)

           at org.teiid.query.sql.lang.From.acceptVisitor(From.java:146)

           at org.teiid.query.sql.navigator.AbstractNavigator.visitNode(AbstractNavigator.java:61)

           at org.teiid.query.resolver.command.SimpleQueryResolver$QueryResolverVisitor.visit(SimpleQueryResolver.java:232)

           at org.teiid.query.resolver.command.SimpleQueryResolver.resolveCommand(SimpleQueryResolver.java:103)

           at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:294)

           at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:147)

           at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:291)

           at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:392)

           at org.teiid.dqp.internal.process.Request.processRequest(Request.java:459)

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

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

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

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

           at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:386)

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

           at java.lang.reflect.Method.invoke(Method.java:601)

           at org.teiid.logging.LogManager$LoggingProxy.invoke(LogManager.java:121)

           at org.teiid.jboss.deployers.RuntimeEngineDeployer$3.invoke(RuntimeEngineDeployer.java:393)

           at $Proxy321.executeRequest(Unknown Source)

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

           at java.lang.reflect.Method.invoke(Method.java:601)

           at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:112)

           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

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

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

           at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:110)

           at $Proxy321.executeRequest(Unknown Source)

           at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:592)

           at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:531)

           ... 13 more

      Caused by: [QueryMetadataException]command_history_audit_proc.checkAuditAdmin does not exist.

           at org.teiid.query.metadata.TransformationMetadata.getStoredProcedureInfoForProcedure(TransformationMetadata.java:304)

           at org.teiid.query.metadata.BasicQueryMetadataWrapper.getStoredProcedureInfoForProcedure(BasicQueryMetadataWrapper.java:256)

           at org.teiid.query.metadata.BasicQueryMetadataWrapper.getStoredProcedureInfoForProcedure(BasicQueryMetadataWrapper.java:256)

           at org.teiid.query.metadata.BasicQueryMetadataWrapper.getStoredProcedureInfoForProcedure(BasicQueryMetadataWrapper.java:256)

           at org.teiid.query.resolver.command.ExecResolver.findCommandMetadata(ExecResolver.java:73)

           at org.teiid.query.resolver.command.ExecResolver.resolveProceduralCommand(ExecResolver.java:231)

           at org.teiid.query.resolver.ProcedureContainerResolver.resolveCommand(ProcedureContainerResolver.java:140)

           at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:294)

       

       

      Thanks

      Rakesh