1 Reply Latest reply on Aug 1, 2010 1:19 PM by Ramesh Reddy Branched to a new discussion.

    Error connecting to Teiid(VDB) using JDBC

    Rakesh Balguri Expert

      Hi all,

       

      I am getting the following error connecting to Teiid (VDB) using JDBC.

       

      I am able to successfully connect to the VDB using the Designer.

       

      Jul 26, 2010 7:33:53 PM org.teiid.jdbc.SocketProfile connect
      SEVERE: Could not create connection
      com.metamatrix.common.comm.exception.SingleInstanceCommunicationException: Error establishing socket to host and port: localhost:31000. Reason: Connection refused: connect
          at com.metamatrix.common.comm.platform.socket.client.SocketServerConnection.selectServerInstance(SocketServerConnection.java:168)
          at com.metamatrix.common.comm.platform.socket.client.SocketServerConnection$ServerConnectionInvocationHandler.getTarget(SocketServerConnection.java:208)
          at com.metamatrix.common.comm.platform.socket.client.SocketServerConnection$ServerConnectionInvocationHandler.invoke(SocketServerConnection.java:218)
          at $Proxy20.logon(Unknown Source)
          at com.metamatrix.common.comm.platform.socket.client.SocketServerConnection.authenticate(SocketServerConnection.java:179)
          at com.metamatrix.common.comm.platform.socket.client.SocketServerConnection.<init>(SocketServerConnection.java:94)
          at com.metamatrix.common.comm.platform.socket.client.SocketServerConnectionFactory.createConnection(SocketServerConnectionFactory.java:262)
          at org.teiid.jdbc.SocketProfile.createConnection(SocketProfile.java:108)
          at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:92)
          at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:95)
          at java.sql.DriverManager.getConnection(Unknown Source)
          at java.sql.DriverManager.getConnection(Unknown Source)
          at com.ca.teiid.server.DBConnectorImpl.establishConnection(DBConnectorImpl.java:44)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
          at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
          at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
          at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
          at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
          at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
          at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
          at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
          at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
          at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
          at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
          at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
          at org.mortbay.jetty.Server.handle(Server.java:324)
          at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
          at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
          at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
          at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
          at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
          at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
          at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
      Caused by: java.net.ConnectException: Connection refused: connect
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(Unknown Source)
          at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
          at java.net.PlainSocketImpl.connect(Unknown Source)
          at java.net.SocksSocketImpl.connect(Unknown Source)
          at java.net.Socket.connect(Unknown Source)
          at java.net.Socket.connect(Unknown Source)
          at com.metamatrix.common.comm.platform.socket.client.OioOjbectChannelFactory.createObjectChannel(OioOjbectChannelFactory.java:190)
          at com.metamatrix.common.comm.platform.socket.client.SocketServerInstanceImpl.connect(SocketServerInstanceImpl.java:96)
          at com.metamatrix.common.comm.platform.socket.client.SocketServerConnectionFactory.getServerInstance(SocketServerConnectionFactory.java:226)
          at com.metamatrix.common.comm.platform.socket.client.SocketServerConnection.selectServerInstance(SocketServerConnection.java:145)
          ... 39 more

       

      Please suggest

       

      Thanks

      Rakesh.