8 Replies Latest reply on Jul 25, 2014 2:03 PM by gmackinnon

    TEIID40114 Unhandled exception, closing client instance: 2: java.lang.ArrayIndexOutOfBoundsException: 2

    gmackinnon

      This exception occurs when trying to import a JDBC data source. The connection profile looks right in terms of the connection string, and the user and password seem correct. A representative stack trace in the jboss server log is :

       

      15 Jul 2014 22:15:25,004 ERROR [org.teiid.TRANSPORT] (New I/O worker #8)  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.FinalCAFix-SNAPSHOT.jar:8.7.0.FinalCAFix-SNAPSHOT]

              at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1810) [rt.jar:1.7.0_03]

              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769) [rt.jar:1.7.0_03]

              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [rt.jar:1.7.0_03]

              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) [rt.jar:1.7.0_03]

              at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:114) [teiid-runtime-8.7.0.FinalCAFix-SNAPSHOT.jar:8.7.0.FinalCAFix-SNAPSHOT]

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

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

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

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

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

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

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

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

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

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]

              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]

       

      In the designer, the error message is that "the teiid driver failed to connect to teiid:jdbc:Chorus@mm:/localhost:31000 with the given user name and password".

       

      I can connect from, say, Squirrel and the Handshake.readExternal() call succeeds (this is using older teiid jdbc library - 8.1, I think).

       

      Thanks and Best Regards,

      Greg

        • 1. Re: TEIID40114 Unhandled exception, closing client instance: 2: java.lang.ArrayIndexOutOfBoundsException: 2
          gmackinnon

          Any thoughts on this?  I suspect this is a version issue where the designer is sending the wrong AuthenticationType to teiid 8.7 causing the Handshake.readExternal() call on the teiid side to throw the above exception.

          • 2. Re: TEIID40114 Unhandled exception, closing client instance: 2: java.lang.ArrayIndexOutOfBoundsException: 2
            shawkins

            It looks like you have a server with just the first commit from TEIID-2863, which allowed for 3 authentication types.  The subsequent change converted it back to two types.

            • 3. Re: TEIID40114 Unhandled exception, closing client instance: 2: java.lang.ArrayIndexOutOfBoundsException: 2
              gmackinnon

              Thanks, Steven. I looked at the AuthenticationType class in the the 8.7 teiid client jar we have and it defines two authentication types, userpassword and gss.  the eclipse plugin designer client 8.5  jar has an AuthenticationType class defining three authentication types. I've tried replacing the class in use on the designer side with a class that defines just two types. I get some inconsistent behavior where "ping" will work sometimes, sometime not, but invariably when I try to complete creating a jdbc connection in the wizard it fails what I describe in the initial entry in this thread (i.e., the out of bounds exception on the server side, which is consistent with the view that the designer is passing a type the server doesn't recognize, and the message on the designer side that the login can't be completed with the username / password used). 

              • 4. Re: TEIID40114 Unhandled exception, closing client instance: 2: java.lang.ArrayIndexOutOfBoundsException: 2
                gmackinnon

                I got around the AuthenticationType issue by building teiid designer 8.6 locally.  I can now connect to a teiid vdb instance. When I try to explore the data source in the Data Source Explorer I get :

                 

                An internal error occurred during: "Loading Core provider".

                java.lang.NullPointerException

                 

                Thoughts?

                 

                Thanks and Best Regards,

                Greg

                • 5. Re: TEIID40114 Unhandled exception, closing client instance: 2: java.lang.ArrayIndexOutOfBoundsException: 2
                  shawkins

                  > the eclipse plugin designer client 8.5  jar has an AuthenticationType class defining three authentication types

                   

                  So that is an issue with Designer.  Sounds like they picked up a non final version.

                   

                  > An internal error occurred during: "Loading Core provider".

                   

                  The Designer forums would be best.  You'd also want to check the workspace log for more information.

                  • 6. Re: TEIID40114 Unhandled exception, closing client instance: 2: java.lang.ArrayIndexOutOfBoundsException: 2
                    gmackinnon

                    Thanks, Steven. 

                     

                    Here is a representative stack trace :

                     

                     

                    !ENTRY org.eclipse.core.jobs 4 2 2014-07-24 15:34:22.685

                    !MESSAGE An internal error occurred during: "Loading Core provider".

                    !STACK 0

                    java.lang.NullPointerException

                      at org.eclipse.datatools.connectivity.sqm.internal.core.definition.isAuthorizationIdentifierSupported(DatabaseDefinitionImpl.java:2014)

                      at org.eclipse.datatools.connectivity.sqm.server.internal.ui.explorer.providers.content.layout.vnode.ServerExplorerVNodeContentProviderNav.displayDatabaseChildren(ServerExplorerVNodeContentProviderNav.java:391)

                      at org.eclipse.datatools.connectivity.sqm.server.internal.ui.explorer.providers.content.layout.AbstractOnDemandContentProviderNav.getChildren(AbstractOnDemandContentProviderNav.java:116)

                      at org.eclipse.datatools.connectivity.sqm.server.internal.ui.explorer.providers.content.layout.AbstractOnDemandContentProviderNav.getChildren(AbstractOnDemandContentProviderNav.java:239)

                      at org.eclipse.datatools.connectivity.sqm.server.internal.ui.explorer.providers.content.layout.AbstractLayoutProviderNav.getChildren(AbstractLayoutProviderNav.java:85)

                      at org.eclipse.datatools.connectivity.sqm.server.internal.ui.explorer.providers.content.impl.ServerExplorerContentProviderNav.load(ServerExplorerContentProviderNav.java:153)

                      at org.eclipse.datatools.connectivity.sqm.server.internal.ui.explorer.loading.LoadingJob.run(LoadingJob.java:43)

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

                     

                    This occurs right after a call is made to load the definition. 

                     

                    I see that the teiidDB.xmi model is packaged in the org.teiid.runtime.client JAR but I don't know at this juncture whether this alone is adequate.

                     

                    Thanks and Best Regards,

                    Greg

                    • 7. Re: TEIID40114 Unhandled exception, closing client instance: 2: java.lang.ArrayIndexOutOfBoundsException: 2
                      shawkins

                      > Sounds like they picked up a non final version.

                       

                      It was actually an attempt at compatibility that was not needed in their forked version of the Teiid logic.  Paul Richardson is now aware of this, but I don't have a JIRA to point to.

                       

                      > Here is a representative stack trace :

                       

                      Can you open a Teiid Designer JIRA with that?

                      • 8. Re: TEIID40114 Unhandled exception, closing client instance: 2: java.lang.ArrayIndexOutOfBoundsException: 2
                        gmackinnon

                        I'll open a Teiid Designer JIRA for the NPE described above.