1 2 3 Previous Next 43 Replies Latest reply on Mar 29, 2013 4:16 PM by divadatabase Go to original post
      • 15. Re: Twitter VDB
        divadatabase

        Hi Van,

         

        I tried to query it from Eclipse using JDBC but I got the following error:

         

        TEIID30352 Remote org.teiid.api.exception.query.QueryPlannerException: TEIID30352 TWITTER.INVOKEHTTP does not exist.

         

         

        When you say use the simple client quickstart, can you be a little more specific? Do I:

         

        1. Go to the simpleclient directory in windows explorer

        2. Open and command window

        3. Input the query: mvn install -Dvdb=twitter -Dsql="select * from tweet where query= 'jboss'"

         

        Is that right?

         

        I also downloaded Maven, do I use that directory for anything? (I'm not very familiar with Maven but I've been researhing it)

         

        Thanks,

        Danah

        • 16. Re: Twitter VDB
          van.halbert

          Here's a link that discusses installing maven on different OS's:  http://www.sonatype.com/books/mvnref-book/reference/installation.html

          Its not hard, just a few differences depending on the OS.

           

          As for running from Eclipse, it should have worked.  Can you paste the exception from the server log?

           

          Thanks.

           

          Van

          • 17. Re: Twitter VDB
            divadatabase

            Hi Van,

             

            Here is my output in Eclipse when I issue the query: "select * from tweet where query='jboss'"

             

            iid.jdbc.TeiidSQLException: TEIID30352 Remote org.teiid.api.exception.query.QueryPlannerException: TEIID30352 TWITTER.INVOKEHTTP does not exist.

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

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

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

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

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

                      at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:130)

                      at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:37)

                      at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:75)

                      at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:222)

                      at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:257)

                      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.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:102)

                      at com.sun.proxy.$Proxy1.read(Unknown Source)

                      at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:356)

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

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

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

                      at DataAccess.main(DataAccess.java:35)

            Caused by: org.teiid.core.TeiidProcessingException: TEIID30352 Remote org.teiid.api.exception.query.QueryPlannerException: TEIID30352 TWITTER.INVOKEHTTP does not exist.

                      at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:217)

                      at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:156)

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

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

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

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

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

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

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

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

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

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

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

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

            Caused by: org.teiid.core.TeiidProcessingException: TEIID30352 Remote org.teiid.api.exception.query.QueryResolverException: TEIID30352 TWITTER.INVOKEHTTP does not exist.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      at org.teiid.query.resolver.command.UpdateProcedureResolver.resolveEmbeddedCommand(UpdateProcedureResolver.java:335)

                      at org.teiid.query.resolver.command.UpdateProcedureResolver.resolveStatement(UpdateProcedureResolver.java:173)

                      at org.teiid.query.resolver.command.UpdateProcedureResolver.resolveBlock(UpdateProcedureResolver.java:130)

                      at org.teiid.query.resolver.command.UpdateProcedureResolver.resolveCommand(UpdateProcedureResolver.java:113)

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

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

                      at org.teiid.query.resolver.QueryResolver.expandCommand(QueryResolver.java:105)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.addNestedProcedure(RelationalPlanner.java:621)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.createStoredProcedurePlan(RelationalPlanner.java:726)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.generatePlan(RelationalPlanner.java:541)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.addNestedCommand(RelationalPlanner.java:1069)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.buildTree(RelationalPlanner.java:960)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.createQueryPlan(RelationalPlanner.java:791)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.createQueryPlan(RelationalPlanner.java:750)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.generatePlan(RelationalPlanner.java:531)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.addNestedCommand(RelationalPlanner.java:1069)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.buildTree(RelationalPlanner.java:912)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.createQueryPlan(RelationalPlanner.java:791)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.createQueryPlan(RelationalPlanner.java:750)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.generatePlan(RelationalPlanner.java:531)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.addNestedCommand(RelationalPlanner.java:1069)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.buildTree(RelationalPlanner.java:912)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.createQueryPlan(RelationalPlanner.java:791)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.createQueryPlan(RelationalPlanner.java:750)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.generatePlan(RelationalPlanner.java:531)

                      at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:215)

                      ... 13 more

            Caused by: org.teiid.core.TeiidComponentException: TEIID30352 Remote org.teiid.api.exception.query.QueryMetadataException: TEIID30352 TWITTER.INVOKEHTTP does not exist.

                      at org.teiid.query.metadata.CompositeMetadataStore.getStoredProcedure(CompositeMetadataStore.java:138)

                      at org.teiid.query.metadata.TransformationMetadata.getStoredProcInfoDirect(TransformationMetadata.java:337)

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

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

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

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

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

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

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

                      ... 52 more

            • 18. Re: Twitter VDB
              van.halbert

              Danah,

               

              Your are correct on executing the query using maven.

               

              Van

              • 19. Re: Twitter VDB
                van.halbert

                Check your twitter-vdb.xml, to make sure the model name is "twitter"

                 

                Ex: 

                    <model name="twitter">

                        <source name="twitter" translator-name="rest" connection-jndi-name="java:/twitterDS"/>

                    </model>

                 

                It appears the virtual model (twitterview) is referencing : 

                 

                call twitter.invokeHTTP

                 

                and the name of the model has been changed.

                • 20. Re: Twitter VDB
                  divadatabase

                  Silly me.

                   

                  Your're right, that fixed it. I can now query it from Eclipse.

                   

                  One more thing Van, how do I see the virtual table?

                   

                  All I'm getting is output like this:

                   

                  Wed, 27 Mar 2013 18:44:11 +0000

                  Jboss_Nwankwo

                  Wed, 27 Mar 2013 18:43:04 +0000

                  Jboss_Nwankwo

                  Wed, 27 Mar 2013 18:40:56 +0000

                  Delmistique

                  ...

                   

                  Now can I use the command window to query it? How? Will I see a table?

                   

                  Thanks a lot!

                   

                  Danah

                  • 21. Re: Twitter VDB
                    van.halbert

                    Here's what I see when using simpleclient:

                     

                    1: Tue, 26 Mar 2013 20:55:59 +0000,JBoss_,null,http://a0.twimg.com/profile_images/3391206363/504f81a5be74fd80c2a10972c4b9ee99_normal.jpeg,<a href=&quot;http://instagram.com">Instagram</a>,pretending its summertime @billy_blanks6 http://t.co/IjQZbq2XdV,jboss

                    2: Tue, 26 Mar 2013 20:51:50 +0000,MyronFeldman,null,http://a0.twimg.com/profile_images/3237053923/ee97ebcf98182c39acb2ff61d86e20c9_normal.jpeg,<a href=&quot;http://twitterfeed.com">twitterfeed</a>,Cramoisie snood, jboss, drbd, zimbra, redhat linux working hypothesis: .ixp,jboss

                    3: Tue, 26 Mar 2013 20:34:58 +0000,eltonbowie,null,http://a0.twimg.com/profile_images/3308580153/652820c70d625789b3be8ea09d4ce263_normal.jpeg,<a href=&quot;http://gremln.com">Gremln</a>,Installing JSF 2.2 on JBoss AS 7 http://t.co/D09YGC4HsY,jboss

                    ....

                    (15 rows)

                     

                    Query Plan

                    ProjectNode

                      + Output Columns:

                        0: created_on (string)

                        1: from_user (string)

                        2: to_user (string)

                        3: profile_image_url (string)

                        4: source (string)

                        5: text (string)

                        6: query (string)

                      + Statistics:

                    .....

                     

                    You should see 15 rows and for those 7 columns returned.  In the list above, the simpleclient prints out a comma separated list of column values.

                    • 22. Re: Twitter VDB
                      van.halbert

                      Danah,

                       

                      I would recommend getting a SQL tool, like SQuirrel (http://squirrel-sql.sourceforge.net/).  This will enable you to see all the tables and metadata that is exposed for the vdb that you are connected to.  You can also submit queries and see the results.  Very useful tool.

                       

                      Van

                      • 23. Re: Twitter VDB
                        divadatabase

                        Hi Van,

                         

                        Sounds good, I think I will start using that instead.

                         

                        And I know you said I was correct about the list I wrote on executing a query using Maven, but I still got an error.

                         

                        This is all new to me so please bare with me, I aplogize if I am irritating you.

                         

                        =)

                        • 24. Re: Twitter VDB
                          van.halbert

                          Danah,

                           

                          This is all good, it lets us know where there's usability issues so that we can improve it.

                           

                          As for getting an error, I assume you ran the following steps:

                           

                          1. Go to the simpleclient directory in windows explorer

                          2. Open and command window

                          3. Input the query: mvn install -Dvdb=twitter -Dsql="select * from tweet where query= 'jboss'"

                           

                          Can you paste the error your seeing now?

                           

                          Van

                          • 25. Re: Twitter VDB
                            divadatabase

                            Hi Van,

                             

                            Here is my error:

                             

                            'mvn' is not recognized as an internal or external command, operable program or batch file.

                             

                            So then I went to the bin of my Maven directory, ran the same command, and got this error:

                             

                            C:\Teiid 8.3\Maven\apache-maven-3.0.5\bin>mvn install -Dvdb=twitter -Dsql="selec

                            t * from tweet where query='jboss'"

                            [INFO] Scanning for projects...

                            [INFO] ------------------------------------------------------------------------

                            [INFO] BUILD FAILURE

                            [INFO] ------------------------------------------------------------------------

                            [INFO] Total time: 0.101s

                            [INFO] Finished at: Wed Mar 27 15:55:50 EDT 2013

                            [INFO] Final Memory: 6M/120M

                            [INFO] ------------------------------------------------------------------------

                            [ERROR] The goal you specified requires a project to execute but there is no POM

                            in this directory (C:\Teiid 8.3\Maven\apache-maven-3.0.5\bin). Please verify yo

                            u invoked Maven from the correct directory. -> [Help 1]

                            [ERROR]

                            [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

                            ch.

                            [ERROR] Re-run Maven using the -X switch to enable full debug logging.

                            [ERROR]

                            [ERROR] For more information about the errors and possible solutions, please rea

                            d the following articles:

                            [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProject

                            Exception

                            C:\Teiid 8.3\Maven\apache-maven-3.0.5\bin>

                            • 26. Re: Twitter VDB
                              van.halbert

                              Danah,

                               

                              First, it appears your trying to run it from the maven directory.  You need to "cd" into the simpleclient quickstart directory before running.  Also, I believe as part of the maven install is to add C:\Teiid 8.3\Maven\apache-maven-3.0.5\bin to your PATH.   Or you could run:  C:\Teiid 8.3\Maven\apache-maven-3.0.5\bin\mvn install -Dvdb=twitter -Dsql="select * from tweet where query='jboss'"

                               

                              I think its better to add maven to your PATH so that you don't have to fully qualify the path everytime you want to run maven.

                               

                              Van

                              • 27. Re: Twitter VDB
                                divadatabase

                                Hi Van,

                                 

                                I've already set my Environmental Variable M2_HOME to C:\Teiid 8.3\Maven\apache-maven-3.0.5\bin.

                                 

                                cd into the simpleclient quickstart (cd simpleclient/ ) - from where?

                                 

                                Do I have to put my Maven directory inside of my simpleclient directory, or vice versa?

                                 

                                Thanks,

                                Danah

                                • 28. Re: Twitter VDB
                                  van.halbert

                                  Danah,

                                   

                                  open a terminal window and change the directory to the simpleclient directory (ex:  cd {path}/simpleclient ).  Once in that directory, now run:

                                  mvn install -Dvdb=twitter -Dsql="select * from tweet where query='jboss'"

                                   

                                  If maven is in your PATH, it should execute "mvn" and pass in the arguments:  install -Dvdb=twitter -Dsql="select * from tweet where query='jboss'"

                                   

                                  Van

                                  • 29. Re: Twitter VDB
                                    divadatabase

                                    Hi Van,

                                     

                                    I did exactly what you said, and I got this error:

                                     

                                    C:\Teiid 8.3\JBoss\standalone\simpleclient>mvn install -Dvdb=twitter -Dsql="sele

                                    ct * from tweet where query='jboss'"

                                     

                                    'mvn' is not recognized as an internal or external command,

                                    operable program or batch file.