9 Replies Latest reply: Jul 19, 2012 6:39 PM by Ted Jones RSS

    REST service

    Mónica L.A. Newbie

      I've published a procedure on a VIEW model using a REST service by functionality TEIID Designer (Generate REST EasyWay). When called from Jquery to any of these services in a row I get problems like: [CachedConnectionManager] Closing a connection for you. Please close Them Yourself: org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJD

      K5 @ 66430557 java.lang.Throwable: StackTrace: unable to Obtain and lock in 60 seconds-.

      Please, could you help me ?

      Thanks,

      Mónica

        • 1. Re: REST service
          Ramesh Reddy Master

          Monica,

           

          You are calling a Rest web service designed on top of Teiid virtual procedure using JQuery. So, where are you seeing these errors in the server log or client? If possible can you attach a sample VDB and WAR for testing?

           

          Thanks


          Ramesh..

          • 2. Re: REST service
            Ted Jones Expert

            Monica,

             

            Try adding this to your VDB's *-ds.xml file: <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>

             

            Thanks,

            Ted

            • 3. Re: REST service
              Mónica L.A. Newbie

              I've done what you mention before but the results are the same. I've attached the logs to see if you can help out me. And the war  https://community.jboss.org/wiki/EnriquecimientoBusquedaDatawar. Thanks a lot !.

               

              2012-07-18 18:37:03,250 WARNING [org.teiid.rest] (http-127.0.0.1-8888-8) Error in invoke of TeiidWSProvider for procedureLocationREST.getDataLocation

              2012-07-18 18:37:03,250 WARNING [org.teiid.rest] (http-127.0.0.1-8888-4) Error in invoke of TeiidWSProvider for procedureLocationREST.getDataLocation

              2012-07-18 18:37:03,260 SEVERE [org.teiid.rest] (http-127.0.0.1-8888-3) Exception in execute: {0}

              java.lang.Throwable: java.sql.SQLException: The statement is closed.

                        at org.teiid.rest.services.TeiidRSProvider.execute(TeiidRSProvider.java:124)

                        at org.teiid.rest.services.LocationREST.getDataLocation(LocationREST.java:72)

                        at sun.reflect.GeneratedMethodAccessor772.invoke(Unknown Source)

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

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

                        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)

                        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)

                        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

                        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

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

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

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

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

              Caused by: java.sql.SQLException: The statement is closed.

                        at org.jboss.resource.adapter.jdbc.WrappedStatement.checkState(WrappedStatement.java:888)

                        at org.jboss.resource.adapter.jdbc.WrappedStatement.getResultSet(WrappedStatement.java:514)

                        at org.teiid.rest.services.TeiidRSProvider.execute(TeiidRSProvider.java:98)

                        ... 35 more

              2012-07-18 18:37:03,270 INFO  [org.jboss.resource.connectionmanager.TxConnectionManager] (http-127.0.0.1-8888-3) throwable from unregister connection

              java.lang.IllegalStateException: Trying to return an unknown connection2! org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@3fa47379

                        at org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:330)

                        at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionClosed(TxConnectionManager.java:720)

                        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHandle(BaseWrapperManagedConnection.java:362)

                        at org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnection.java:155)

                        at org.teiid.rest.services.TeiidRSProvider.execute(TeiidRSProvider.java:134)

                        at org.teiid.rest.services.LocationREST.getDataLocation(LocationREST.java:72)

                        at sun.reflect.GeneratedMethodAccessor772.invoke(Unknown Source)

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

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

                        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)

                        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)

                        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

                        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

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

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

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

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

              2012-07-18 18:37:03,260 SEVERE [org.teiid.rest] (http-127.0.0.1-8888-8) Exception in execute: {0}

              java.lang.Throwable: javax.ws.rs.WebApplicationException

                        at org.teiid.rest.services.TeiidRSProvider.execute(TeiidRSProvider.java:129)

                        at org.teiid.rest.services.LocationREST.getDataLocation(LocationREST.java:72)

                        at sun.reflect.GeneratedMethodAccessor772.invoke(Unknown Source)

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

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

                        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)

                        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)

                        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

                        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

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

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

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

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

              Caused by: javax.ws.rs.WebApplicationException

                        at org.teiid.rest.services.TeiidRSProvider.createWebApplicationException(TeiidRSProvider.java:168)

                        at org.teiid.rest.services.TeiidRSProvider.execute(TeiidRSProvider.java:113)

                        ... 35 more

              2012-07-18 18:37:03,280 WARN  [org.jboss.resteasy.core.SynchronousDispatcher] (http-127.0.0.1-8888-3) failed to execute

              javax.ws.rs.WebApplicationException

                        at org.teiid.rest.services.TeiidRSProvider.createWebApplicationException(TeiidRSProvider.java:168)

                        at org.teiid.rest.services.TeiidRSProvider.execute(TeiidRSProvider.java:125)

                        at org.teiid.rest.services.LocationREST.getDataLocation(LocationREST.java:72)

                        at sun.reflect.GeneratedMethodAccessor772.invoke(Unknown Source)

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

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

                        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)

                        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)

                        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

                        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

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

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

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

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

              2012-07-18 18:37:03,260 SEVERE [org.teiid.rest] (http-127.0.0.1-8888-4) Exception in execute: {0}

              java.lang.Throwable: javax.ws.rs.WebApplicationException

                        at org.teiid.rest.services.TeiidRSProvider.execute(TeiidRSProvider.java:129)

                        at org.teiid.rest.services.LocationREST.getDataLocation(LocationREST.java:72)

                        at sun.reflect.GeneratedMethodAccessor772.invoke(Unknown Source)

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

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

                        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)

                        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)

                        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

                        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

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

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

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

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

              Caused by: javax.ws.rs.WebApplicationException

                        at org.teiid.rest.services.TeiidRSProvider.createWebApplicationException(TeiidRSProvider.java:168)

                        at org.teiid.rest.services.TeiidRSProvider.execute(TeiidRSProvider.java:113)

                        ... 35 more

              2012-07-18 18:37:03,290 INFO  [org.jboss.resource.connectionmanager.CachedConnectionManager] (http-127.0.0.1-8888-3) Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@1125cb97

              java.lang.Throwable: STACKTRACE

                        at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:278)

                        at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:524)

                        at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)

                        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)

                        at org.teiid.rest.services.TeiidRSProvider.execute(TeiidRSProvider.java:78)

                        at org.teiid.rest.services.LocationREST.getDataLocation(LocationREST.java:72)

                        at sun.reflect.GeneratedMethodAccessor772.invoke(Unknown Source)

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

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

                        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)

                        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)

                        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

                        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

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

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

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

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

              2012-07-18 18:37:03,280 WARN  [org.jboss.resteasy.core.SynchronousDispatcher] (http-127.0.0.1-8888-8) failed to execute

              javax.ws.rs.WebApplicationException

                        at org.teiid.rest.services.TeiidRSProvider.createWebApplicationException(TeiidRSProvider.java:168)

                        at org.teiid.rest.services.TeiidRSProvider.execute(TeiidRSProvider.java:130)

                        at org.teiid.rest.services.LocationREST.getDataLocation(LocationREST.java:72)

                        at sun.reflect.GeneratedMethodAccessor772.invoke(Unknown Source)

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

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

                        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)

                        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)

                        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)

                        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)

                        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)

                        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)

                        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)

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

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

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

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

              • 4. Re: REST service
                Ramesh Reddy Master

                Monica,

                 

                Looks like you may be running JBoss AS with JDK 1.5, can you check? if it is can you run using the JDK 1.6? I see the code properly closing the connection after its use.

                 

                Ramesh..

                • 5. Re: REST service
                  Mónica L.A. Newbie

                  No, I'm using jdk1.6.0_25

                  • 6. Re: REST service
                    Ted Jones Expert

                    Monica,

                     

                    Another thought here... make sure the JNDI name you are using in the REST war generation is the connection to the VDB, not the underlying data source. You should have created a data source for the VDB and used this JNDI name in the REST war generation. You can do this from Designer in the Teiid view by right-clicking on the deloyed VDB and selecting "Create Data Source".

                     

                    Thanks,

                    Ted

                    • 7. Re: REST service
                      Mónica L.A. Newbie

                      I've tried what you've told me (although I'd created a DS for VBD before, because it had returned errors) but still the same. It's extrange, it's something wih the webservices calls concurrency. When I call in row the webservices from JQUERY with alerts to allow time there's no problem. If I remove the alerts, a 500 http respond is returned for the majority of the calls.

                      • 8. Re: REST service
                        Ramesh Reddy Master

                        Monica,

                         

                        I do not understand the RESTEasy semantics, but Teiid uses the RESTEasy framework underneath to provide this functionality. On second look at the code that is generated for your service, I see that it makes use of attributes in the RESTEasy class. One of them is the Connection to the Teiid. In JEE model the there will be a single instance of Servlet class and it *shoud not* share any state across multiple invocations, and I believe the current generated code is sharing state, thus the issues you are seeing.

                         

                        I will double check, meanwhile can you open a Teiid Designer JIRA for this?

                         

                        Thanks


                        Ramesh..

                        • 9. Re: REST service
                          Ted Jones Expert

                          Monica,

                           

                          I logged and fixed https://issues.jboss.org/browse/TEIIDDES-1455. This may have been the cause of the issue you are seeing. If you can attach your artifacts to this Jira and outline what you are doing, I will verify.

                           

                          Thanks,

                          Ted