8 Replies Latest reply on Aug 4, 2015 8:53 AM by Ramesh Reddy

    Logon Exception when trying first example

    Mylos Kathos Master

      Hi all!

      I'm trying my first steps with Teiid so I have depoyed the following mysql-vdb.xml:

      <vdb name="Portfolio" version="1">
          <description>The Portfolio Dynamic VDB</description>
          <property name="UseConnectorMetadata" value="true" />
          <model name="Accounts">
              <property name="importer.useFullSchemaName" value="false"/>
              <source name="mysql-connector" translator-name="translator-mysql" connection-jndi-name="java:/mysqlds"/>
          <translator name="translator-mysql" type="mysql">
              <property name="SupportsNativeQueries" value="true"/>

      Formerly I have deployed a datasource on Teiid bound to the JNDI name "java:/mysqlds".

      Now I'm trying to run a query against the VDB using the simple client:

      mvn install -Dvdb="Portfolio" -Dsql="select * from account"

      The following error is returned:

      18:14:47,070 WARN  [org.teiid.SECURITY] (New I/O worker #3) null TEIID40011 Processing exception 'TEIID40046 VDB "Portfolio" version "latest" does not exist.' f

      or session null.  Exception type org.teiid.client.security.LogonException thrown from org.teiid.services.SessionServiceImpl.getActiveVDB(SessionServiceImpl.java

      :240). Enable more detailed logging to see the entire stacktrace.


      I had a look at the JDBCClient and I can see it contains an username and password within it:

      public class JDBCClient {
        public static final String USERNAME = "teiid";
        public static final String PASSWORD = "Password1!";
        public static final String USERNAME_DEFAULT = "teiid";
        public static final String PASSWORD_DEFAULT = "Password1!";
      . . . .

      So I have added both a management user and an application user with that name however the problem persists. I'm stuck, anybody can help me?

      Thanks a lot


        • 1. Re: Logon Exception when trying first example
          Ramesh Reddy Master



          Welcome to Teiid community. We appreciate your interest in Teiid.


          First you want to check the server console or log file and make sure the VDB you deployed is deployed correctly. Check for message like "Portfolio.1 is ACTIVE". The VDB must exist in valid state before you can connect and execute. There may be other error message if it did not deployed in ACTIVE state. You can post them here for further analysis.


          Thank you.



          • 2. Re: Logon Exception when trying first example
            Mylos Kathos Master

            Thanks a lot for your kind reply Ramesh.

            I've found the following error when the VDB is deployed:

            14:33:22,602 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2)  JBAS014612: Operation ("full-replace-deployment") failed - ad
            dress: ([]) - failure description: {"JBAS014671: Failed services" => {"jboss.teiid.vdb.Portfolio.1" => "org.jboss.msc.service.StartException in service jboss.teiid.vdb.Portfolio.1: Failed to start service
                Caused by: java.lang.IllegalStateException: version not set"}}

            14:33:22,605 INFO  [org.teiid.RUNTIME.VDBLifeCycleListener] (MSC service thread 1-7)  TEIID40120 VDB Portfolio.1 will be removed from the repository

            It's not clear what version it's referring the log file. The VDB file has a version in the root element:

            <vdb name="Portfolio" version="1">

            Any idea ?

            Thank you very much

            • 3. Re: Logon Exception when trying first example
              Ramesh Reddy Master

              Looks like there is already previously installed VDB there, you need undeploy that one first.


              You can use web-console or CLI for that. Using CLI


              <jboss-eap>/bin/jboss-cli.sh --connect

              undeploy mysql-vdb.xml


              Should remove it. Then you can deploy again.



              • 4. Re: Logon Exception when trying first example
                Mylos Kathos Master

                Thanks again Ramesh. I've tried undeploying the application (and redeploying) but the problem remains.

                So I've switched to PostgreSQL and see the cause of the exception is caused by an error in recovering a version number from the JDBCExecutionFactory:


                09:43:46,468 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2)  MSC000001: Failed to start service jboss.teiid.vdb.Portfolio.1: org.jboss.msc.service.

                StartException in service jboss.teiid.vdb.Portfolio.1: Failed to start service

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]

                        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]

                Caused by: java.lang.IllegalStateException: version not set

                        at org.teiid.translator.jdbc.JDBCExecutionFactory.getVersion(JDBCExecutionFactory.java:164)

                        at org.teiid.translator.jdbc.postgresql.PostgreSQLExecutionFactory.start(PostgreSQLExecutionFactory.java:136)

                        at org.teiid.deployers.TranslatorUtil.buildExecutionFactory(TranslatorUtil.java:127)

                        at org.teiid.jboss.VDBService.getExecutionFactory(VDBService.java:318)

                        at org.teiid.jboss.VDBService$5.getExecutionFactory(VDBService.java:290)

                        at org.teiid.dqp.internal.datamgr.ConnectorManagerRepository.createConnectorManager(ConnectorManagerRepository.java:134)

                        at org.teiid.dqp.internal.datamgr.ConnectorManagerRepository.createConnectorManagers(ConnectorManagerRepository.java:108)

                        at org.teiid.jboss.VDBService.createConnectorManagers(VDBService.java:294)

                        at org.teiid.jboss.VDBService.start(VDBService.java:128)

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

                        ... 3 more

                Here is my model part:

                    <model name="Accounts">
                        <property name="importer.useFullSchemaName" value="false"/>
                        <source name="jdbc-connector" translator-name="postgresql" connection-jndi-name="java:/postgres"/>

                Do you suggest using a different JDBC Driver ? or do I need to set a property somewhere in the Model ? or rather it's a problem with the datasource ? (I have deployed the PostgreSQL driver and added the datasource from the console. "Test connection" works)

                Thanks again


                UPDATE: I've just checked again with other datasources. It is a problem with PostgreSQL driver. The same model with MySQL and H2 database works correctly.

                • 5. Re: Logon Exception when trying first example
                  Steven Hawkins Master

                  This is an issue that will be addressed by 8.11.2 - [TEIID-3563] Problems with capabilities initialization - JBoss Issue Tracker which should be out today.  The workaround is to set the database version explicitly:

                  <source name="jdbc-connector" translator-name="my-postgresql" connection-jndi-name="java:/postgres"/> 

                  <translator name="my-postgresql" type="postgresql"> 

                       <property name="DatabaseVersion" value="9.1"/> 


                  • 6. Re: Logon Exception when trying first example
                    Ramesh Reddy Master

                    We recently fixed an issue [TEIID-3563] Problems with capabilities initialization - JBoss Issue Tracker , I think you are running into that now. What version of the Teiid you are using? You can wait for 8.11.2, or try an older version until 8.11.2 is released. There are way to workaround this, but I think right now for you it is easier to just use a previous version.



                    • 7. Re: Logon Exception when trying first example
                      Mylos Kathos Master

                      Thanks, we're using the version 8.11.1. As it's just a prototype we can try for the older version until the 8.11.2 is released.

                      Thanks a lot

                      • 8. Re: Logon Exception when trying first example
                        Ramesh Reddy Master



                        8.11.2 is released now, you can download at http://teiid.jboss.org/downloads/