9 Replies Latest reply on Nov 25, 2008 11:03 AM by kconner

    Error while trying to run Quickstart_helloworld_FTP

    kaba

      Hello all,
      has anybody successfully got the helloworld_FTP with ftps protocol running.
      i set up ftps Server.
      when i try to deploy the helloworld_FTP i get the following error.

      The only change i made to the default conf is
      adding the protocol attribute to the ftp -listener


      09:10:16,726 INFO [JBoss4ESBDeployer] create esb service, Quickstart_helloworld_FTP_action.esb
      09:10:16,877 INFO [quickstart_helloworld_ftp_esb] Bound to JNDI name: queue/quickstart_helloworld_ftp_esb
      09:10:17,180 INFO [AbstractFileGateway] No value specified for: max-millis-for-response - This will be an 'inbound-only' gateway
      09:10:17,332 WARN [ServiceController] Problem starting service jboss.esb:deployment=Quickstart_helloworld_FTP_action.esb
      java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception while instantiating managed instance
      at org.jboss.soa.esb.listeners.config.Configuration.create(Configuration.java:132)
      at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment.startService(JBoss4ESBDeployment.java:82)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      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 org.jboss.system.ServiceController.start(ServiceController.java:435)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      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 $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)




      My jboss-esb.xml is:
      <?xml version = "1.0" encoding = "UTF-8"?>



      <ftp-provider name="FTPprovider" hostname="uvekv9020.admin.ch:22" >
      <ftp-bus busid="helloFTPChannel" >
      <ftp-message-filter
      protocol="ftps"
      username="esbadmin"
      password="T!nbo2ktou"
      passive="true"
      directory="test"
      input-suffix=".dat"
      work-suffix=".esbWorking"
      post-delete="false"
      post-suffix=".COMPLETE"
      error-delete="false"
      error-suffix=".HAS_ERROR"
      />
      </ftp-bus>
      </ftp-provider>

      <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">

      <jms-bus busid="quickstartEsbChannel">
      <jms-message-filter
      dest-type="QUEUE"
      dest-name="queue/quickstart_helloworld_ftp_esb"
      selector="source='fromHelloworldFTPAction'"
      />
      </jms-bus>

      </jms-provider>

      <schedule-provider name="cronExample">
      <cron-schedule scheduleid="cron-schedule" cronExpression="0/5 * * * * ?"/>
      </schedule-provider>






      <ftp-listener name="FtpGateway"
      busidref="helloFTPChannel"
      is-gateway="true"
      scheduleidref="cron-schedule"/>
      <jms-listener name="helloWorldFileAction"
      busidref="quickstartEsbChannel" />







      Thank you

        • 1. Re: Error while trying to run Quickstart_helloworld_FTP
          kaba

          i am using jboss 4.2.3.GA and jbossesb 4.4.GA java 6

          • 2. Re: Error while trying to run Quickstart_helloworld_FTP
            kconner

            Is there more to that exception? Does it show the cause?

            • 3. Re: Error while trying to run Quickstart_helloworld_FTP
              kaba

              Yes,
              excuse me i did not copy the whole Stacktrace:
              Here is the full stacktrace


              14:21:19,001 INFO [JBoss4ESBDeployer] create esb service, Quickstart_helloworld_FTP_action.esb
              14:21:19,128 INFO [quickstart_helloworld_ftp_esb] Bound to JNDI name: queue/quickstart_helloworld_ftp_esb
              14:21:19,287 INFO [AbstractFileGateway] No value specified for: max-millis-for-response - This will be an 'inbound-only' gateway
              14:21:19,370 WARN [ServiceController] Problem starting service jboss.esb:deployment=Quickstart_helloworld_FTP_action.esb
              java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception while instantiating managed instance
              at org.jboss.soa.esb.listeners.config.Configuration.create(Configuration.java:132)
              at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment.startService(JBoss4ESBDeployment.java:82)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              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 org.jboss.system.ServiceController.start(ServiceController.java:435)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              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 $Proxy4.start(Unknown Source)
              at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              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(ModelMBeanOperationInterceptor.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(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
              Caused by: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception while 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:113)
              ... 49 more
              Caused by: java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
              at org.jboss.soa.esb.listeners.LifecycleUtil.getManagedInstances(LifecycleUtil.java:154)
              ... 51 more
              Caused by: org.jboss.soa.esb.ConfigurationException: org.jboss.soa.esb.util.RemoteFileSystemException: org.jboss.soa.esb.util.RemoteFileSystemException: org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
              Server Reply: SSH-2.0-VShell_2_3_7_272 VShell
              at org.jboss.soa.esb.listeners.gateway.RemoteGatewayListener.checkMyParms(RemoteGatewayListener.java:94)
              at org.jboss.soa.esb.listeners.gateway.RemoteGatewayListener.<init>(RemoteGatewayListener.java:64)
              ... 56 more
              Caused by: org.jboss.soa.esb.util.RemoteFileSystemException: org.jboss.soa.esb.util.RemoteFileSystemException: org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
              Server Reply: SSH-2.0-VShell_2_3_7_272 VShell
              at org.jboss.soa.esb.util.RemoteFileSystemFactory.getRemoteFileSystem(RemoteFileSystemFactory.java:70)
              at org.jboss.soa.esb.listeners.gateway.RemoteGatewayListener.checkMyParms(RemoteGatewayListener.java:82)
              ... 57 more
              Caused by: org.jboss.soa.esb.util.RemoteFileSystemException: org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
              Server Reply: SSH-2.0-VShell_2_3_7_272 VShell
              at org.jboss.internal.soa.esb.util.FtpImpl.initialize(FtpImpl.java:423)
              at org.jboss.internal.soa.esb.util.FtpsImpl.<init>(FtpsImpl.java:107)
              at org.jboss.soa.esb.util.RemoteFileSystemFactory.getRemoteFileSystem(RemoteFileSystemFactory.java:64)
              ... 58 more
              Caused by: org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
              Server Reply: SSH-2.0-VShell_2_3_7_272 VShell
              at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:315)
              at org.apache.commons.net.ftp.FTP._connectAction_(FTP.java:364)
              at org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:540)
              at org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java:166)
              at org.apache.commons.net.SocketClient.connect(SocketClient.java:178)
              at org.jboss.internal.soa.esb.util.FtpImpl.connect(FtpImpl.java:439)
              at org.jboss.internal.soa.esb.util.FtpsImpl.connect(FtpsImpl.java:183)
              at org.jboss.internal.soa.esb.util.FtpImpl.initialize(FtpImpl.java:392)
              ... 60 more
              14:21:19,413 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

              --- MBeans waiting for other MBeans ---
              ObjectName: jboss.esb:deployment=Quickstart_helloworld_FTP_action.esb
              State: FAILED
              Reason: java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception while instantiating managed instance
              I Depend On:
              jboss.esb:deployment=jbossesb.esb
              jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_ftp_esb

              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
              ObjectName: jboss.esb:deployment=Quickstart_helloworld_FTP_action.esb
              State: FAILED
              Reason: java.lang.RuntimeException: org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected exception while instantiating managed instance
              I Depend On:
              jboss.esb:deployment=jbossesb.esb
              jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_ftp_esb


              Thank a lot

              • 4. Re: Error while trying to run Quickstart_helloworld_FTP
                kconner

                That is an SSH reply which would suggest that you really want to be using SFTP and not FTPS. These are very different protocols.

                I should have realised this earlier given the port number that you are specifying.

                • 5. Re: Error while trying to run Quickstart_helloworld_FTP
                  kaba

                  Hi Kevin,
                  thank you.
                  That was the problem. Setting the protocol to sftp solved the deployment problem. But now iam getting the following exception when i run
                  the ant runtest


                  runtest:
                  [echo] Runs Test FTP File creator
                  [java] Error obtaining output stream for location: test/HWFtp-25-Nov-08-15-06-26.dat
                  [java] java.net.ConnectException: Connection refused
                  [java] at java.net.PlainSocketImpl.socketConnect(Native Method)
                  [java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
                  [java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
                  [java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
                  [java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
                  [java] at java.net.Socket.connect(Socket.java:519)
                  [java] at java.net.Socket.connect(Socket.java:469)
                  [java] at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
                  [java] at sun.net.NetworkClient.openServer(NetworkClient.java:118)
                  [java] at sun.net.ftp.FtpClient.openServer(FtpClient.java:488)
                  [java] at sun.net.ftp.FtpClient.openServer(FtpClient.java:475)
                  [java] at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:270)
                  [java] at sun.net.www.protocol.ftp.FtpURLConnection.getOutputStream(FtpURLConnection.java:460)
                  [java] at org.jboss.soa.esb.samples.quickstart.helloworldftpaction.test.CreateTestFile.main(CreateTestFile.java:79)

                  BUILD FAILED
                  /appl/jbossesb-4.4.GA/samples/quickstarts/helloworld_ftp_action/build.xml:26: Java returned: 4




                  • 6. Re: Error while trying to run Quickstart_helloworld_FTP
                    kconner

                    The quickstart was written to demonstrate the ftp protocol and, as a consequence, the client code only supports ftp.

                    The best way to demonstrate the support of sftp/ftps would therefore be to upload a test file using a normal sftp/ftps client. This file would then be picked up by the ESB and processed normally.

                    • 7. Re: Error while trying to run Quickstart_helloworld_FTP
                      kaba

                      Thank you kevin,
                      actually i kann upload a file into the input directory using scp/winscp.
                      But the input file does not seem to beeing picked up by the ftp listener.
                      the input directory is for instance "test" which a sub directory of /localdata
                      so i configured test as input directory. i expect any file named xx.dat into this directory to be picked up by the listener .
                      But that does not happen.
                      What iam doing wrong?
                      Thank


                      • 8. Re: Error while trying to run Quickstart_helloworld_FTP
                        kaba

                        I got it.
                        The my mistake was the input directory was not correctly specified
                        setting the full path of the input directory /localdata/test solved the last remainig problem
                        Everything is now beeing running as expected.
                        Thank you kevin and all the kind professionals of the JbossESB Team.
                        I am looking forward running JBOSSESB in Production with RedHat Subscription very soon
                        Kaba

                        • 9. Re: Error while trying to run Quickstart_helloworld_FTP
                          kconner

                          Thanks for letting us know, glad it is sorted.