2 Replies Latest reply on Jul 25, 2012 7:58 AM by Manoj Agarwal

    Issue with Delegating Translator with Teiid 8.0

    Manoj Agarwal Newbie

      Hi,

       

      I am facing issues while using delegating translator. I created a POC using dynamicvdb-portfolio example and i get this error...

       

      15:58:56,823 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."portfolio-vdb.xml".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."portfolio-vdb.xml".INSTALL: Failed to process phase INSTALL of deployment "portfolio-vdb.xml"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_02]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_02]

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: TEIID50077 The parent translator type "custom-delegator" was not found in configuration "portfolio-vdb.xml"

          at org.teiid.jboss.VDBDeployer.deploy(VDBDeployer.java:125)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

       

       

      My Delegating Translator :-

       

      @Translator(name = "custom-translator")

      public class CustomExecutionFactory

          extends BaseDelegatingExecutionFactory<Object, Object>

      {

       

          @Override

          public Execution createExecution(final Command command,

                                           final ExecutionContext executionContext,

                                           final RuntimeMetadata metadata,

                                           final Object connection) throws TranslatorException

          {

             

                return super.createExecution(command,

                                           executionContext,

                                           metadata,

                                           connection);

          }

       

      }

       

      VDB XML:-

       

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

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

          <description>A Dynamic VDB</description>

          <property name="UseConnectorMetadata" value="true" />

          <model name="Accounts">

             <property name="importer.useFullSchemaName" value="false"/>

             <source name="h2-connector" translator-name="h2" connection-jndi-name="java:/accounts-ds"/>

          </model>

          <model name="MarketData">

              <source name="text-connector" translator-name="custom-delegator" connection-jndi-name="java:/marketdata-file"/>

          </model>

          <translator name="delegating-translator" type="file" description="Test description">

              <property name="ExceptionIfFileNotFound" value="true" />

          </translator>

          <translator type="custom-translator" name="custom-delegator">

            <property value="delegateName" name="delegating-translator"/>

         </translator>

      </vdb>