7 Replies Latest reply on Nov 4, 2014 6:13 PM by Ramesh Reddy

    Module.xml file for csjdbc.jar file - Teiid connection with Composite Driver

    Sarvesh Mali Newbie

      In TEIID Designer, I am trying to connect to Composite software data source using csjdbc.jar file for the driver cs.jdbc.driver.CompositeDriver by using Generic JDBC Connection. The connection URL which I am passing in TEIID designer along with the csjdbc.jar file and cs.jdbc.driver.CompositeDriver driver is working fine and I can import the tables from Composite data source in TEIID as a source. The same connection URL works fine in SQUIRELL sql client and I can run queries on that source to retrive data. However, when I try to deploy the VDB file and then run an ODATA query in the browser on that source I get the following error:

       

      JBWEB000065: HTTP Status 500 -

      --------------------------------------------------------------------------------

      JBWEB000309: type JBWEB000066: Exception report

      JBWEB000068: message

      JBWEB000069: description JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request.

      JBWEB000070: exception
      Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.DatabaseException
      Internal Exception: org.teiid.jdbc.TeiidSQLException: TEIID30504 SISORSrc: 1947005 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT "WIDAT"."WIDAT"."AREA"."AREA_ID", "WIDAT"."WIDAT"."AREA"."AREA_TYPE", "WIDAT"."WIDAT"."AREA"."PPDM_GUID", "WIDAT"."WIDAT"."AREA"."PREFERRED_NAME", "WIDAT"."WIDAT"."AREA"."REMARK" FROM "WIDAT"."WIDAT"."AREA"]
      Error Code: 1947005
      Call: SELECT "AREA_ID", "AREA_TYPE", "PPDM_GUID", "PREFERRED_NAME", "REMARK" FROM "PDMSPView.AREA_TEST_SISOR"
      Query: ReadAllQuery(referenceClass=AREA_TEST_SISOR sql="SELECT "AREA_ID", "AREA_TYPE", "PPDM_GUID", "PREFERRED_NAME", "REMARK" FROM "PDMSPView.AREA_TEST_SISOR"")


      The SQL statement is working fine on the source when tested in SQUIRELL client. However, the ODATA is showing error.

       

      I did the same sceario with a data source from SQL Server using sqljdbc4.jar file and tried to produce the same error in ODATA. I noticed that for sql server there is a module.xml file in the same folder as the sqljdbc4.jar file which has the below contents: If I delete any line from the dependencies tag then I get same error in ODATA as I get while running the VDB containing Composite data source connection. I have created the module.xml file for csjdbc.jar file in the same way as there was for sqljdbc4.jar file but the error is not resolved. For the csjdbc.jar file what dependencies should I provide in the dependencies tag in module.xml file and where can I find this information?

       

      The SQL Server module.xml file is as follows (This works fine without any errors)

      <?xml version="1.0" encoding="UTF-8"?>

      <module xmlns="urn:jboss:module:1.1" name="com.microsoft.sqlserver">

        <resources>

          <resource-root path="sqljdbc4.jar"/>

        </resources>

        <dependencies>

          <module name="javax.api"/>

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

        </dependencies>

      </module>

       

      The composite module.xml file is as follows

      <?xml version="1.0" encoding="UTF-8"?>

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

        <resources>

      <resource-root path="csjdbc.jar"/>

        </resources>

        <dependencies>

              <module name="javax.api"/>

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

          </dependencies>

      </module>

       

      NOTE: All the fjar files, and module files are in correct location and the standalone file has the correct connection URL and drivers specified.

        • 1. Re: Module.xml file for csjdbc.jar file - Teiid connection with Composite Driver
          Ramesh Reddy Master

          The error shown above and question you are question does not co-relate to each other. There seems to be an additional issue in play. What do you see in the server.log? As per the dependencies for csjdbc.jar, we have no idea, typically those are defined by the vendor.  I am confused by your EclipseLink error above, check the log and provide more details.

          1 of 1 people found this helpful
          • 2. Re: Module.xml file for csjdbc.jar file - Teiid connection with Composite Driver
            Sarvesh Mali Newbie

            Hi Ramesh. Thank you for the reply. I ran the vdb this time on a simple query. Following is what the server.log provides the following information in the first few lines.

            19:44:32,879 WARNING [org.eclipse.persistence.default] (http-/0.0.0.0:8080-3) The collection of metamodel types is empty. Model classes may not have been found during entity search for Java SE and some Java EE container managed persistence units.  Please verify that your entity classes are referenced in persistence.xml using either <class> elements or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element

            19:44:59,603 WARN  [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue0) Connector worker process failed for atomic-request=V2DikajuEjq+.2.0.0: org.teiid.translator.jdbc.JDBCExecutionException: 1947005 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT "WIDAT"."WIDAT"."FIELD"."FIELD_ID", "WIDAT"."WIDAT"."FIELD"."FIELD_NAME", "WIDAT"."WIDAT"."FIELD"."PPDM_GUID" FROM "WIDAT"."WIDAT"."FIELD"]

            at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:88)

            at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:312) [teiid-engine-8.4.1.jar:8.4.1]

            at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:301) [teiid-engine-8.4.1.jar:8.4.1]

            at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:113) [teiid-engine-8.4.1.jar:8.4.1]

            at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110) [teiid-engine-8.4.1.jar:8.4.1]

            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_27]

            at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_27]

            at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58) [teiid-engine-8.4.1.jar:8.4.1]

            at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:269) [teiid-engine-8.4.1.jar:8.4.1]

            at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.4.1.jar:8.4.1]

            at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214) [teiid-engine-8.4.1.jar:8.4.1]

            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_27]

            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_27]

            at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_27]

            Caused by: java.sql.SQLException: The operation 'void getWarnings()' is not supported. If you dont want to get an Exception, you can use &unsupportedMode=silent in the JDBC URL.[jdbc-1947005]

             

            The reason why I mentioned module.xml file was because when I edited the module.xml file for sqljdbc4.jar file which is located in a different location and removed the dependencies I got the same error.

            • 3. Re: Module.xml file for csjdbc.jar file - Teiid connection with Composite Driver
              Ramesh Reddy Master

              Please explain the relationship with the EclipseLink and Composite? If those require additional jar file yes you may require them.

               

              You showed only the stacktrace from Teiid portion of it, what about further inner stack? What does that say? Does that have ClassNotFoundExceptions?

              • 4. Re: Re: Module.xml file for csjdbc.jar file - Teiid connection with Composite Driver
                Sarvesh Mali Newbie

                It is running a query SQL: SELECT "WIDAT"."WIDAT"."FIELD"."FIELD_ID", "WIDAT"."WIDAT"."FIELD"."FIELD_NAME",

                "WIDAT"."WIDAT"."FIELD"."PPDM_GUID" FROM "WIDAT"."WIDAT"."FIELD" on the Composite connection. Please find attached server.log file.

                • 5. Re: Re: Re: Module.xml file for csjdbc.jar file - Teiid connection with Composite Driver
                  Ramesh Reddy Master

                  Sarvesh,

                   

                  If you looked in server.log, you will find the below error

                   

                  Caused by: java.sql.SQLException: The operation 'void getWarnings()' is not supported. If you dont want to get an Exception, you can use &unsupportedMode=silent in the JDBC URL.[jdbc-1947005]
                  

                   

                  So, you have an option to add "&nsupportedMode=silent" on Composite JDBC URL, to get fix this error. Edit your standalone-teiid.xml file and edit the data source configuration to fix it, then restart

                   

                  Ramesh..

                  • 6. Re: Module.xml file for csjdbc.jar file - Teiid connection with Composite Driver
                    Sarvesh Mali Newbie

                    Added "&nsupportedMode=silent" in the Composite URL and it worked fine Cheers

                    • 7. Re: Module.xml file for csjdbc.jar file - Teiid connection with Composite Driver
                      Ramesh Reddy Master

                      Nice. Would love know about more your usecase with Composite as it is in same space as Teiid functionality wise.