5 Replies Latest reply on May 14, 2012 4:07 PM by klsateesh

    VDB is going to inactive state after deployment

      Hi all,

       

        I am able to deploy a VDB into Teiid 8.0.0 Runtime successfully. How ever once the deployment is done the VDB is going to "inactive" state.

       

        Here are the steps i have followed.

       

        1) Creates a VDB using Designer.

       

        2) Deployed the .vdb file into JBoss 7.1 AS

       

        3) Added a new Driver for Oracle JDBC Driver ( Not sure whether it is required)

       

           created the following folders:

       

           C:\apps\jboss-as-7.1.1.Final\modules\com\oracle\jdbc\main

       

          Added a module.xml and copied the ojdbc14.jar into that folder. Th e contents of the module.xml are as listed below:

       

         

      <module xmlns="urn:jboss:module:1.1" name="com.oracle.jdbc">

       

          <resources>

              <resource-root path="ojdbc14-10.2.0.4.jar"/>

          </resources>

          <dependencies>

              <module name="javax.api"/>

              <module name="javax.transaction.api"/>

          </dependencies>

      </module>

       

       

      4) Deployed the ojdbc14.jar into \standalone\deployements folder. It got deployed successfully

       

      5) Added the data source info to standalone-teiid.xml file.

       

         

                   <datasource jndi-name="java:/DSH2D_NEW" pool-name="DSH2D_NEW" enabled="true" use-java-context="true" use-ccm="true">

                          <connection-url>jdbc:oracle:thin:localhost:1521:DSH2D</connection-url>

                          <driver>oracle-jdbc</driver>

                          <pool>

                              <prefill>false</prefill>

                              <use-strict-min>false</use-strict-min>

                              <flush-strategy>FailingConnectionOnly</flush-strategy>

                          </pool>

                          <security>

                              <user-name>username</user-name>

                              <password>password</password>

                          </security>

                      </datasource>

                   <drivers>

                          <!-- There are existing driver classes for H2 and Teiid -->

                       

                          <driver name="oracle-jdbc" module="com.oracle.jdbc">

                              <driver-class>oracle.jdbc.OracleDriver</driver-class>

                          </driver>

                  </drivers>

       

       

      6) In the JBoss admin console the Driver, VDB and the Data Source are all deployed properly.

       

         Teiid_deployments.jpg

           Teiid_DS.jpg

       

      And when the JBoss Server is started i see the following in the console log

       

         console-log.jpg

       

      As the VDB is not in the active state my Teiid Client is throwing the follwoing Exception when i try to connect

       

       

      May 14, 2012 2:33:39 PM org.teiid.jdbc.TeiidDriver connect

      SEVERE: Could not create connection

      org.teiid.jdbc.TeiidSQLException: Error Code:TEIID20017 Message:Error Code:TEIID40057 Message:Remote org.teiid.client.security.LogonException: Error Code:TEIID40057 Message:Error Code:TEIID40047 Message:TEIID40047 VDB "DSH_VDB" version "latest" is not in the "active" status.

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

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

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

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

          at org.teiid.jdbc.TeiidDataSource.getConnection(TeiidDataSource.java:255)

          at org.teiid.jdbc.TeiidDataSource.getConnection(TeiidDataSource.java:230)

          at teiid.TeiidClient.getConnectionFromDS(TeiidClient.java:38)

          at teiid.TeiidClient.main(TeiidClient.java:17)

       

       

      Only thing that stand out from the log is "Data Source DHS2D_NEW not accessible."  Not sure why the data source is not accessible when ut is deployed properly as per the Admin Console.

       

      Thanks

      Sateesh

        • 1. Re: VDB is going to inactive state after deployment

          module-xml.jpg

           

                         <datasource jndi-name="java:/DSH2D_NEW" pool-name="DSH2D_NEW" enabled="true" use-java-context="true" use-ccm="true">

                              <connection-url>jdbc:oracle:thin:localhost:1521:DSH2D</connection-url>

                              <driver>oracle-jdbc</driver>

                              <pool>

                                  <prefill>false</prefill>

                                  <use-strict-min>false</use-strict-min>

                                  <flush-strategy>FailingConnectionOnly</flush-strategy>

                              </pool>

                              <security>

                                  <user-name>username</user-name>

                                  <password>PassWord</password>

                              </security>

                          </datasource>

                          <drivers>

                              <driver name="h2" module="com.h2database.h2">

                                  <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                              </driver>

                              <driver name="oracle-jdbc" module="com.oracle.jdbc">

                                  <driver-class>oracle.jdbc.OracleDriver</driver-class>

                              </driver>

                              <driver name="teiid-local" module="org.jboss.teiid">

                                  <driver-class>org.teiid.jdbc.TeiidDriver</driver-class>

                                  <xa-datasource-class>org.teiid.jdbc.TeiidDataSource</xa-datasource-class>

                              </driver>

                              <driver name="teiid" module="org.jboss.teiid.client">

                                  <driver-class>org.teiid.jdbc.TeiidDriver</driver-class>

                                  <xa-datasource-class>org.teiid.jdbc.TeiidDataSource</xa-datasource-class>

                              </driver>

                          </drivers>

          • 2. Re: VDB is going to inactive state after deployment
            rareddy

            Sateesh,

             

            In the Designer, in VDB Explorer view, make sure that the "connection-jndi-name" is set to "java:/DSH2D_NEW" and translator name is set to "oracle". Then save and re-deploy.

             

            The name of your data source from above is "DSH2D_NEW", and log shows you have defined in VDB as "DHS2D_NEW"

             

            Ramesh..

            • 3. Re: VDB is going to inactive state after deployment

              Hi Ramesh,

               

                Thanks for the info. Yes i changed the JNDI name in the Designer and redeployed it. Now in the console log i am seeting the error:

               

              15:28:53,717 INFO  [org.jboss.as] (MSC service thread 1-4) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 6006ms - Started 324 of 423 services (96 services are passive or on-demand)

              15:28:54,087 INFO  [org.teiid.RUNTIME] (MSC service thread 1-1) TEIID50029 VDB DSH_VDB.1 model "DHS2D_NEW" metadata is currently being loaded. Start Time: 5/14/12 3:28 PM

              15:28:54,138 INFO  [org.teiid.RUNTIME] (teiid-async-threads - 1) TEIID50030 VDB DSH_VDB.1 model "DHS2D_NEW" metadata loaded. End Time: 5/14/12 3:28 PM

              15:28:54,178 INFO  [org.teiid.RUNTIME] (teiid-async-threads - 1) Data Source java:/DHS2D_NEW not accessible.

              15:28:54,189 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "teiid-connector-ws.rar"

              15:28:54,195 INFO  [org.teiid.RUNTIME] (teiid-async-threads - 1) TEIID40006 VDB DSH_VDB.1 is set to "inactive"

              15:28:54,202 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "teiid-connector-salesforce.rar"

              15:28:54,211 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "teiid-connector-ldap.rar"

              15:28:54,250 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "teiid-connector-file.rar"

              15:28:54,259 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ojdbc14-10.2.0.4.jar"

              15:28:54,265 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "DSH_VDB.vdb"

               

              Here is is the scereenshot of the properties of my VDB.

               

              Designer_VDB.jpg

               

              The console log after redeployment is:

               

              15:31:49,832 INFO  [org.teiid.RUNTIME] (MSC service thread 1-2) TEIID50026 VDB "DSH_VDB.1[DHS2D_NEW[DHS2D_NEW/oracle/java:/DHS2D_NEW]]" undeployed.

              15:31:49,845 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment DSH_VDB.vdb in 15ms

              15:31:49,849 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "DSH_VDB.vdb"

              15:31:49,875 INFO  [org.teiid.RUNTIME] (MSC service thread 1-1) TEIID50029 VDB DSH_VDB.1 model "DHS2D_NEW" metadata is currently being loaded. Start Time: 5/14/12 3:31 PM

              15:31:49,919 INFO  [org.teiid.RUNTIME] (teiid-async-threads - 2) TEIID50030 VDB DSH_VDB.1 model "DHS2D_NEW" metadata loaded. End Time: 5/14/12 3:31 PM

              15:31:49,921 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "DSH_VDB.vdb" with deployment "DSH_VDB.vdb"

              15:31:49,925 INFO  [org.teiid.RUNTIME] (teiid-async-threads - 2) Data Source java:/DHS2D_NEW not accessible.

              15:31:49,931 INFO  [org.teiid.RUNTIME] (teiid-async-threads - 2) TEIID40006 VDB DSH_VDB.1 is set to "inactive"

               

              Thanks

              Sateesh

              • 4. Re: VDB is going to inactive state after deployment
                rareddy

                Sateesh,

                 

                Stop your server, change your data source jndi name to " java:/DHS2D_NEW", and restart. As I mentioned above the name you have given in configuration is "DSH2D_NEW". The name in VDB and configuration MUST match.

                 

                Ramesh..


                • 5. Re: VDB is going to inactive state after deployment

                  It's working now. There was a typo error in the DataSource Name !!!.

                   

                  Thanks for your help.