0 Replies Latest reply on Sep 20, 2011 6:52 AM by João Paulo Limberger

    How can i resolve this Caused by: org.jboss.soa.esb.ConfigurationException

    João Paulo Limberger Newbie

      I was trying to create a schedule in ESB.

       

      The jboss-esb.xml

      <?xml version="1.0"?>
      <jbossesb parameterReloadSecs="5"
       xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
       <providers>
        <schedule-provider name="agendamento">
         <cron-schedule cronExpression="*  * * * * ?" scheduleid="provedor-de-agendamento"/>
        </schedule-provider>
       </providers>
       <!-- 0  23 * * * ? -->
       <services>
        <service category="ExecutarQueryEnviarEmailService"
         description="Executa Query e Envia EMail com o resultado" name="ExecutarQueryEnviarEmailService" inVmScope="GLOBAL">
         
         <actions>
          <action
           class="org.geinf.juridico.integracao.paj.esb.action.ExecutarQueryEnviarEmailAction"
           name="ExecutarQueryEnviarEmailAction" process="process"/>
          <action
           class="org.geinf.juridico.integracao.esb.service.EJBProcessor" name="ExecutarQueryEnviarEmailEJB">
           <property name="ejb3" value="true"/>
           <property name="jndi-name" value="juridico-esb-producer-ear-1.1.16/ExecutarQueryEnviarEmailService/remote"/>
           <property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory"/>
           <property name="provider-url" value="localhost:1399"/>
           <property name="method" value="executar"/>
          </action>
         </actions>
         <listeners>
          <scheduled-listener
           event-processor="org.geinf.juridico.integracao.paj.esb.action.ExecutarQueryEnviarEmailEventListener"
           is-gateway="true" name="listener-executar-consulta-schedule" transacted="false"/>
         </listeners>
           </service>
       </services>
      </jbossesb>
      

       

       

      The Event Listener:

      import org.apache.commons.logging.Log;
      import org.apache.commons.logging.LogFactory;
      import org.jboss.soa.esb.ConfigurationException;
      import org.jboss.soa.esb.helpers.ConfigTree;
      import org.jboss.soa.esb.listeners.ScheduledEventMessageComposer;
      import org.jboss.soa.esb.message.Message;
      import org.jboss.soa.esb.message.format.MessageFactory;
      import org.jboss.soa.esb.schedule.SchedulingException;
      
      public class ExecutarQueryEnviarEmailEventListener implements ScheduledEventMessageComposer {
      
          static private Log logger = LogFactory.getLog(ExecutarQueryEnviarEmailAction.class);
      
          
          @Override
          public void initialize(ConfigTree arg0) throws ConfigurationException {
              logger.info("ExecutarQueryEnviarEmailEventListener executando initialize()");
              
          }
      
          @Override
          public void uninitialize() {
              logger.info("ExecutarQueryEnviarEmailEventListener executando uninitialize");
              
          }
      
          @Override
          public Message composeMessage() throws SchedulingException {
              logger.info("ExecutarQueryEnviarEmailEventListener executando composeMessage");
              Message message = MessageFactory.getInstance().getMessage();
              return message;
          }
      
          @Override
          public Message onProcessingComplete(Message arg0)
                  throws SchedulingException {
              logger.info("ExecutarQueryEnviarEmailEventListener executando composeMessage");
              return arg0;
          }
      
      }
      

       

       

      The exception in the startup of SOA server:

      org.jboss.deployers.spi.DeploymentException: Failed to capture web metadata from ESB configuration.
          at org.jboss.soa.esb.listeners.deployers.mc.EsbWebServiceDeployer.deploy(EsbWebServiceDeployer.java:231)
          at org.jboss.soa.esb.listeners.deployers.mc.EsbWebServiceDeployer.deploy(EsbWebServiceDeployer.java:80)
          at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56)
          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1440)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1158)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1099)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:782)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
          at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
          at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
          at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:775)
          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
          at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
          at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
          at org.jboss.Main.boot(Main.java:221)
          at org.jboss.Main$1.run(Main.java:556)
          at java.lang.Thread.run(Thread.java:619)
      Caused by: org.jboss.soa.esb.ConfigurationException: Can only use the org.jboss.soa.esb.listeners.config.mappers.UntypedListenerMapper mapper on the base listener type.  Cannot use on org.jboss.soa.esb.listeners.config.xbeanmodel101.impl.ScheduledListenerDocumentImpl$ScheduledListenerImpl
          at org.jboss.soa.esb.listeners.config.mappers.UntypedListenerMapper.assertListenerConfigOK(UntypedListenerMapper.java:101)
          at org.jboss.soa.esb.listeners.config.mappers.UntypedListenerMapper.map(UntypedListenerMapper.java:62)
          at org.jboss.soa.esb.listeners.config.mappers.GatewayGenerator.addGatewayConfig(GatewayGenerator.java:140)
          at org.jboss.soa.esb.listeners.config.mappers.GatewayGenerator.generate(GatewayGenerator.java:106)
          at org.jboss.soa.esb.listeners.config.mappers.XMLBeansModel.generateGatewayConfig(XMLBeansModel.java:454)
          at org.jboss.soa.esb.listeners.config.model.Model101SchemaParser$Model101Adapter.generateGatewayConfig(Model101SchemaParser.java:140)
          at org.jboss.soa.esb.listeners.config.ModelUtil.getListenerGroups(ModelUtil.java:53)
          at org.jboss.soa.esb.listeners.deployers.mc.EsbWebServiceDeployer.deploy(EsbWebServiceDeployer.java:229)
          ... 34 more
      

       

      Thanks!

      João Paulo Limberger