4 Replies Latest reply on Jun 29, 2017 6:45 AM by Ramesh Reddy

    Teiid, Dynamic VDB and Jar Customize function

    parrotola Novice

      Hi,

      I have a 8.11 Teiid version where I created a VDB. That VDB didn't support Dynamic VDB and I had created a customize  function with JAR. Now I have converted the same project in a Dynamic VDB. Where I deploy the Jar file? How could I insert a Jar function into vdb-xml?

      Thank you for all.

       

      Best regards

        • 2. Re: Teiid, Dynamic VDB and Jar Customize function
          parrotola Novice

          Hi Ramesh,

          should I addd the configuration to standard-teiid-xml?

          ty

          • 3. Re: Teiid, Dynamic VDB and Jar Customize function
            parrotola Novice

            Hi Ramesh,

            thank you for you help. When I use my customize Jar, I have this problem:

             

            Errore SQL [30328] [50000]: TEIID30328 Remote org.teiid.api.exception.query.ExpressionEvaluationException: TEIID30328 Unable to evaluate lookupdbpedia('http', '172.31.43.222', '1112', 'New York', 'PopulatedPlace', ''): TEIID30384 Error while evaluating function ViewModel.lookupdbpedia

              TEIID30328 Remote org.teiid.api.exception.query.ExpressionEvaluationException: TEIID30328 Unable to evaluate lookupdbpedia('http', '172.31.43.222', '1112', 'New York, 'PopulatedPlace', ''): TEIID30384 Error while evaluating function ViewModel.lookupdbpedia

                TEIID30328 Remote org.teiid.api.exception.query.ExpressionEvaluationException: TEIID30328 Unable to evaluate lookupdbpedia('http', '172.31.43.222', '1112', 'New York', 'PopulatedPlace', ''): TEIID30384 Error while evaluating function ViewModel.lookupdbpedia

                  TEIID30384 Remote org.teiid.api.exception.query.FunctionExecutionException: TEIID30384 Error while evaluating function ViewModel.lookupdbpedia

                    javax.xml.parsers.FactoryConfigurationError: Remote javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__SAXParserFactory could not be instantiated: java.lang.ClassCastException: __redirected.__SAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory

             

            Jaxb library are used in customize Jar and hence I added that in the module.xml file:

             

            <?xml version="1.0" ?>

            <module xmlns="urn:jboss:module:1.1" name="lookup">

                <resources>

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

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

                </resources>

            </module>

            If I used the dependences in the module.xml file, didn't work but If I add the rt.jar ( jaxb jar) it work! This library are already present in JVM.

            thank you for all.

            • 4. Re: Teiid, Dynamic VDB and Jar Customize function
              Ramesh Reddy Master

              In your module.xml file, you can also try

               

              <dependencies>

                      <module name="com.sun.xml.bind" />

              </dependencies>

               

              That way you do not have to provide the "rt.jar" file. Most of the all the JVM related libraries are there in Wildfly module system, you just need to find it.