3 Replies Latest reply on Oct 4, 2018 5:01 PM by don.krapohl

    CustomMetadataRepository error

    don.krapohl

      Hello!  On implementing a custom metadata repository I've not been able to capture with TRACE or attached debugger to the Teiid process an issue with my metadata custom class.  Super-simple implementation and I can zip the project for review but here's the gist.

       

      Relevant pom segment:

      <properties>

         <version.org.teiid>10.2.0</version.org.teiid>

      </properties>  

      <dependencies>

         <dependency>

         <groupId>org.teiid</groupId>

         <artifactId>teiid-api</artifactId>

         <version>${version.org.teiid}</version>

         <scope>provided</scope>

         </dependency>

         <dependency>

         <groupId>org.teiid</groupId>

         <artifactId>teiid-common-core</artifactId>

         <version>${version.org.teiid}</version>

         <scope>provided</scope>

         </dependency>

      </dependencies>

       

       

      Class definition:

      ...

      import org.teiid.metadata.MetadataFactory;

      import org.teiid.metadata.MetadataRepository;

      import org.teiid.translator.ExecutionFactory;

      import org.teiid.translator.TranslatorException;

      public class BrokerMetadata extends MetadataRepository {

       

           @Override
           public void loadMetadata(MetadataFactory factory, ExecutionFactory executionFactory, Object connectionFactory) throws TranslatorException {

      ...

       

      Clip from trace:

      2018-10-04 15:26:38,932 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread)  WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "test-vdb.xml")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.teiid.vdb.MYVDB.1" => "org.jboss.msc.service.StartException in service jboss.teiid.vdb.MYVDB.1: Failed to start service

          Caused by: java.lang.IllegalArgumentException: org.teiid.metadata.MetadataRepository is not an interface"}}

      2018-10-04 15:26:38,932 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread)  WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "test-vdb.xml")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.teiid.vdb.MYVDB.1" => "org.jboss.msc.service.StartException in service jboss.teiid.vdb.MYVDB.1: Failed to start service

          Caused by: java.lang.IllegalArgumentException: org.teiid.metadata.MetadataRepository is not an interface"}}

      2018-10-04 15:26:38,939 TRACE [org.jboss.as.controller.management-operation] (Controller Boot Thread)  Not rolling back on failed response {

          "outcome" => undefined,

          "failure-description" => {"WFLYCTL0080: Failed services" => {"jboss.teiid.vdb.MYVDB.1" => "org.jboss.msc.service.StartException in service jboss.teiid.vdb.MYVDB.1: Failed to start service

          Caused by: java.lang.IllegalArgumentException: org.teiid.metadata.MetadataRepository is not an interface"}}

      } to operation deploy on address [("deployment" => "test-vdb.xml")] in stage VERIFY

      2018-10-04 15:26:38,939 TRACE [org.jboss.as.controller.management-operation] (Controller Boot Thread)  Not rolling back on failed response {

          "outcome" => undefined,

          "failure-description" => {"WFLYCTL0080: Failed services" => {"jboss.teiid.vdb.MYVDB.1" => "org.jboss.msc.service.StartException in service jboss.teiid.vdb.MYVDB.1: Failed to start service

          Caused by: java.lang.IllegalArgumentException: org.teiid.metadata.MetadataRepository is not an interface"}}

      } to operation deploy on address [("deployment" => "test-vdb.xml")] in stage VERIFY

      2018-10-04 15:26:38,943 TRACE [org.jboss.as.controller.management-operation] (Controller Boot Thread)  persisting org.jboss.as.controller.registry.BasicResource@1d1a617 from org.jboss.as.controller.ModelControllerImpl$ManagementModelImpl@6d88dab4

      2018-10-04 15:26:38,943 TRACE [org.jboss.as.controller.management-operation] (Controller Boot Thread)  persisting org.jboss.as.controller.registry.BasicResource@1d1a617 from org.jboss.as.controller.ModelControllerImpl$ManagementModelImpl@6d88dab4

       

      Dynamic VDB fragment:

      <metadata type="com.rakutenmarketing.brokermeta"></metadata>

       

      The project builds, deploys, and attempts bootstrapping just fine but I get the failure as above, "org.teiid.metadata.MetadataRepository is not an interface".  I've strongly typed the generics <Object, Object> but that made no difference.  I'm on jdk 1.8 with no warnings in either Intellij or Eclipse.  The cli script from the custom metadata archetype deploys the jars appropriately as you can see above.

       

      Anyone seen this before?