7 Replies Latest reply on Aug 24, 2007 7:26 AM by jplenhart

    File Listener / Gateway

    jplenhart

      I am having a heck of a problem getting somethin in my config file working correctly. I have a similar service working in my config file already and I do not understand why this service will not work:

      <fs-provider>
      <fs-bus busid="fromGSMOSChannel" >
       <fs-message-filter
       directory="C:\\dev\\projects\\esb\\jbossesb-42MR3\\samples\\quickstarts\\bpm_orchestration1\\build\\gsmos"
       input-suffix=".xml"
       post-delete="true"
       error-delete="false"
       />
       </fs-bus>
      
       <fs-bus busid="startFromGSMOSChannel" >
       <fs-message-filter
       directory="C:\\dev\\projects\\esb\\jbossesb-42MR3\\samples\\quickstarts\\bpm_orchestration1\\build\\gsmos"
       input-suffix=".deployProcessESB"
       post-delete="true"
       error-delete="false"
       />
       </fs-bus>
       </fs-provider>
      


      <service category="BPM_Orchestration_Continuation_Service" name="Continue_Service"
       description="BPM Orchestration Sample 1: Use this service to continue a process instance">
       <listeners>
       <fs-listener name="Gateway" busidref="fromGSMOSChannel"
       maxThreads="4"
       is-gateway="true" />
       <fs-listener name="ESB-Listener" busidref="startFromGSMOSChannel"
       maxThreads="1"/>
       </listeners>
       <actions>
       <action name="myaction" class="test.GsmosEsbReceiveAction"/>
       </actions>
       </service>
      



      I am trying to listen for an xml file in a directory - then launch an action.

      Any thoughts on where I am going wrong?

      My error on deployment:
      
      09:21:02,503 INFO [JBoss4ESBDeployer] create esb service, Quickstart_bpm_orchestration1.esb
      09:21:02,581 WARN [AbstractFileGateway] No value specified for: max-millis-for-response - This wil
      l be an 'inbound-only' gateway
      09:21:02,581 WARN [AbstractFileGateway] No value specified for: max-millis-for-response - This wil
      l be an 'inbound-only' gateway
      09:21:02,581 WARN [AbstractFileGateway] No value specified for: max-millis-for-response - This wil
      l be an 'inbound-only' gateway
      09:21:02,597 WARN [ServiceController] Problem starting service jboss.esb:deployment=Quickstart_bpm_
      orchestration1.esb
      java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpec
      ted exception while instantiating managed instance
       at org.jboss.soa.esb.listeners.config.Configuration.create(Configuration.java:119)
       at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment.startService(JBoss4ESBDeployment.j
      ava:78)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      
       at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy54.start(Unknown Source)
       at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer.start(JBoss4ESBDeployer.java:268)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
      ptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy9.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeplo
      ymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploym
      entScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeployme
      ntScanner.java:225)
      Caused by: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception whi
      le instantiating managed instance
       at org.jboss.soa.esb.listeners.LifecycleUtil.getManagedInstances(LifecycleUtil.java:158)
       at org.jboss.soa.esb.listeners.LifecycleUtil.getGateways(LifecycleUtil.java:103)
       at org.jboss.soa.esb.listeners.config.Configuration.create(Configuration.java:102)
       ... 46 more
      Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.GeneratedConstructorAccessor152.newInstance(Unknown Source)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm
      pl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at org.jboss.soa.esb.listeners.LifecycleUtil.getManagedInstances(LifecycleUtil.java:154)
       ... 48 more
      Caused by: org.jboss.soa.esb.listeners.gateway.GatewayException: Directory processed not found
       at org.jboss.soa.esb.listeners.gateway.FileGatewayListener.seeIfOkToWorkOnDir(FileGatewayLis
      tener.java:85)
       at org.jboss.soa.esb.listeners.gateway.AbstractFileGateway.checkMyParms(AbstractFileGateway.
      java:427)
       at org.jboss.soa.esb.listeners.gateway.AbstractFileGateway.<init>(AbstractFileGateway.java:9
      2)
       at org.jboss.soa.esb.listeners.gateway.FileGatewayListener.<init>(FileGatewayListener.java:5
      1)
       ... 52 more
      09:21:02,644 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      
      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.esb:deployment=Quickstart_bpm_orchestration1.esb
       State: FAILED
       Reason: java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleExceptio
      n: Unexpected exception while instantiating managed instance
       I Depend On:
       jboss.esb:deployment=jbpm.esb
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.esb:deployment=Quickstart_bpm_orchestration1.esb
       State: FAILED
       Reason: java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleExceptio
      n: Unexpected exception while instantiating managed instance
       I Depend On:
       jboss.esb:deployment=jbpm.esb
      
      
      


        • 1. Re: File Listener / Gateway
          tfennelly

          Jason, it looks like the fs-provider config is not right:


          Caused by: org.jboss.soa.esb.listeners.gateway.GatewayException: Directory processed not found


          • 2. Re: File Listener / Gateway
            jplenhart

            Hi Tom,

            Thanks for the reply -- I look at the ESB code:

            protected void seeIfOkToWorkOnDir(File p_oDir)
             throws GatewayException
             {
             if(!p_oDir.exists())
             throw new GatewayException((new StringBuilder()).append("Directory ").append(p_oDir.toString()).append(" not found").toString());
             if(!p_oDir.isDirectory())
             throw new GatewayException((new StringBuilder()).append(p_oDir.toString()).append(" is not a directory").toString());
             if(!p_oDir.canRead())
             throw new GatewayException((new StringBuilder()).append("Can't read directory ").append(p_oDir.toString()).toString());
             if(!p_oDir.canWrite())
             throw new GatewayException((new StringBuilder()).append("Can't write/rename in directory ").append(p_oDir.toString()).toString());
             else
             return;
             }
            
            


            So from the print out you outlined ... why is the listener looking for a directory named 'processed' - I have my input directory as something completely separate. This is strange.

            • 3. Re: File Listener / Gateway
              jplenhart

              So I set both the post-delete to false and it deploys ... now I believe I understand why it would not have worked at runtime ... but why would it not deploy.

              Guess it does not matter - it works:-)

              • 4. Re: File Listener / Gateway
                marklittle

                Jason, can you still create a JIRA bug report, so we can track this anyway? Thanks.

                • 5. Re: File Listener / Gateway
                  tfennelly

                  Would you be able to email you jboss-esb.xml file to me please Jason?

                  • 6. Re: File Listener / Gateway
                    tfennelly

                    Also, it looks from the stack traces there that you're using the MR3 codebase, right? You're not working from source, right?

                    • 7. Re: File Listener / Gateway
                      jplenhart

                      Hi Tom,

                      Yes - I am using MR3 - to take a quick view at the code I just JAD'ed it.

                      Thanks,

                      Jason