2 Replies Latest reply on Mar 8, 2011 12:05 AM by Ramesh Reddy

    Teiid issue

    allen li Newbie

      Hi all,

       

                We met an issue when using java code to connect Teiid server sometimes.

      I used Teiid 7.2 as my server.

      Below is Teiid sever log.

       

      2011-03-07 16:15:35,488 WARNING [org.teiid.jdbc] (http-16.173.232.177-8080-6) Error trying to execute a statement select item0_.ITM_ID as col_0_0_, item0_.ITM_TITLE as col_1_0_, item0_.SOURCE_NAME as col_2_0_ from ITEM item0_.

      org.teiid.jdbc.TeiidSQLException: [TeiidComponentException]The specified session ID "tNeqwUoGC0om" is invalid. It cannot be found in the userbase.

      1 [InvalidSessionException]The specified session ID "tNeqwUoGC0om" is invalid. It cannot be found in the userbase.

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

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

          at org.teiid.jdbc.StatementImpl.sendRequestMessageAndWait(StatementImpl.java:917)

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

          at org.teiid.jdbc.PreparedStatementImpl.executeQuery(PreparedStatementImpl.java:214)

          at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)

          at org.hibernate.loader.Loader.getResultSet(Loader.java:1849)

          at org.hibernate.loader.Loader.doQuery(Loader.java:718)

          at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)

          at org.hibernate.loader.Loader.doList(Loader.java:2294)

          at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)

          at org.hibernate.loader.Loader.list(Loader.java:2167)

          at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)

          at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)

          at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)

          at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)

          at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)

          at com.hp.mwm.contentmgr.dao.ContentMgrWorkspaceDAO.searchItemInWS(ContentMgrWorkspaceDAO.java:1156)

          at com.hp.mwm.contentmgr.workspace.ContentMgrWSHandler.getIteminWorkspace(ContentMgrWSHandler.java:204)

          at com.hp.mwm.contentmgr.ui.ContentMgrUIInterface.getIteminWorkspace(ContentMgrUIInterface.java:329)

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

          at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:418)

          at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)

          at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1400)

          at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:1005)

          at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:103)

          at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)

          at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)

          at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)

          at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:166)

          at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:291)

          at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:353)

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

      Caused by: java.util.concurrent.ExecutionException: [TeiidComponentException]The specified session ID "tNeqwUoGC0om" is invalid. It cannot be found in the userbase.

      1 [InvalidSessionException]The specified session ID "tNeqwUoGC0om" is invalid. It cannot be found in the userbase.

          at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.convertResult(SocketServerInstanceImpl.java:319)

          at org.teiid.client.util.ResultsFuture.get(ResultsFuture.java:116)

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

          at org.teiid.jdbc.StatementImpl.sendRequestMessageAndWait(StatementImpl.java:915)

          ... 53 more

      Caused by: [TeiidComponentException]The specified session ID "tNeqwUoGC0om" is invalid. It cannot be found in the userbase.

      1 [InvalidSessionException]The specified session ID "tNeqwUoGC0om" is invalid. It cannot be found in the userbase.

          at org.teiid.client.util.ExceptionUtil.convertException(ExceptionUtil.java:66)

          at org.teiid.jboss.deployers.RuntimeEngineDeployer$2.invoke(RuntimeEngineDeployer.java:303)

          at $Proxy220.executeRequest(Unknown Source)

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

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

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

          at org.teiid.transport.ServerWorkItem.run(ServerWorkItem.java:81)

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

          at org.teiid.transport.SocketClientInstance.processMessagePacket(SocketClientInstance.java:160)

          at org.teiid.transport.SocketClientInstance.receivedMessage(SocketClientInstance.java:149)

          at org.teiid.transport.SSLAwareChannelHandler.messageReceived(SSLAwareChannelHandler.java:210)

          at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)

          at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)

          at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)

          at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:144)

          at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)

          at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)

          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)

          at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317)

          at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)

          at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216)

          at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)

          at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)

          at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)

          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)

          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)

          at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)

          at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:281)

          at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:201)

          at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)

          at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)

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

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

          ... 1 more

      Caused by: [InvalidSessionException]The specified session ID "tNeqwUoGC0om" is invalid. It cannot be found in the userbase.

          at org.teiid.services.SessionServiceImpl.getSessionInfo(SessionServiceImpl.java:310)

          at org.teiid.services.SessionServiceImpl.validateSession(SessionServiceImpl.java:299)

          at org.teiid.jboss.deployers.RuntimeEngineDeployer$2.invoke(RuntimeEngineDeployer.java:296)

          ... 32 more

       

      How to fix this issue?

       

      Thanks.

        • 1. Teiid issue
          Ramesh Reddy Master

          Allen,

           

          May be your issue is similar to this? http://community.jboss.org/message/591588#591588

           

          Ramesh..

          • 2. Teiid issue
            Ramesh Reddy Master

            Allen,

             

            Each time a new JDBC connection is made, a session object is created, that represents the jdbc user + credentials +VDB + whole lot of other things. For the duration of this connection, the session is cached and validated with every SQL request. If for any reason the session is invalidated then you will see the issue you are seeing. These are possible causes for invalidation of session

             

            1) Communication link between client and server is broken.

            2) Max session time is reached (by default it is unlimited, so this may not be reason)

            3) Failure to send a ping by client (this is internal in the communication libraries, not exposed to end user, so may not be the reason)

            4) Server has been re-started.

            5) The VDB you currently have active connection to has been re-deployed on the server. When the same VDB is deployed, any active connections to the previously deployed VDB will be terminated/invalidated.

             

            Ramesh..