1 2 Previous Next 15 Replies Latest reply on Aug 2, 2012 6:26 PM by Manan Patel

    Incorrect syntax near '.'

    Manan Patel Newbie

      Hello,

      I am using jboss-5.1.0.GA-jdk6, teiid-7.7.0.Final-jboss-dist, jbossws-cxf-3.2.2.GA (server side) and Eclipse Juno & teiid_designer-7.7.0.v20120410-1918-H1074-Final for designer.

       

      I am trying to setup Teiid web service – where I have successfully configured view and can successfully test web service views in Teiid Designer. However, when I package jbossws-cxf war and deploy on Jboss-AS, I keep getting below error when I test my API via SOAP UI-

       

      13:43:22,914 SEVERE [soap] Exception in executeDataservice: {0}

      1. java.lang.Throwable: java.sql.SQLException: Incorrect syntax near '.'.

              at org.teiid.soap.provider.TeiidWSProvider.execute(TeiidWSProvider.java:

       

      I have attached ware file: BooksWebServiceVDB.war


      I would appreciate your help.

        • 1. Re: Incorrect syntax near '.'
          Ramesh Reddy Master

          Can you provide whole stack?

          • 2. Re: Incorrect syntax near '.'
            Manan Patel Newbie

            ============================================================================

             

             

            16:22:39,228 INFO  [STDOUT] [/BooksWebServiceVDB/Books, {http://teiid.org}Books,

            [MessageInfo INPUT: {http://teiid.org}Books_getBooksByISBN_ISBN], {content-type

            =[text/xml;charset=UTF-8], connection=[Keep-Alive], host=[localhost:8080], Conte

            nt-Length=[253], SOAPAction=[""], user-agent=[Apache-HttpClient/4.1.1 (java 1.5)

            ], accept-encoding=[gzip,deflate], Content-Type=[text/xml;charset=UTF-8]}, {http

            ://teiid.org}Books, org.apache.catalina.connector.RequestFacade@64712baa, org.ap

            ache.catalina.core.StandardWrapperFacade@41e9d96a, null, null, [], /BooksWebServ

            iceVDBhttp://localhost:8080/BooksWebServiceVDB/Books, /BooksWebServiceVDBnull, {

            http://teiid.org}BooksWebServiceVDB, POST, [org.apache.cxf.transport.https.CertC

            onstraintsInterceptor@5fc0dff4], UTF-8, null, org.jboss.wsf.stack.cxf.HttpServle

            tResponseExt@7ea90d2e, org.apache.cxf.transport.http.AbstractHTTPDestination$1@c

            a087f9, true, {http://teiid.org}getBooksByISBN, false, org.apache.cxf.transport.

            servlet.ServletDestination@b930359, {}, http://localhost:8080/BooksWebServiceVDB

            /Books?wsdl, text/xml;charset=UTF-8, org.apache.catalina.core.ApplicationContext

            Facade@60c0cdfe]

            16:22:39,671 SEVERE [soap] Exception in executeDataservice: {0}

            java.lang.Throwable: java.sql.SQLException: Incorrect syntax near '.'.

                    at org.teiid.soap.provider.TeiidWSProvider.execute(TeiidWSProvider.java:

            194)

                    at org.teiid.soap.provider.TeiidWSProvider.invoke(TeiidWSProvider.java:3

            16)

                    at org.teiid.soap.provider.Books.invoke(Books.java:22)

                    at org.teiid.soap.provider.Books.invoke(Books.java:15)

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

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

            java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

            sorImpl.java:25)

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

                    at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Abst

            ractInvoker.java:173)

                    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker

            .java:89)

                    at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.jav

            a:60)

                    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker

            .java:75)

                    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInv

            okerInterceptor.java:58)

                    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44

            1)

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

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

                    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecu

            tor.java:37)

                    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Se

            rviceInvokerInterceptor.java:106)

                    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept

            orChain.java:236)

                    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti

            ationObserver.java:109)

                    at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes

            tination.java:98)

                    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(

            ServletController.java:394)

                    at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletController

            Ext.java:175)

                    at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestH

            andlerImpl.java:61)

                    at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:194)

                    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Ab

            stractHTTPServlet.java:179)

                    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractH

            TTPServlet.java:103)

                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

                    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(Abstract

            HTTPServlet.java:159)

                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

            icationFilterChain.java:290)

                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

            ilterChain.java:206)

                    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi

            lter.java:96)

                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

            icationFilterChain.java:235)

                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

            ilterChain.java:206)

                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV

            alve.java:235)

                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV

            alve.java:191)

                    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit

            yAssociationValve.java:190)

                    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv

            e.java:92)

                    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce

            ss(SecurityContextEstablishmentValve.java:126)

                    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok

            e(SecurityContextEstablishmentValve.java:70)

                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j

            ava:127)

                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j

            ava:102)

                    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC

            onnectionValve.java:158)

                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal

            ve.java:109)

                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav

            a:330)

                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java

            :829)

                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce

            ss(Http11Protocol.java:598)

                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44

            7)

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

            Caused by: java.sql.SQLException: Incorrect syntax near '.'.

                    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.j

            ava:368)

                    at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)

                    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)

                    at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)

                    at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.

            java:584)

                    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java

            :546)

                    at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.execute(JtdsPreparedS

            tatement.java:558)

                    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.execute(Wrap

            pedPreparedStatement.java:299)

                    at org.teiid.soap.provider.TeiidWSProvider.execute(TeiidWSProvider.java:

            124)

                    ... 48 more

            16:22:39,719 WARNING [PhaseInterceptorChain] Application has thrown exception, u

            nwinding now

            org.apache.cxf.binding.soap.SoapFault: Incorrect syntax near '.'.

                    at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJ

            AXWSMethodInvoker.java:75)

                    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker

            .java:121)

                    at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.jav

            a:60)

                    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker

            .java:75)

                    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInv

            okerInterceptor.java:58)

                    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44

            1)

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

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

                    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecu

            tor.java:37)

                    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Se

            rviceInvokerInterceptor.java:106)

                    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept

            orChain.java:236)

                    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti

            ationObserver.java:109)

                    at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes

            tination.java:98)

                    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(

            ServletController.java:394)

                    at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletController

            Ext.java:175)

                    at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestH

            andlerImpl.java:61)

                    at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:194)

                    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Ab

            stractHTTPServlet.java:179)

                    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractH

            TTPServlet.java:103)

                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

                    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(Abstract

            HTTPServlet.java:159)

                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

            icationFilterChain.java:290)

                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

            ilterChain.java:206)

                    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi

            lter.java:96)

                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

            icationFilterChain.java:235)

                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

            ilterChain.java:206)

                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV

            alve.java:235)

                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV

            alve.java:191)

                    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit

            yAssociationValve.java:190)

                    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv

            e.java:92)

                    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce

            ss(SecurityContextEstablishmentValve.java:126)

                    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok

            e(SecurityContextEstablishmentValve.java:70)

                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j

            ava:127)

                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j

            ava:102)

                    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC

            onnectionValve.java:158)

                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal

            ve.java:109)

                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav

            a:330)

                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java

            :829)

                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce

            ss(Http11Protocol.java:598)

                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44

            7)

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

            Caused by: java.lang.RuntimeException: javax.xml.ws.soap.SOAPFaultException: Inc

            orrect syntax near '.'.

                    at org.teiid.soap.provider.TeiidWSProvider.invoke(TeiidWSProvider.java:3

            18)

                    at org.teiid.soap.provider.Books.invoke(Books.java:22)

                    at org.teiid.soap.provider.Books.invoke(Books.java:15)

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

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

            java:39)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

            sorImpl.java:25)

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

                    at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Abst

            ractInvoker.java:173)

                    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker

            .java:89)

                    ... 39 more

            Caused by: javax.xml.ws.soap.SOAPFaultException: Incorrect syntax near '.'.

                    at org.teiid.soap.provider.TeiidWSProvider.createSOAPFaultMessage(TeiidW

            SProvider.java:248)

                    at org.teiid.soap.provider.TeiidWSProvider.execute(TeiidWSProvider.java:

            201)

                    at org.teiid.soap.provider.TeiidWSProvider.invoke(TeiidWSProvider.java:3

            16)

                    ... 47 more

            • 3. Re: Incorrect syntax near '.'
              Ramesh Reddy Master

              Are there any exceptions on the Server log? you may need to put server in DEBUG mode to see whole stack in case of an error.

              • 4. Re: Incorrect syntax near '.'
                Ted Jones Master

                Manan,

                 

                Can you please attach the *-ds.xml file that defines the JNDI name of BooksWebServiceVDB?

                 

                Thanks,

                Ted

                • 6. Re: Incorrect syntax near '.'
                  Ted Jones Master

                  Manan,

                   

                  The issue is you are connecting the the underlying data source, not the VDB. You need to creata a -ds.xml for your VDB and then use that JNDI name in the WAR generation.

                   

                  Thanks,

                  Ted

                  • 7. Re: Incorrect syntax near '.'
                    Manan Patel Newbie

                    Thanks Ted.

                     

                    Any specific help or pointer on this. I have been following example and instruction where it says:

                    1) deploy the VDB.

                    2) from Teiid view, right click to create Data Source.

                    3) I entered some name "BooksWebServiceVDBDataSource"

                    4) Then I select to package war and I enter "BooksWebServiceVDBDataSource" in the JNDI entry.

                     

                    Any thing wrong with above?

                     

                    thx

                    • 8. Re: Incorrect syntax near '.'
                      Manan Patel Newbie

                      Above 3) is the Create Data Source window in the Teiid Designer -

                      Here, in the Connection Source section -  i have 2 options

                      I select 2nd option - Use Connection Profile Info:  I have choice of the physical source connection only -

                      although, I can create new but new connection to where?

                      So I kept selecting the existing conenction to which is also used for my Relation model.

                       

                       

                      Regards,

                      • 9. Re: Incorrect syntax near '.'
                        Ted Jones Master

                        Manan,

                         

                        In the Teiid view, right click on your deployed VDB (under the VDB section) and select "Create Data Source". Create a new Connection Profile of type "Teiid". This will allow you to define your VDB connection properties and create the -ds.xml file.

                         

                        Thanks,

                        Ted

                        • 10. Re: Incorrect syntax near '.'
                          Manan Patel Newbie

                          Now I tried to create new connection source first in the Data Source Explorer - > Web Service Data Source - with my WSDL url, and used that data source profile while generating war.

                           

                          i get below error.

                           

                           

                          <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

                             <soap:Body>

                                <soap:Fault>

                                   <faultcode>soap:Server</faultcode>

                                   <faultstring>org.teiid.resource.spi.WrappedConnectionFactory cannot be cast to javax.sql.DataSource</faultstring>

                                </soap:Fault>

                             </soap:Body>

                          </soap:Envelope>

                          • 11. Re: Incorrect syntax near '.'
                            Ted Jones Master

                            Yeah.. that won't work. The JNDI connection has to be for the deployed VDB. Then use that JNDI name for the generated WAR. The war is not connecting *to* a web service, it is connecting to the VDB with the web service models in it *from* a web service. Make sense?

                            • 12. Re: Incorrect syntax near '.'
                              Manan Patel Newbie

                              yes.. I got the webservice connection working now. The trick is to select VDB connection as Teiid connection type in the datasource connection window.

                               

                              Now, I got different set of problems (if you could shed some light on it).

                               

                              I followed an example where -

                              1. I have Relational Model - (connecting to the database)

                              2. View Model  -  to join 2 tables together

                              3. xml docs to define input parameter and output of the webservice

                              4. webservice interface/operation

                               

                              now, I am calling an operation with parameter - and it seems like the parameter is ignored.  instead of returning selective data, it returns matching data so many times.

                              for example - it returns matching book element about 50 times.

                               

                              My Operation Procedure looks like this:

                               

                              CREATE VIRTUAL PROCEDURE

                              BEGIN

                                        DECLARE string VARIABLES.IN_ISBNInput = xpathvalue(BooksWebSvc.Books.getBooksByISBN.ISBNInput, '/*:ISBNInput');

                                        SELECT DISTINCT * FROM BooksDoc.BooksResultDocument WHERE BooksDoc.BooksResultDocument.BooksResult.Books.ISBN = VARIABLES.IN_ISBNInput;

                              END

                              • 13. Re: Incorrect syntax near '.'
                                Manan Patel Newbie

                                One of operations which does not have any paramters (for getAllBooks), ends up with following errors as it does not have any parameters.

                                 

                                <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

                                   <soapenv:Header/>

                                   <soapenv:Body/>

                                </soapenv:Envelope>

                                 

                                 

                                <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

                                   <soap:Body>

                                      <soap:Fault>

                                         <faultcode>soap:Client</faultcode>

                                         <faultstring>Remote org.teiid.api.exception.query.QueryParserException: Parsing error: Encountered "(" at line 1, column 6.

                                Was expecting:

                                    &lt;ID> ...</faultstring>

                                      </soap:Fault>

                                   </soap:Body>

                                </soap:Envelope>

                                • 14. Re: Incorrect syntax near '.'
                                  Ted Jones Master

                                  Manan,

                                   

                                  Not sure what is going on there. If you would like to attach your model project set (File->Export->Teiid Designer->Model Project Set) I will take a look.

                                   

                                  Thanks,

                                  Ted

                                  1 2 Previous Next