2 Replies Latest reply on Mar 5, 2013 3:05 AM by mirko ferioli

    Quantz Sheduler Error

    mirko ferioli Newbie

      Hi everyone,

      I'm trying to do a service like switchyard-quickstart-camel-quantz-binding but use the ide.

       

      This is my switchyard.xml

       

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

      <switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:bean="urn:switchyard-component-bean:config:1.0" xmlns:quartz="urn:switchyard-component-camel-quartz:config:1.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" name="Prova_Simple_Bean" targetNamespace="urn:com.example.switchyard:Prova_Simple_Bean:1.0">

        <sca:composite name="Prova_Simple_Bean" targetNamespace="urn:com.example.switchyard:Prova_Simple_Bean:1.0">

          <sca:component name="SalutiBean">

            <bean:implementation.bean class="com.example.switchyard.Prova_Simple_Bean.SalutiBean"/>

            <sca:service name="Saluti">

              <sca:interface.java interface="com.example.switchyard.Prova_Simple_Bean.Saluti"/>

            </sca:service>

          </sca:component>

          <sca:service name="Saluti" promote="SalutiBean/Saluti">

            <sca:interface.java interface="com.example.switchyard.Prova_Simple_Bean.Saluti"/>

            <quartz:binding.quartz>

              <quartz:name>Ogni_Cinque_Secondi</quartz:name>

              <quartz:cron>* * * * * ?</quartz:cron>

            </quartz:binding.quartz>

          </sca:service>

        </sca:composite>

      </switchyard>

       

      But we I've tryed to deploy on local server ( Switchyard 0.7 final ) this was the error

       

      14:23:59,783 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."Prova_Simple_Bean.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."Prova_Simple_Bean.jar".SwitchYardService: org.switchyard.exception.SwitchYardException: org.apache.camel.FailedToCreateRouteException: Failed to create route {urn:com.example.switchyard:Prova_Simple_Bean:1.0}Saluti-[quartz://Ogni_Cinque_Secondi?cron=*%20*%20*%20*%20*%20?]: Route[[From[quartz://Ogni_Cinque_Secondi?cron=*%20*%20*%20*%... because of Failed to resolve endpoint: quartz://Ogni_Cinque_Secondi?cron=*+*+*+*+*+%3F due to: Trigger name cannot be null or empty.

      at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:85)

      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(Unknown Source) [rt.jar:1.7.0_15]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_15]

      at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_15]

      Caused by: org.switchyard.exception.SwitchYardException: org.apache.camel.FailedToCreateRouteException: Failed to create route {urn:com.example.switchyard:Prova_Simple_Bean:1.0}Saluti-[quartz://Ogni_Cinque_Secondi?cron=*%20*%20*%20*%20*%20?]: Route[[From[quartz://Ogni_Cinque_Secondi?cron=*%20*%20*%20*%... because of Failed to resolve endpoint: quartz://Ogni_Cinque_Secondi?cron=*+*+*+*+*+%3F due to: Trigger name cannot be null or empty.

      at org.switchyard.component.camel.common.handler.InboundHandler.<init>(InboundHandler.java:91)

      at org.switchyard.component.camel.common.deploy.BaseBindingActivator.activateBinding(BaseBindingActivator.java:63)

      at org.switchyard.deploy.internal.Deployment.deployServiceBindings(Deployment.java:505)

      at org.switchyard.deploy.internal.Deployment.start(Deployment.java:141)

      at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:106)

      at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:78)

      ... 5 more

      Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route {urn:com.example.switchyard:Prova_Simple_Bean:1.0}Saluti-[quartz://Ogni_Cinque_Secondi?cron=*%20*%20*%20*%20*%20?]: Route[[From[quartz://Ogni_Cinque_Secondi?cron=*%20*%20*%20*%... because of Failed to resolve endpoint: quartz://Ogni_Cinque_Secondi?cron=*+*+*+*+*+%3F due to: Trigger name cannot be null or empty.

      at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:176)

      at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:712)

      at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1749)

      at org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:656)

      at org.apache.camel.impl.DefaultCamelContext.addRouteDefinition(DefaultCamelContext.java:661)

      at org.switchyard.component.camel.common.handler.InboundHandler.<init>(InboundHandler.java:89)

      ... 10 more

      Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: quartz://Ogni_Cinque_Secondi?cron=*+*+*+*+*+%3F due to: Trigger name cannot be null or empty.

      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:469)

      at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:50)

      at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:186)

      at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)

      at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)

      at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)

      at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:89)

      at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:851)

      at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:171)

      ... 15 more

      Caused by: java.lang.IllegalArgumentException: Trigger name cannot be null or empty.

      at org.quartz.Trigger.setName(Trigger.java:366)

      at org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:149)

      at org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:54)

      at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)

      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:451)

      ... 23 more

       

      Can someone help me?

      Thanks