1 Reply Latest reply: May 22, 2014 3:15 PM by Jm-Oracle RSS

    unable to query a view (which is created from Studio application) through web service

    990990

      Lets assume i have a  "Base" collection / dataset in studio application

       

      Now  i have  created a view "GenderWiseTotal" in studio application with below Eql

      DEFINE GenderWiseTotal AS SELECT COUNT(1) AS "TOTAL" FROM "Base" GROUP BY "Gender"

       

      when i'm executing below  query through webservice then a error message is observed

      RETURN Res AS SELECT TOTAL AS TOTAL from GenderWiseTotal WHERE Gender='M'

       

      Actually "Base" was defined  . Even i tried to remove "From" clause in "GenderWiseTotal" view , but studio application is not allowing me to do that .

       

      So how do i need to query the view which is created ? What is the query which i need to write inorder to query the view

       

      SEVERE: Error while invoking endpoint "http://localhost:7001/endeca-server/ws/conversation/multitest" from client

      FAILED: testEQLSearch

      java.lang.Exception: Error contacting the database at url http://localhost:7001/endeca-server/ws/conversation/multitest: exception encountered while executing external function 'internal:navigation-query', caused by error endeca-err:MDEX0001 : Invalid input : Error in EQL Query: <eql_parser_types:queryWrapper xmlns:eql_parser_types="http://www.endeca.com/MDEX/eql_parser/types" xmlns:mdex="http://www.endeca.com/MDEX/XQuery/2009/09" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="eql_parser_types:Query"><ns2:statements xmlns:ns2="http://www.endeca.com/MDEX/eql_parser/types" returnTable="true" statementKey="Res"><ns2:selects xmlns="http://www.endeca.com/MDEX/conversation/3/0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" attributeKey="TOTAL"><ns2:expression xsi:type="ns2:AttributeRefExpression" attributeKey="TOTAL"/></ns2:selects><ns2:from xmlns="http://www.endeca.com/MDEX/conversation/3/0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><ns2:source xsi:type="ns2:StatementSource" statementKey="GenderWiseTotal"/></ns2:from><ns2:where xmlns="http://www.endeca.com/MDEX/conversation/3/0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><ns2:filter xsi:type="ns2:ComparisonExpression" comparison="="><ns2:leftOperand xsi:type="ns2:AttributeRefExpression" attributeKey="Gender"/><ns2:rightOperand xsi:type="ns2:StringLiteral" value="M"/></ns2:filter></ns2:where></ns2:statements><ns2:statements xmlns:ns2="http://www.endeca.com/MDEX/eql_parser/types" returnTable="false" statementKey="GenderWiseTotal"><ns2:selects xmlns="http://www.endeca.com/MDEX/conversation/3/0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" attributeKey="TOTAL"><ns2:expression xsi:type="ns2:FunctionCallExpression" function="COUNT"><ns2:arguments xsi:type="ns2:IntegerLiteral" value="1"/></ns2:expression></ns2:selects><ns2:from xmlns="http://www.endeca.com/MDEX/conversation/3/0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><ns2:source xsi:type="ns2:StatementSource" statementKey="Base"/></ns2:from><ns2:group xmlns="http://www.endeca.com/MDEX/conversation/3/0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><ns2:groupingSetsList><ns2:groupingSetList xsi:type="ns2:GroupingSet"><ns2:groupBys xsi:type="ns2:GroupBy" attributeKey="Gender"/></ns2:groupingSetList></ns2:groupingSetsList></ns2:group></ns2:statements></eql_parser_types:queryWrapper> - In statement "GenderWiseTotal": FROM statement ("Base") is not defined

        at com.oracle.endeca.server.examples.ops.Query.execute(Query.java:206)

        at com.oracle.endeca.server.examples.integration_test.BasicTestCases.testEQLSearch(BasicTestCases.java:62)

        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:606)

        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)

        at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)

        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)

        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)

        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)

        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)

        at org.testng.TestRunner.privateRun(TestRunner.java:767)

        at org.testng.TestRunner.run(TestRunner.java:617)

        at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)

        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)

        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)

        at org.testng.SuiteRunner.run(SuiteRunner.java:240)

        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)

        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)

        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)

        at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)

        at org.testng.TestNG.run(TestNG.java:1057)

        at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)

        at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)

        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

       

      Thanks

      Dinesh