7 Replies Latest reply on Apr 8, 2015 4:07 AM by govindaraj s

    Teiid JDBC connection fails from Teiid Designer8.5

    Rajni Kumari Newbie

      I am using EAP 6.1 Alpha with Teiid 8.7 final, I have deployed a static MySql VDB. Able to make a Teiid JDBC connection through Squirrel Client.

      SquirrelConectionSuccessfull.PNG

      Now When I try to create a Teiid JDBC connection through TeiidDesigner8.5, I getting following exception:

      TeiidConnectionDesigner.PNG

         EXCEPTION:

      java.lang.Exception: The teiid driver failed to connect to jdbc:teiid:Sample@mm://localhost:31000;version=1 with the given username and password

        at org.teiid.datatools.connectivity.TeiidJDBCConnection.connect(TeiidJDBCConnection.java:45)

        at org.teiid.datatools.connectivity.TeiidJDBCConnection.createConnection(TeiidJDBCConnection.java:121)

        at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)

        at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)

        at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:96)

        at org.teiid.datatools.connectivity.TeiidJDBCConnectionFactory.createConnection(TeiidJDBCConnectionFactory.java:23)

        at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)

        at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)

        at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)

        at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)

        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

      Caused by: java.sql.SQLException: org.teiid.net.socket.SingleInstanceCommunicationException: TEIID20020 Error establishing socket to host and port: localhost:31000. Reason: Connection refused: connect

        at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:49)

        at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:120)

        at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:1)

        at org.teiid.datatools.connectivity.TeiidJDBCConnection.connect(TeiidJDBCConnection.java:41)

        ... 10 more

      Caused by: org.teiid.net.socket.SingleInstanceCommunicationException: TEIID20020 Error establishing socket to host and port: localhost:31000. Reason: Connection refused: connect

        at org.teiid.net.socket.SocketServerConnection.selectServerInstance(SocketServerConnection.java:161)

        at org.teiid.net.socket.SocketServerConnection.<init>(SocketServerConnection.java:95)

        at org.teiid.net.socket.SocketServerConnectionFactory.getConnection(SocketServerConnectionFactory.java:318)

        at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:47)

        ... 13 more

       

      The Default JDBC Teiid driver uses org.teiid.runtime.client_8.5.0.Final-v20140616-1350-B2658.jar that comes with the TeiidDesigner.

      default Teiid JDBC jar in Designer8.5.PNG

      I am not sure why I am getting exception from the TeiidDesigner8.5? Is there any issue with Teiid Driver that TeiidDesigner provides?

        • 1. Re: Teiid JDBC connection fails from Teiid Designer8.5
          Ramesh Reddy Master

          Is server running on the same machine? If Yes, is it running externally from Designer? if yes, then make sure your configuration in Designer correctly set to go the server running external to the Designer. Also, if you think the driver is the one which is wrong, you can always add a TeiidDriver manually and use that.

          • 2. Re: Teiid JDBC connection fails from Teiid Designer8.5
            Rajni Kumari Newbie

            Yes, server running on the same machine and is running externally from designer.

             

            I looked into the sever.log, following are the exception that we get when we try to make a Teiid connection from Designer:

             

            7 ERROR [org.teiid.TRANSPORT] (New I/O worker #6) TEIID40114 Unhandled exception, closing client instance: 2: java.lang.ArrayIndexOutOfBoundsException: 2

              at org.teiid.net.socket.Handshake.readExternal(Handshake.java:113) [teiid-client-8.7.0.Final.jar:8.7.0.Final]

              at java.io.ObjectInputStream.readExternalData(Unknown Source) [rt.jar:1.7.0_60]

              at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) [rt.jar:1.7.0_60]

              at java.io.ObjectInputStream.readObject0(Unknown Source) [rt.jar:1.7.0_60]

              at java.io.ObjectInputStream.readObject(Unknown Source) [rt.jar:1.7.0_60]

              at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:116) [teiid-runtime-8.7.1.Final.jar:8.7.0.Final]

              at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.6.2.Final.jar:]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_60]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_60]

              at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_60]

             

            If I manually changed the Teiid driver to use Teiid 8.7 jar, then it works for me. But I am interested in getting it to work by first method i.e. using default driver. Is there any other way by which I can do that ?

            • 3. Re: Teiid JDBC connection fails from Teiid Designer8.5
              Ramesh Reddy Master

              That tells me that you are not using the Designer version that is not fully compatible with Teiid Server. I believe Designer 9.0 works with Teiid Server 8.7.

              • 4. Re: Teiid JDBC connection fails from Teiid Designer8.5
                Barry LaFond Master

                See Older Downloads - JBoss Community for details on Teiid Designer/Teiid/JBDS compatibility.

                 

                In 9.1 we'll be relaxing the hard Teiid version constraint so you could try and connect to a newer Teiid server version that hasn't been fully integrated or tested in Designer.

                 

                Barry

                Teiid Designer Team

                • 5. Re: Teiid JDBC connection fails from Teiid Designer8.5
                  Akshay Harale Newbie

                  Hello Ramesh/ Barry,

                   

                  We downloaded new version of eclipse and installed teiid drsigner 9.0. With newer version we are able to ping the teiid 8.7 server jdbc connection. But while importing the data model we getting the following error message: Unable to create connection configuration to store in model. See log details.

                  teiid jdbc import.png

                  In log file we are getting following exception :

                  !ENTRY org.teiid.designer.jdbc.ui 4 0 2015-04-07 20:27:57.612

                  !MESSAGE For input string: "x"

                  !STACK 0

                  java.lang.NumberFormatException: For input string: "x"

                    at java.lang.NumberFormatException.forInputString(Unknown Source)

                    at java.lang.Integer.parseInt(Unknown Source)

                    at java.lang.Integer.parseInt(Unknown Source)

                    at org.teiid.jdbc.TeiidDriver.getMajorVersion(TeiidDriver.java:153)

                    at org.teiid.jdbc.DatabaseMetaDataImpl.getDatabaseProductVersion(DatabaseMetaDataImpl.java:705)

                    at org.teiid.designer.jdbc.metadata.impl.JdbcDatabaseImpl.loadDatabaseInfo(JdbcDatabaseImpl.java:422)

                  • 7. Re: Teiid JDBC connection fails from Teiid Designer8.5
                    govindaraj s Novice

                    Use the teiid jdbc 8.7 instead of using teiid jdbc 8.5, because your teiid version is 8.7 so it support teiid jdbc 8.7 to connect VDB

                     

                    download the teiid-8.7.0.Final-jdbc.jar from http://sourceforge.net/projects/teiid/files/teiid/8.7/Final/

                     

                    update the teiid driver jar under the "Edit Driver Definition" of the teiid in the eclipse database development, now try to connect VDB, i hope it will connect without any issue

                     

                     

                     

                    Thanks

                    Govindaraj s.