OSB jms 2 ftp/file

Hello
My configuration: JMS Proxy Service(byte stream) - > ftp/file Business service
I can write stream to ftp/file without convert to array?
Best Regards,
lam

can't you use 37.3.6 Streaming body Content for that ?
http://download.oracle.com/docs/html/E15867_01/context.htm#sthref332
without changes
at what step does the convert from byte stream to array happen?jms body contain binary-content. I convert this DataSource to String via Java Callout. String send to File Business Service.
If to send a body without conversion then a file will form but its contents won't be transferred.

Similar Messages

  • BPEL Clustering with Tech Adapters (FTP/File/JMS/DB) - 10.1.2.0.2

    When we cluster BPEL instances (10.1.2.0.2) without clustering the OracleAS instances, how does the tech adapter (especially the inbound scenarios) work?
    Do we need to cluster the OracleAS instances, if we are using PartnerLink that is other than HTTP protocol within BPEL?
    In other words, if we are using tech adapters (FTP/File/JMS/DB) within BPEL, is it mandatory to cluster the OracleAS instances (in order to cluster BPEL instances).
    In the adapter concepts document, it says that we need to configure the 'clusterGroupId'.
    Specifically, if we don't cluster the OracleAS and just clustering only BPEL (since it is stateless as it uses dehydration), then what is going to be the value of 'clusterGroupId'?
    <activationAgents>
    <activationAgent className="..." partnerLink="MyInboundAdapterPL">
    <property name="clusterGroupId">myBpelCluster</property>
    Thanks in advance!
    Arun.

    is it mandatory to cluster the OracleAS instancesno
    clusterGroupIdclusterGroupId has nothing to do with iAS or BPEL clustering, it refers to adapter clustering. By creating a clusterGroupId you make the adapter a singleton, ie only one adapter with a certain clusterGroupId will be active, and if other adapters is started with the same clusterGroupId they will be passive and wait for the current active adapter to fail.
    For FTP/File adapter you will need a shared directory amongst the server to hold adapter state (controlfiles). This is controlled by the dir
    oracle.tip.adapter.file.controldirpath=c:\\dir

  • HAFileAdapter based OSB processing 1st file twice in 2 node cluster env

    Hi,
    I am trying my hands in OSB with HA File Adapter and came across a strange issue where in OSB service designed to pick up a message of "*.CSV" format and process it's record one at a time recursively as per below details:
    The reason I am saying it's been processed by 2 nodes of the cluster independently is because I can see 2 separate threads picking up same file at the same time on both the nodes in log files. I enabled the debugging property on managed servers.
    ----------------------------------------------------- Start Log Snippet -----------------------------------------------------
    Node 1 : ExecuteThread: '51'
    ####<Oct 17, 2012 3:21:35 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin03> <WLS_OSB2> <[ACTIVE] ExecuteThread: '51' for queue: 'weblogic.kernel.Defa
    ult (self-tuning)'> <oracle> <> <70d9e8b790dff210:-480a1b4a:13a6c31d21b:-8000-000000000023fd0a> <1350447695272> <BEA-000000> <Translated inbound batch index "1" of fil
    e {CCISU_500.csv} sucessfully.>
    ####<Oct 17, 2012 3:21:35 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin03> <WLS_OSB2> <[ACTIVE] ExecuteThread: '51' for queue: 'weblogic.kernel.Defa
    ult (self-tuning)'> <oracle> <> <70d9e8b790dff210:-480a1b4a:13a6c31d21b:-8000-000000000023fd0a> <1350447695272> <BEA-000000> <Publisher::publishMessage called with prim
    aryKey=[Qz6n0UOYTQ1oJ2QeawJThlv-jKbiLeH1Bkko5wHl1Lg.]>
    ####<Oct 17, 2012 3:21:35 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin03> <WLS_OSB2> <[ACTIVE] ExecuteThread: '51' for queue: 'weblogic.kernel.Defa
    ult (self-tuning)'> <oracle> <> <70d9e8b790dff210:-480a1b4a:13a6c31d21b:-8000-000000000023fd0a> <1350447695272> <BEA-000000> <Sending batch to Adapter Framework for pos
    ting to BPEL engine: {
    batchId=_-H9OvOxmH30ZcxGkXWAK8mVTcajl3SHsnnVKxfsEBU., batchIndex=1, publishSize=1
    }>
    ####<Oct 17, 2012 3:21:39 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin01> <WLS_OSB1> <[ACTIVE] ExecuteThread: '53' for queue: 'weblogic.kernel.Default (self-tuning)'> <oracle> <> <7dca6b7cd27159da:58554710:13a6c24a0f9:-8000-000000000001b722> <1350447699920> <BEA-000000> <Copying file :/FileAdapters/Input/CCISU_500.csv to user-defined archive directory for processed files :/FileAdapters/Archive>
    ####<Oct 17, 2012 3:21:39 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin01> <WLS_OSB1> <[ACTIVE] ExecuteThread: '53' for queue: 'weblogic.kernel.Default (self-tuning)'> <oracle> <> <7dca6b7cd27159da:58554710:13a6c24a0f9:-8000-000000000001b722> <1350447699928> <BEA-000000> <Deleting/Soft deleting file : /FileAdapters/Input/CCISU_500.csv>
    ####<Oct 17, 2012 3:21:39 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin01> <WLS_OSB1> <[ACTIVE] ExecuteThread: '53' for queue: 'weblogic.kernel.Default (self-tuning)'> <oracle> <> <7dca6b7cd27159da:58554710:13a6c24a0f9:-8000-000000000001b722> <1350447699928> <BEA-000000> <Deleting file : CCISU_500.csv>
    ####<Oct 17, 2012 3:21:39 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin01> <WLS_OSB1> <[ACTIVE] ExecuteThread: '53' for queue: 'weblogic.kernel.Default (self-tuning)'> <oracle> <> <7dca6b7cd27159da:58554710:13a6c24a0f9:-8000-000000000001b722> <1350447699929> <BEA-000000> <Deleted file : true>
    ####<Oct 17, 2012 3:21:39 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin01> <WLS_OSB1> <[ACTIVE] ExecuteThread: '53' for queue: 'weblogic.kernel.Default (self-tuning)'> <oracle> <> <7dca6b7cd27159da:58554710:13a6c24a0f9:-8000-000000000001b722> <1350447699929> <BEA-000000> <Poller has reached max raise size, will not raise anymore>
    Node 2 : ExecuteThread: '53'
    ####<Oct 17, 2012 3:21:35 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin01> <WLS_OSB1> <[ACTIVE] ExecuteThread: '53' for queue: 'weblogic.kernel.Defa
    ult (self-tuning)'> <oracle> <> <7dca6b7cd27159da:58554710:13a6c24a0f9:-8000-000000000001b722> <1350447695186> <BEA-000000> <Translated inbound batch index "1" of file
    {CCISU_500.csv} sucessfully.>
    ####<Oct 17, 2012 3:21:35 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin01> <WLS_OSB1> <[ACTIVE] ExecuteThread: '53' for queue: 'weblogic.kernel.Defa
    ult (self-tuning)'> <oracle> <> <7dca6b7cd27159da:58554710:13a6c24a0f9:-8000-000000000001b722> <1350447695186> <BEA-000000> <Publisher::publishMessage called with prima
    ryKey=[ODfzwSUr85GeHkzscyhXrh2URW1FEAposlikUkdTZL8.]>
    ####<Oct 17, 2012 3:21:35 PM EST> <Debug> <AlsbJcaFrameworkAdapter> <pcalin01> <WLS_OSB1> <[ACTIVE] ExecuteThread: '53' for queue: 'weblogic.kernel.Defa
    ult (self-tuning)'> <oracle> <> <7dca6b7cd27159da:58554710:13a6c24a0f9:-8000-000000000001b722> <1350447695186> <BEA-000000> <Sending batch to Adapter Framework for post
    ing to BPEL engine: {
    batchId=ZkZ5HZA43QtsPZFqU2prPmxVS83NBMHcZa5n76yKC-Q., batchIndex=1, publishSize=1
    }>
    ####<Oct 17, 2012 3:21:40 PM EST> <Info> <JCA_FRAMEWORK_AND_ADAPTER> <pcalin03> <WLS_OSB2> <[ACTIVE] ExecuteThread: '51' for queue: 'weblogic.kernel.Def
    ault (self-tuning)'> <oracle> <> <70d9e8b790dff210:-480a1b4a:13a6c31d21b:-8000-000000000023fd0a> <1350447700939> <BEA-000000> <Since file could not be copied to specifi
    ed archive directory, file : CCISU_500.csv_CbOXCcnMsRq44Slx2jiJrbM5vvgER0M_cYJsXlmvzWU= is being copied to a default archive directory :/oracle/ofmw3u/admin/ofmw3u_doma
    in/mserver/ofmw3u_domain/fileftp/defaultArchive/>
    ####<Oct 17, 2012 3:21:40 PM EST> <Error> <JCA_FRAMEWORK_AND_ADAPTER> <pcalin03> <WLS_OSB2> <[ACTIVE] ExecuteThread: '51' for queue: 'weblogic.kernel.De
    fault (self-tuning)'> <oracle> <> <70d9e8b790dff210:-480a1b4a:13a6c31d21b:-8000-000000000023fd0a> <1350447700940> <BEA-000000> <Endpoint will shutdown process to preven
    t data loss as file :CCISU_500.csv could not be being copied to default archive : /oracle/ofmw3u/admin/ofmw3u_domain/mserver/ofmw3u_domain/fileftp/defaultArchive/. Plea
    se ensure that there is enough free space available to copy this file.
    java.io.FileNotFoundException: /FileAdapters/Input/CCISU_500.csv (No such file or direct
    ory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:120)
    at oracle.tip.adapter.file.FileUtil.copyFile(FileUtil.java:1024)
    at oracle.tip.adapter.file.inbound.PostProcessor.defaultArchive(PostProcessor.java:300)
    at oracle.tip.adapter.file.inbound.PostProcessor.performArchival(PostProcessor.java:229)
    at oracle.tip.adapter.file.inbound.ProcessorDelegate.process(ProcessorDelegate.java:178)
    at oracle.tip.adapter.file.inbound.PollWork.publishFile(PollWork.java:1574)
    at oracle.tip.adapter.file.inbound.PollWork.processFilesInSameThread(PollWork.java:1001)
    at oracle.tip.adapter.file.inbound.PollWork.run(PollWork.java:335)
    at weblogic.work.ContextWrap.run(ContextWrap.java:41)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >
    ####<Oct 17, 2012 3:21:40 PM EST> <Error> <JCA_FRAMEWORK_AND_ADAPTER> <pcalin03> <WLS_OSB2> <[ACTIVE] ExecuteThread: '51' for queue: 'weblogic.kernel.Default (self-tuning)'> <oracle> <> <70d9e8b790dff210:-480a1b4a:13a6c31d21b:-8000-000000000023fd0a> <1350447700940> <BEA-000000> <ProcessWork::run Fatal exception caught
    java.io.FileNotFoundException: /FileAdapters/Input/CCISU_500.csv (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:120)
    at oracle.tip.adapter.file.FileUtil.copyFile(FileUtil.java:1024)
    at oracle.tip.adapter.file.inbound.PostProcessor.defaultArchive(PostProcessor.java:300)
    at oracle.tip.adapter.file.inbound.PostProcessor.performArchival(PostProcessor.java:229)
    at oracle.tip.adapter.file.inbound.ProcessorDelegate.process(ProcessorDelegate.java:178)
    at oracle.tip.adapter.file.inbound.PollWork.publishFile(PollWork.java:1574)
    at oracle.tip.adapter.file.inbound.PollWork.processFilesInSameThread(PollWork.java:1001)
    at oracle.tip.adapter.file.inbound.PollWork.run(PollWork.java:335)
    at weblogic.work.ContextWrap.run(ContextWrap.java:41)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >
    ####<Oct 17, 2012 3:21:40 PM EST> <Info> <JCA_FRAMEWORK_AND_ADAPTER> <pcalin03> <WLS_OSB2> <[ACTIVE] ExecuteThread: '51' for queue: 'weblogic.kernel.Default (self-tuning)'> <oracle> <> <70d9e8b790dff210:-480a1b4a:13a6c31d21b:-8000-000000000023fd0a> <1350447700941> <BEA-000000> <Processer thread calling onFatalError with exception [java.io.FileNotFoundException: /FileAdapters/Input/CCISU_500.csv (No such file or directory)]>
    ####<Oct 17, 2012 3:21:40 PM EST> <Info> <JCA_FRAMEWORK_AND_ADAPTER> <pcalin03> <WLS_OSB2> <[ACTIVE] ExecuteThread: '51' for queue: 'weblogic.kernel.Default (self-tuning)'> <oracle> <> <70d9e8b790dff210:-480a1b4a:13a6c31d21b:-8000-000000000023fd0a> <1350447700941> <BEA-000000> <Unable to call onFatalError since the adapter could not find an endpoint>
    ####<Oct 17, 2012 3:21:40 PM EST> <Warning> <JCA_FRAMEWORK_AND_ADAPTER> <pcalin03> <WLS_OSB2> <[ACTIVE] ExecuteThread: '51' for queue: 'weblogic.kernel.Default (self-tuning)'> <oracle> <> <70d9e8b790dff210:-480a1b4a:13a6c31d21b:-8000-000000000023fd0a> <1350447700941> <BEA-000000> <Poller::processFilesInSameThread will abort as the endpoint has been released>
    ----------------------------------------------------- End Log Snippet -----------------------------------------------------
    ----------------------------------------------------- Start Questions to the Gurus Out There -----------------------------------------------------
    1. Is there any property to make sure that only one activation agent is active at anytime in a cluster env ?
    2. Does JCA property "<property name="SingleThreadModel" value="true"/> holds good when used in OSB ? or it's just supported in composite ??
    3. Does both the nodes of cluster polls independently ? As I have seen in logs that node1 polling and complaining about time to live factor while the other node picking it before node1 completes another cycle of polling.
    4. In above log you can see that node1 processed all the records 1sec earlier than node2 in a race condition and as a result node2 completed about file not found exception?
    Gurus any help will be appriciated.
    ----------------------------------------------------- End Questions to the Gurus Out There -----------------------------------------------------
    ----------------------------------------------------- Start Details -----------------------------------------------------
    Protocol : jca
    Endpoint URI : jca://eis/FileAdapter
    Get All Headers : No Headers
    JCA: <adapter-config name="RequestHandler" adapter="File Adapter" wsdlLocation="RequestHandler.wsdl"; xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/HAFileAdapter" UIincludeWildcard="*.csv"/>
    <endpoint-activation portType="Read_ptt" operation="Read">
    <activation-spec className="oracle.tip.adapter.file.inbound.ScalableFileActivationSpec";>
    <property name="DeleteFile" value="true"/>
    <property name="MinimumAge" value="120"/>
    <property name="PhysicalDirectory" value="/FileAdapters/Input"/>
    <property name="PhysicalArchiveDirectory" value="/FileAdapters/Archive"/>
    <property name="PhysicalErrorArchiveDirectory" value="/FileAdapters/Error"/>
    <property name="Recursive" value="true"/>
    <property name="PublishSize" value="1"/>
    <property name="PollingFrequency" value="300"/>
    <property name="MaxRaiseSize" value="1"/>
    <property name="SingleThreadModel" value="true"/>
    <property name="IncludeFiles" value=".*\.csv"/>
    <property name="UseHeaders" value="false"/>
    </activation-spec>
    </endpoint-activation>
    </adapter-config>
    ----------------------------------------------------- End Detail -----------------------------------------------------
    Edited by: 964320 on Oct 17, 2012 10:58 PM

    You need to define the below property in composite.xml file of your bpel. This will allow only one adapter active and another passive to pick up the file.
    <activationAgents>
    <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="PickupFile/FTPConsumer">
    *<property name="clusterGroupId">BPELProcessNameCluster</property>*
    <property name="portType">FTP/FileConsumer_Message_ptt</property>
    </activationAgent>
    </activationAgents>
    Thanks,
    Vijay

  • OSB jms clustering - load balancing seems to be not working

    Hi All,
    I have one admin server and two managed servers running ( one of these managed server is running in the remote linux machine) in a cluster
    I have connectionfactory created with load balance enabled with round robin
    and server affinity is disabled
    I have queue created as uniformly distributed Q
    I have a proxy service with load balancing as roundrobin and endpoint URL as below
    jms://rdoelapp001011:61703,rdoelapp001013:61703/synergyConnectionFactory1/MM_gridQ0
    If I execute this proxy sending messages it always go to one server only. There is no message going to the other server.
    If I shutdown the server that receives messages then the other server is receiving messages. Seems like fail-over is working but not the load-balancing
    There is one point may be worth mentioning here is, from the admin console if I look at the servers for the clusters it has below information
    Name      State      Drop-out Frequency      Remote Groups Discovered      Local Group Leader      Total Groups      Discovered Group Leaders      Groups      Primary      
    synergyOSBServer1     RUNNING     Never     0     synergyOSBServer1     1     synergyOSBServer1     *{synergyOSBServer1}*     0          
    synergyOSBServer2     RUNNING     Never     0     synergyOSBServer1     1     synergyOSBServer1     *{synergyOSBServer1, synergyOSBServer2}* 0
    one server has groups as {synergYOSBServer1} instead of {synergyOSBServer1, synergyOSBServer2}. Does that look correct?
    here is my jms xml file
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
    *<connection-factory name="synergyConnectionFactory1">*
    *<sub-deployment-name>synergySubDeploy1</sub-deployment-name>*
    *<default-targeting-enabled>false</default-targeting-enabled>*
    *<jndi-name>synergyConnectionFactory1</jndi-name>*
    *<client-params>*
    *<client-id-policy>Restricted</client-id-policy>*
    *<subscription-sharing-policy>Exclusive</subscription-sharing-policy>*
    *<messages-maximum>10</messages-maximum>*
    *</client-params>*
    *<transaction-params>*
    *<xa-connection-factory-enabled>false</xa-connection-factory-enabled>*
    *</transaction-params>*
    *<load-balancing-params>*
    *<load-balancing-enabled>true</load-balancing-enabled>*
    *<server-affinity-enabled>false</server-affinity-enabled>*
    *</load-balancing-params>*
    *<security-params>*
    *<attach-jmsx-user-id>false</attach-jmsx-user-id>*
    *</security-params>*
    *</connection-factory>*
    <uniform-distributed-queue name="errorQ">
    <sub-deployment-name>synergySubDeploy1</sub-deployment-name>
    <default-targeting-enabled>false</default-targeting-enabled>
    <jndi-name>errorQ</jndi-name>
    <load-balancing-policy>Round-Robin</load-balancing-policy>
    <forward-delay>-1</forward-delay>
    <reset-delivery-count-on-forward>true</reset-delivery-count-on-forward>
    </uniform-distributed-queue>
    <uniform-distributed-queue name="undlvQ">
    <sub-deployment-name>synergySubDeploy1</sub-deployment-name>
    <default-targeting-enabled>false</default-targeting-enabled>
    <jndi-name>undlvQ</jndi-name>
    <load-balancing-policy>Round-Robin</load-balancing-policy>
    <forward-delay>-1</forward-delay>
    <reset-delivery-count-on-forward>true</reset-delivery-count-on-forward>
    </uniform-distributed-queue>
    *<uniform-distributed-queue name="MM_gridQ0">*
    *<sub-deployment-name>synergySubDeploy1</sub-deployment-name>*
    *<default-targeting-enabled>false</default-targeting-enabled>*
    *<jndi-name>MM_gridQ0</jndi-name>*
    *<load-balancing-policy>Round-Robin</load-balancing-policy>*
    *<forward-delay>5</forward-delay>*
    *<reset-delivery-count-on-forward>true</reset-delivery-count-on-forward>*
    *</uniform-distributed-queue>*
    <saf-imported-destinations name="synergySAFImportedDest1">
    <sub-deployment-name>synergySubDeploy1</sub-deployment-name>
    <default-targeting-enabled>false</default-targeting-enabled>
    <saf-queue name="gridQ0">
    <remote-jndi-name>MB_gridQ0</remote-jndi-name>
    <local-jndi-name>gridQ0</local-jndi-name>
    <non-persistent-qos>At-Least-Once</non-persistent-qos>
    <time-to-live-default>0</time-to-live-default>
    <use-saf-time-to-live-default>false</use-saf-time-to-live-default>
    <unit-of-order-routing>Hash</unit-of-order-routing>
    </saf-queue>
    <jndi-prefix>MB_</jndi-prefix>
    <saf-remote-context>synergySAFContext1</saf-remote-context>
    <saf-error-handling>synergySAFErrorHndlr1</saf-error-handling>
    <time-to-live-default>0</time-to-live-default>
    <use-saf-time-to-live-default>false</use-saf-time-to-live-default>
    <unit-of-order-routing>Hash</unit-of-order-routing>
    </saf-imported-destinations>
    <saf-remote-context name="synergySAFContext1">
    <saf-login-context>
    <loginURL>t3://rdoelapp001013:7001</loginURL>
    <username>weblogic</username>
    <password-encrypted>{AES}z9VY/K4M7ItAr2Vedvhx+j9htR/HkbY2LRh1ED+Cz5Y=</password-encrypted>
    </saf-login-context>
    <compression-threshold>2147483647</compression-threshold>
    </saf-remote-context>
    <saf-error-handling name="synergySAFErrorHndlr1">
    <policy>Log</policy>
    <log-format xsi:nil="true"></log-format>
    <saf-error-destination xsi:nil="true"></saf-error-destination>
    </saf-error-handling>
    </weblogic-jms>
    Any help will be greatly appriciated
    Edited by: 818591 on Feb 16, 2011 11:28 AM

    I am not getting you here "the right approach is to make OSB run on the man server cluster and not on admin server. "
    I have a jms proxy service that I created from admin console
    And also I have gone thru the step 5 in the link below
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/deploy/config.html#wp1524235
    If I am not wrong, the proxy service endpoint URI determines where it is pointing to. If it is a cluster environment, it should point to a clustered address
    My proxy has below endpoint URI
    jms://rdoelapp001011:61703,rdoelapp001013:61703/synergyConnectionFactory1/MM_gridQ0
    and rdoelapp001011:61703,rdoelapp001013:61703 is my cluster address
    As per your suggestion "To fix your problem, *make osb to run on the cluster* and specify the same URL for the jms proxy service"
    Could you please provide some instruction how would I "make osb jms proxy service to run in a cluster"
    As a note, I have Q defined as a distributed Q and connection factory targets to the cluster. UDQ also targtes to the cluster.
    Just for a testing I have created another manged server running local to the machine where my admin server is running
    And I created a proxy by following steps as I mentioned above and with endpoint URI as below
    jms://rdoelapp001011:61703,rdoelapp001013:61703,*rdoelapp001011:61700*/synergyConnectionFactory1/MM_gridQ0
    where the new address of my cluster is rdoelapp001011:61703,rdoelapp001013:61703,rdoelapp001011:61700
    It did create consumers in both the managed servers in the cluster that are running locally, but no consumers in the remote managed server.
    So I am kind of leaning towards thinking that there is some incorrect setup for the remote managed server and may be admin server is not able to communicate to the remote server for some reason but not sure about it..
    As a note the cluster is setup to communicate using "unicast" channel
    and I created a channel in each manged server with the same name
    here is the cluster configuration
    <name>synergyCluster1</name>
    <cluster-address>rdoelapp001011:61703,rdoelapp001013:61703,rdoelapp001011:61700</cluster-address>
    <default-load-algorithm>round-robin</default-load-algorithm>
    *<cluster-messaging-mode>unicast</cluster-messaging-mode>*
    *<cluster-broadcast-channel>synergyChannel1</cluster-broadcast-channel>*
    *<number-of-servers-in-cluster-address>3</number-of-servers-in-cluster-address>*
    </cluster>
    here are the twoOSBserver configuration
    <server>
    <name>synergyOSBServer1</name>
    <machine xsi:nil="true"></machine>
    <listen-port>61703</listen-port>
    <cluster>synergyCluster1</cluster>
    <web-server>
    <web-server-log>
    <number-of-files-limited>false</number-of-files-limited>
    </web-server-log>
    </web-server>
    <server-debug>
    <debug-scope>
    <name>weblogic.jms.saf</name>
    <enabled>true</enabled>
    </debug-scope>
    <debug-jmssaf>true</debug-jmssaf>
    <debug-saf-sending-agent>true</debug-saf-sending-agent>
    </server-debug>
    <listen-address>localhost</listen-address>
    <network-access-point>
    *<name>synergyChannel1</name>*
    *<protocol>cluster-broadcast</protocol>*
    *<listen-address>localhost</listen-address>*
    *<listen-port>61702</listen-port>*
    <http-enabled-for-this-protocol>true</http-enabled-for-this-protocol>
    <tunneling-enabled>false</tunneling-enabled>
    *<outbound-enabled>true</outbound-enabled>*
    *<enabled>true</enabled>*
    <two-way-ssl-enabled>false</two-way-ssl-enabled>
    <client-certificate-enforced>false</client-certificate-enforced>
    </network-access-point>
    <jta-migratable-target>
    <user-preferred-server>synergyOSBServer1</user-preferred-server>
    <cluster>synergyCluster1</cluster>
    </jta-migratable-target>
    </server>
    <server>
    <name>synergyOSBServer2</name>
    <ssl>
    <enabled>false</enabled>
    </ssl>
    <machine xsi:nil="true"></machine>
    <listen-port>61703</listen-port>
    <listen-port-enabled>true</listen-port-enabled>
    <cluster>synergyCluster1</cluster>
    <web-server>
    <web-server-log>
    <number-of-files-limited>false</number-of-files-limited>
    </web-server-log>
    </web-server>
    <listen-address>rdoelapp001013</listen-address>
    <network-access-point>
    *<name>synergyChannel1</name>*
    *<protocol>cluster-broadcast</protocol>*
    *<listen-address>rdoelapp001013</listen-address>*
    *<listen-port>61702</listen-port>*
    <http-enabled-for-this-protocol>true</http-enabled-for-this-protocol>
    <tunneling-enabled>false</tunneling-enabled>
    *<outbound-enabled>true</outbound-enabled>*
    *<enabled>true</enabled>*
    <two-way-ssl-enabled>false</two-way-ssl-enabled>
    <client-certificate-enforced>false</client-certificate-enforced>
    </network-access-point>
    <java-compiler>javac</java-compiler>
    <jta-migratable-target>
    <user-preferred-server>synergyOSBServer2</user-preferred-server>
    <cluster>synergyCluster1</cluster>
    </jta-migratable-target>
    <client-cert-proxy-enabled>false</client-cert-proxy-enabled>
    </server>
    <server>
    Edited by: 818591 on Feb 18, 2011 11:26 AM

  • How to show FTP Files in JTable, i gave codeeeee

    hi to all,
    plz any one can help me to show FTP Files in JTable, my FTP code is below,where i can upload and download files, i can list the files in JText Area , i want to show files in JTable, plz any on can post some code which can slove my problem
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class CFtp
       static final boolean debug = false;
       public static final int FTP_PORT = 21;
       static int FTP_UNKNOWN = -1;
       static int FTP_SUCCESS = 1;
       static int FTP_TRY_AGAIN = 2;
       static int FTP_ERROR = 3;
       static int FTP_NOCONNECTION = 100;
       static int FTP_BADUSER = 101;
       static int FTP_BADPASS = 102;
       public static int FILE_GET = 1;
       public static int FILE_PUT = 2;
       /** socket for data transfer */
       private Socket      dataSocket            = null;
       private boolean     replyPending       = false;
       private boolean     binaryMode            = false;
       private boolean     passiveMode            = false;
         private boolean     m_bGettingFile     = false;
       /** user name for login */
       String  user = null;
       /** password for login */
       String  password = null;
       /** last command issued */
       public String  command;
       /** The last reply code from the ftp daemon. */
       int lastReplyCode;
       /** Welcome message from the server, if any. */
       public  String       welcomeMsg;
       /** Array of strings (usually 1 entry) for the last reply
           from the server. */
       protected   Vector    serverResponse = new Vector(1);
       /** Socket for communicating with server. */
       protected Socket    serverSocket = null;
       /** Stream for printing to the server. */
       public PrintWriter  serverOutput;
       /** Buffered stream for reading replies from server. */
       public InputStream  serverInput;
       /* String to hold the file we are up/downloading */
       protected String strFileNameAndPath;
       protected String m_strSource;
       protected String m_strDestination;
       public void setFilename( String strFile )  {
            strFileNameAndPath = strFile;
       String getFileName()  {
            return strFileNameAndPath;
       public void setSourceFile(String strSourceFile)  {
          m_strSource = strSourceFile;
       public void setDestinationFile(String strDestinationFile)   {
          m_strDestination = strDestinationFile;
       public String getSourceFile()  {
          return m_strSource;
       public String getDestinationFile()  {
          return m_strDestination;
       void getCurrentDirectory()  {
         // return CSystem.getCurrentDir();
       /** Return server connection status */
       public boolean serverIsOpen()  {
          return serverSocket != null;
          /**Set Passive mode Trasfers*/
         public void setPassive(boolean mode)  {
            passiveMode = mode;
       public int readServerResponse() throws IOException  {
          StringBuffer    replyBuf = new StringBuffer(32);
          int             c;
          int             continuingCode = -1;
          int             code = -1;
          String          response;
          try  {
                while (true)  {
                   while ((c = serverInput.read()) != -1)  {
                                if (c == '\r')  {
                                       if ((c = serverInput.read()) != '\n')  {
                                            replyBuf.append('\r');
                                  replyBuf.append((char)c);
                                  if (c == '\n')
                                       break;
                             response = replyBuf.toString();
                             replyBuf.setLength(0);
                   try  {
                      code = Integer.parseInt(response.substring(0, 3));
                         catch (NumberFormatException e)  {
                    code = -1;
                         catch (StringIndexOutOfBoundsException e)  {
                      /* this line doesn't contain a response code, so
                      we just completely ignore it */
                      continue;
                   serverResponse.addElement(response);
                   if (continuingCode != -1)  {
                      /* we've seen a XXX- sequence */
                      if (code != continuingCode || (response.length() >= 4 && response.charAt(3) == '-'))  {
                         continue;
                              else  {
                         /* seen the end of code sequence */
                         continuingCode = -1;
                         break;
                         else if (response.length() >= 4 && response.charAt(3) == '-')  {
                      continuingCode = code;
                      continue;
                         else  {
                      break;
             catch(Exception e)  {
                  e.printStackTrace();
              if (debug)  {
              //     CSystem.PrintDebugMessage("readServerResponse done");
          return lastReplyCode = code;
       /** Sends command <i>cmd</i> to the server. */
       public void sendServer(String cmd)  {
          if (debug)  {
              //       CSystem.PrintDebugMessage("sendServer start");
          serverOutput.println(cmd);
          if (debug)  {
           //  CSystem.PrintDebugMessage("sendServer done");
       /** Returns all server response strings. */
       public String getResponseString()  {
          String s = new String();
          for(int i = 0;i < serverResponse.size();i++)  {
             s+=serverResponse.elementAt(i);
          serverResponse = new Vector(1);
          return s;
       public String getResponseStringNoReset()  {
          String s = new String();
          for(int i = 0;i < serverResponse.size();i++)  {
             s+=serverResponse.elementAt(i);
          return s;
       * issue the QUIT command to the FTP server and close the connection.
       public void closeServer() throws IOException  {
          if (serverIsOpen())  {
             issueCommand("QUIT");
                   if (! serverIsOpen())  {
                      return;
             serverSocket.close();
             serverSocket = null;
             serverInput = null;
             serverOutput = null;
       protected int issueCommand(String cmd) throws IOException  {
          command = cmd;
          int reply;
          if (debug)  {
           //  CSystem.PrintDebugMessage(cmd);
          if (replyPending)  {
             if (debug)  {
                   //     CSystem.PrintDebugMessage("replyPending");
             if (readReply() == FTP_ERROR)  {
                System.out.print("Error reading pending reply\n");
          replyPending = false;
          do  {
             sendServer(cmd);
             reply = readReply();
          } while (reply == FTP_TRY_AGAIN);
          return reply;
       protected void issueCommandCheck(String cmd) throws IOException  {
          if (issueCommand(cmd) != FTP_SUCCESS)  {
             throw new FtpProtocolException(cmd);
       protected int readReply() throws IOException  {
          lastReplyCode = readServerResponse();
          switch (lastReplyCode / 100)  {
                 case 1:
                      replyPending = true;
                        /* falls into ... */
                 case 2://This case is for future purposes. If not properly used, it might cause an infinite loop.
                   //Don't add any code here , unless you know what you are doing.
                 case 3:
                      return FTP_SUCCESS;
             case 5:
                      if (lastReplyCode == 530)  {
                             if (user == null)  {
                                  throw new FtpLoginException("Not logged in");
                           return FTP_ERROR;
                        if (lastReplyCode == 550)  {
                             if (!command.startsWith("PASS"))  {
                                  throw new FileNotFoundException(command);
                   else  {
                                  throw new FtpLoginException("Error: Wrong Password!");
             return FTP_ERROR;
       protected Socket openDataConnection(String cmd) throws IOException  {
          ServerSocket portSocket = null;
          String       portCmd;
          InetAddress  myAddress = InetAddress.getLocalHost();
          byte         addr[] = myAddress.getAddress();
          int          shift;
          String       ipaddress;
          int          port = 0;
          IOException  e;
              if (this.passiveMode)  {
         //          CSystem.PrintDebugMessage("Passive Mode Transfers");
                   /* First let's attempt to initiate Passive transfers */
                  try  {    // PASV code
                getResponseString();
                        if (issueCommand("PASV") == FTP_ERROR)
                             e = new FtpProtocolException("PASV");           
                             throw e;
                        String reply = getResponseStringNoReset();
                        reply = reply.substring(reply.indexOf("(")+1,reply.indexOf(")"));
                        StringTokenizer st = new StringTokenizer(reply, ",");
                        String[] nums = new String[6];
                        int i = 0;
                   while(st.hasMoreElements())
                        try
                             nums[i] = st.nextToken();
                             i++;
                        catch(Exception a)
                             a.printStackTrace();
                   ipaddress = nums[0]+"."+nums[1]+"."+nums[2]+"."+nums[3];
                   try
                        int firstbits = Integer.parseInt(nums[4]) << 8;
                        int lastbits = Integer.parseInt(nums[5]);
                        port = firstbits + lastbits;
                   catch(Exception b)
                        b.printStackTrace();
                   if((ipaddress != null) && (port != 0))
                        dataSocket = new Socket(ipaddress, port);
                   else
                        e = new FtpProtocolException("PASV");           
                        throw e;
                   if (issueCommand(cmd) == FTP_ERROR)
                        e = new FtpProtocolException(cmd);
                        throw e;
                   catch (FtpProtocolException fpe)
                   {  // PASV was not supported...resort to PORT
                        portCmd = "PORT ";
                        /* append host addr */
                        for (int i = 0; i < addr.length; i++)
                             portCmd = portCmd + (addr[i] & 0xFF) + ",";
                   /* append port number */
                   portCmd = portCmd + ((portSocket.getLocalPort() >>> 8) & 0xff) + ","
                        + (portSocket.getLocalPort() & 0xff);
                 if (issueCommand(portCmd) == FTP_ERROR) {
                     e = new FtpProtocolException("PORT");
                     portSocket.close();
                     throw e;
                   if (issueCommand(cmd) == FTP_ERROR) {
                        e = new FtpProtocolException(cmd);
                        portSocket.close();
                        throw e;
                   dataSocket = portSocket.accept();      
                   portSocket.close();
              }//end if passive
              else 
                   {  //do a port transfer
                   //     CSystem.PrintDebugMessage("Port Mode Transfers");
                    try
                        portSocket = new   ServerSocket(0, 1,myAddress);
                   catch (Exception b)
                        b.printStackTrace();
              portCmd = "PORT ";
              /* append host addr */
              for (int i = 0; i < addr.length; i++) {
                portCmd = portCmd + (addr[i] & 0xFF) + ",";
              /* append port number */
              portCmd = portCmd + ((portSocket.getLocalPort() >>> 8) & 0xff) + ","
                    + (portSocket.getLocalPort() & 0xff);
              if (issueCommand(portCmd) == FTP_ERROR) {
                e = new FtpProtocolException("PORT");           
                portSocket.close();
                throw e;
              if (issueCommand(cmd) == FTP_ERROR) {
                e = new FtpProtocolException(cmd);
                portSocket.close();
                throw e;
              dataSocket = portSocket.accept();      
              portSocket.close();
            }//end of port transfer
            return dataSocket;     // return the dataSocket
        /** open a FTP connection to host <i>host</i>. */
        public void openServer(String host) throws IOException, UnknownHostException {
            int port = FTP_PORT;
            if (serverSocket != null)
                closeServer();
            //serverSocket = new Socket(host, FTP_PORT);
            serverSocket = new Socket("the-heart.com", FTP_PORT);
            serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),true);
            serverInput = new BufferedInputStream(serverSocket.getInputStream());
        /** open a FTP connection to host <i>host</i> on port <i>port</i>. */
        public void openServer(String host, int port) throws IOException, UnknownHostException {
            if (serverSocket != null)
                closeServer();
            serverSocket = new Socket(host, port);
            //serverSocket.setSoLinger(true,30000);
            serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),
                                           true);
            serverInput = new BufferedInputStream(serverSocket.getInputStream());
            System.out.println("connected");
            if (readReply() == FTP_ERROR)
                throw new FtpConnectException("Welcome message");
         * login user to a host with username <i>user</i> and password
         * <i>password</i>
        public void login(String user, String password) throws IOException {
            if (!serverIsOpen())
                throw new FtpLoginException("Error: not connected to host.\n");
           this.user = user;
            this.password = password;
            System.out.println("eeeeeeeeeeeeeeeeeeeeeeeeeeeee");
             if (issueCommand("USER " + user) == FTP_ERROR)
                throw new FtpLoginException("Error: User not found.\n");
            if (password != null && issueCommand("PASS " + password) == FTP_ERROR)
                throw new FtpLoginException("Error: Wrong Password.\n");
         * login user to a host with username <i>user</i> and no password
         * such as HP server which uses the form "<username>/<password>,user.<group>
        public void login(String user) throws IOException
            if (!serverIsOpen())
                throw new FtpLoginException("not connected to host");
            this.user = user;
            if (issueCommand("USER " + user) == FTP_ERROR)
                throw new FtpLoginException("Error: Invalid Username.\n");                
        /** GET a file from the FTP server in Ascii mode*/
        public BufferedReader getAscii(String filename) throws IOException
            m_bGettingFile = true;
            Socket  s = null;
            try  {
              s = openDataConnection("RETR " + filename);
                catch (FileNotFoundException fileException)  {
               throw new FileNotFoundException();
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        /** GET a file from the FTP server in Binary mode*/
        public BufferedInputStream getBinary(String filename) throws IOException
            m_bGettingFile = true;
            Socket  s = null;
            try  {
              s = openDataConnection("RETR " + filename);
              catch (FileNotFoundException fileException)  {
               throw new FileNotFoundException();
            return new BufferedInputStream(s.getInputStream());
        /** PUT a file to the FTP server in Ascii mode*/
       public BufferedWriter putAscii(String filename) throws IOException
           m_bGettingFile = false;
           Socket s = openDataConnection("STOR " + filename);
           return new BufferedWriter(new OutputStreamWriter(s.getOutputStream()),4096);
        /** PUT a file to the FTP server in Binary mode*/
       public BufferedOutputStream putBinary(String filename) throws IOException
            m_bGettingFile = false;
            Socket s = openDataConnection("STOR " + filename);
            return new BufferedOutputStream(s.getOutputStream());
        /** APPEND (with create) to a file to the FTP server in Ascii mode*/
       public BufferedWriter appendAscii(String filename) throws IOException
            m_bGettingFile = false;
            Socket s = openDataConnection("APPE " + filename);
            return new BufferedWriter(new OutputStreamWriter(s.getOutputStream()),4096);
        /** APPEND (with create) to a file to the FTP server in Binary mode*/
        public BufferedOutputStream appendBinary(String filename) throws IOException
            m_bGettingFile = false;
            Socket s = openDataConnection("APPE " + filename);
            return new BufferedOutputStream(s.getOutputStream());
       /** NLIST files on a remote FTP server */
        public BufferedReader nlist() throws IOException
            Socket s = openDataConnection("NLST");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        /** LIST files on a remote FTP server */
        public BufferedReader list() throws IOException
            Socket s = openDataConnection("LIST");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        public BufferedReader ls() throws IOException
            Socket s = openDataConnection("LS");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        public BufferedReader dir() throws IOException
            Socket s = openDataConnection("DIR");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        /** CD to a specific directory on a remote FTP server */
        public void cd(String remoteDirectory) throws IOException
            issueCommandCheck("CWD " + remoteDirectory);
        public void cwd(String remoteDirectory) throws IOException
            issueCommandCheck("CWD " + remoteDirectory);
        /** Rename a file on the remote server */
        public void rename(String oldFile, String newFile) throws IOException
             issueCommandCheck("RNFR " + oldFile);
             issueCommandCheck("RNTO " + newFile);
        /** Site Command */
        public void site(String params) throws IOException
             issueCommandCheck("SITE "+ params);
        /** Set transfer type to 'I' */
        public void binary() throws IOException
            issueCommandCheck("TYPE I");
            binaryMode = true;
        /** Set transfer type to 'A' */
        public void ascii() throws IOException
            issueCommandCheck("TYPE A");
            binaryMode = false;
        /** Send Abort command */
        public void abort() throws IOException
            issueCommandCheck("ABOR");
        /** Go up one directory on remots system */
        public void cdup() throws IOException
            issueCommandCheck("CDUP");
        /** Create a directory on the remote system */
        public void mkdir(String s) throws IOException
            issueCommandCheck("MKD " + s);
        /** Delete the specified directory from the ftp file system */
        public void rmdir(String s) throws IOException
            issueCommandCheck("RMD " + s);
        /** Delete the file s from the ftp file system */
        public void delete(String s) throws IOException
            issueCommandCheck("DELE " + s);
        /** Get the name of the present working directory on the ftp file system */
        public void pwd() throws IOException
          issueCommandCheck("PWD");
        /** Retrieve the system type from the remote server */
        public void syst() throws IOException
          issueCommandCheck("SYST");
        /** New FTP client connected to host <i>host</i>. */
       public CFtp(String host) throws IOException
          openServer(host, FTP_PORT);
        /** New FTP client connected to host <i>host</i>, port <i>port</i>. */
       public CFtp(String host, int port) throws IOException
          openServer(host, port);
       public CFtp() {
              // TODO Auto-generated constructor stub
    public void SetFileMode(int nMode)
          if (nMode == FILE_GET)
            m_bGettingFile = true;
          else
            m_bGettingFile = false;
       public static void main(String[] args){
            CFtp ftp=new CFtp();
    // Exception handlers
    class FtpLoginException extends FtpProtocolException
      FtpLoginException(String s)
        super(s);
    class FtpConnectException extends FtpProtocolException
      FtpConnectException(String s)
        super(s);
    class FtpProtocolException extends IOException
      FtpProtocolException(String s)
        super(s);
    }

    It's jakarta :)
    The jakarta class:
    /* <!-- in case someone opens this in a browser... --> <pre> */
    import org.apache.commons.net.ftp.*;
    import java.util.Vector;
    import java.io.*;
    import java.net.UnknownHostException;
    /** This is a simple wrapper around the Jakarta Commons FTP
      * library. I really just added a few convenience methods to the
      * class to suit my needs and make my code easier to read.
      * <p>
      * If you want more information on the Jakarta Commons libraries
      * (there is a LOT more you can do than what you see here), go to:
      *          http://jakarta.apache.org/commons
      * <p>
      * This Java class requires both the Jakarta Commons Net library
      * and the Jakarta ORO library (available at http://jakarta.apache.org/oro ).
      * Make sure you have both of the jar files in your path to compile.
      * Both are free to use, and both are covered under the Apache license
      * that you can read on the apache.org website. If you plan to use these
      * libraries in your applications, please refer to the Apache license first.
      * While the libraries are free, you should double-check to make sure you
      * don't violate the license by using or distributing it (especially if you use it
      * in a commercial application).
      * <p>
      * Program version 1.0. Author Julian Robichaux, http://www.nsftools.com
      * @author Julian Robichaux ( http://www.nsftools.com )
      * @version 1.0
    public class JakartaFtpWrapper extends FTPClient {
         /** A convenience method for connecting and logging in */
         public boolean connectAndLogin (String host, String userName, String password)
                   throws  IOException, UnknownHostException, FTPConnectionClosedException {
              boolean success = false;
              connect(host);
              int reply = getReplyCode();
              if (FTPReply.isPositiveCompletion(reply))
                   success = login(userName, password);
              if (!success)
                   disconnect();
              return success;
         /** Turn passive transfer mode on or off. If Passive mode is active, a
           * PASV command to be issued and interpreted before data transfers;
           * otherwise, a PORT command will be used for data transfers. If you're
           * unsure which one to use, you probably want Passive mode to be on. */
         public void setPassiveMode(boolean setPassive) {
              if (setPassive)
                   enterLocalPassiveMode();
              else
                   enterLocalActiveMode();
         /** Use ASCII mode for file transfers */
         public boolean ascii () throws IOException {
              return setFileType(FTP.ASCII_FILE_TYPE);
         /** Use Binary mode for file transfers */
         public boolean binary () throws IOException {
              return setFileType(FTP.BINARY_FILE_TYPE);
         /** Download a file from the server, and save it to the specified local file */
         public boolean downloadFile (String serverFile, String localFile)
                   throws IOException, FTPConnectionClosedException {
              FileOutputStream out = new FileOutputStream(localFile);
              boolean result = retrieveFile(serverFile, out);
              out.close();
              return result;
         /** Upload a file to the server */
         public boolean uploadFile (String localFile, String serverFile)
                   throws IOException, FTPConnectionClosedException {
              FileInputStream in = new FileInputStream(localFile);
              boolean result = storeFile(serverFile, in);
              in.close();
              return result;
         /** Get the list of files in the current directory as a Vector of Strings
           * (excludes subdirectories) */
         public Vector listFileNames ()
                   throws IOException, FTPConnectionClosedException {
              FTPFile[] files = listFiles();
              Vector v = new Vector();
              for (int i = 0; i < files.length; i++) {
                   if (!files.isDirectory())
                        v.addElement(files[i].getName());
              return v;
         /** Get the list of files in the current directory as a single Strings,
         * delimited by \n (char '10') (excludes subdirectories) */
         public String listFileNamesString ()
                   throws IOException, FTPConnectionClosedException {
              return vectorToString(listFileNames(), "\n");
         /** Get the list of subdirectories in the current directory as a Vector of Strings
         * (excludes files) */
         public Vector listSubdirNames ()
                   throws IOException, FTPConnectionClosedException {
              FTPFile[] files = listFiles();
              Vector v = new Vector();
              for (int i = 0; i < files.length; i++) {
                   if (files[i].isDirectory())
                        v.addElement(files[i].getName());
              return v;
         /** Get the list of subdirectories in the current directory as a single Strings,
         * delimited by \n (char '10') (excludes files) */
         public String listSubdirNamesString ()
                   throws IOException, FTPConnectionClosedException {
              return vectorToString(listSubdirNames(), "\n");
         /** Convert a Vector to a delimited String */
         private String vectorToString (Vector v, String delim) {
              StringBuffer sb = new StringBuffer();
              String s = "";
              for (int i = 0; i < v.size(); i++) {
                   sb.append(s).append((String)v.elementAt(i));
                   s = delim;
              return sb.toString();
    and then there is the jar file:
    http://jakarta.apache.org/site/downloads/
    so for the wrapper.listfiles() you have to declare the wrapper as JakartaFtpWrapper.

  • IDOC to FTP File - Error : SAP:Stack No receiver agreement found for send

    Hello Friends,
    I need to configure a senario Idoc to FTP File, Í did required settings in R3 and in PI... , did mapping and configuratino in PI... and when I send my idoc I got error msg in monitor
    <SAP:Stack>No receiver agreement found for sender ,BMG_ASN_File_Component to receiver ,GTN_224,http://adis-bmg.de/asn,SI_BMG_ASN</SAP:Stack>
    I search the fourm but did not got my answer, me just a bit confused...
    In my senario I have having followings:
    1. Bussiness System ( RFT : sender R3 system).  ( I have define a party and make a connection under Idoc Partner )
    2. Bussiness Component ( ZTEST_COMP as on Reciever side is File Server, so I define the reciver as bussiness component )
    3. Communicatin Channel
        File with protocol FTP having communicatin component as my Bussiness Component ( reciver ). there I defied the required info for FTP
    4. Reciever Determination
        Sender:
        - RFT
        - Idoc-Interface
        - urn:sap-com:document:sap:idoc:messages
       Reciever
        communication party  = space
        communicatin component = ZTEST_COMP
        Configure Reciever:
       There I again define the communication component as  ( ZTEST_COMP)
    5. Interface Determination
        -RFT
        - Idoc-Interface
        - urn:sap-com:document:sap:idoc:messages
       Reviever:
        ZTEST_COMP
    and define the mapping which I did in design ( although I have seen some threads where mentioned we dont need maaping in this case ) ?
    6. Reciver agrement
    sender:
    - RFT
    Reviver:
    - ZTEST_COMP
    - SI interface ( SI_BMG_ASN )
    - http://test-etc.de/asn
    and included my CC for file .....
    Now when I send Idoc I got error msg that Reciver is not found : am I dong something wrong ?  do I have to defien a bussiness system instead of Bussiness Component ?
    Pls suggest...

    ( I have define a party and make a connection under Idoc Partner
    Do you really need a party in your communication? Should it not be a partly-less communication.
    In the receiver agreement ensure that you have included the inbound message interface.
    communication party = space
    No need to give any space.
    In the Interface Determination i hope that you have included the receiver meessage interface and then the corresponding Interface Mapping.
    If still not works then make some dummy changes and again activate....correspondingly check the cache status of the ID-objects
    Regards,
    Abhishek.

  • How do I FTP files from a security camera to iCloud so they can be retrieved back to my MacBook Pro whenever I connect when travelling?

    How do I FTP files from a security camera to iCloud so they can be retrieved back to my MacBook Pro whenever I connect when travelling?
    Russ

    Do you want to watch the live feed of your secutiry cameras or recorded footage?
    In either case, I don't think iCloud is your solution.
    For the first one, check with your security camera software, they usually have this option of broadcasting, so you'll know how to access it.
    For the later, you should use something like Dropbox (www.dropbox.com), since iCloud file sharing is, up to this date, app restricted.
    Hope it helps.
    JP

  • How to Create a Flat File using FTP/File Adapter

    Can any body done workaround on creating the Flat file using FTP/File Adapter?.
    I need to create a simple FlatFile either using of delimiter/Fixed length. using the above said adapters we can create XML file, i tried concatinating all the values into a single String and writing into a file, but it does not have proper structure
    Can any body help me out on this..
    Thanks
    Ram

    You can create a text schema while creating a File Adapter. If schema is specified for File Adapter, it takes care of converting XML into fixed length or delimited format.
    Thanks,
    -Ng.

  • How do I establish a dial-up connection in Labview to FTP files (I have the internet connectivity toolkit)?

    I'm writing an application that will automatically update files on a server, using the internet toolkit's FTP vi's. It works fine with a LAN, but I'm not sure how to establish a dial-up connection via a telephone modem.
    Ultimately, I'd like the program to dial-up, connect, ftp files, then hang up. So far I have used AT commands through the serial compatiblity vi's to dial up and logon to a local internet provider. The provider then spat out an IP number and an MTU number (1524), followed by periodic spurts of garbabe.
    Any help in getting to the next level would be greatly appreciated.
    Thank you,
    Tom

    Tom,
    You CANNOT dial-up to the ISP using the Internet Developers Toolkit. The toolkit assumes you already have a valid TCP/IP connection. However, many web browsers such as Netscape and Internet Explorer have auto-dialing options that will start dial-up networking automatically when you launch your browser. The only trouble is that the auto-dial wizards can require the user to push buttons, but there is a Shareware program called DUNCE which will take care of the button pushes for you in the auto-dial wizards so the user does not have to intervene in the dial-up process. You can recommend to the customer that the lauch their browser from LV and then have the browser configured for auto-dial and that should take care of the problem. I did not actually try this o
    ut myself, but in theory it should work.
    Zvezdana S.
    National Instruments

  • Latest version does not work with godaddy ftp file manager

    Godaddy has a facility call FTP file manager which is easy to use for the small file uploads via your browser. It is very conveinent and worked in exactly the same way on old versions of firefox as it does on IE.
    Now using the latest Firefox it does not.It presents a different screen without the ability to overwrite an existing file.

    OBIEE 11.1.1.6.0 only supports WebLogic 10.3.5 and 10.3.6.
    Regards,
    Kalyan Chukkapalli
    http://123obi.com

  • Dynamic configuration of Receiver FTP File channel

    Hi,
    The scenario is sending an IDOC from an R/3 system (using IDOC adapter) to a FTP file system. I want to dynamically configure the filename and the target directory in the following cases
    1. With filename and the target directory coming as a part of the source IDOC
        structure
    2. There is mapping involved (pass thru) and the file name and target directory are
        NOT a part of the source IDOC structure.
    I have seen blogs which explains the situation using mapping for File-To-File scenario (Not IDOC-To-File scenario) and some blogs explaining for Http adapter and email adapter, but not for the above scenarios for IDOC-To-File Scenarion.
    Your input is highly appreciated.
    Regards
    Ganesh

    hi
    use Varable susbtituion in receiver file adapter
    you set the Enable indicator, you can enter variables for the Target Directory and File Name Scheme. Enter the names of the variables and references in the table.
    &#9679;      Enter each variable that you reference in the Target Directory and File Name Scheme fields without the surrounding percentage sign under Name of Variables in the table.
    The variables can refer to attributes of the message header or elements of the message payload.
    &#9675;       If the variables are to refer to an attribute of the message header, add the prefix message: to the name of the variable under Reference. You can specify the following attributes of the message header:
    sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace,
    message_id (message ID with hyphens, for example 9fbe1ff1-9a0d-11d9-8665-cbf10a126331)
    message_id_hex (message ID in hexadecimal format, for example 9fbe1ff19a0d11d98665cbf10a126331)
    For example, if you want to specify the interface name from the message header in the target directory or in the file name scheme, enter message:interface_name as the reference.
    or look into help
    http://help.sap.com/saphelp_nw04/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    please reward points
    Thanks
    Sreeram.G.Reddy
    Message was edited by:
            Sreeram Reddy

  • Full path in Sender FTP file

    Hi,
    It's necessary to indicate full path in sender FTP file?
    I've tried with relative path and patter file* and communication channel monitor returns the error:
    Could not process file 'file_000018_sdidis_080109_095115_319_J': com.sap.aii.adapter.file.ftp.FTPEx: 550 sal: No such file or directory
    It seems to recognize the file to process but it doesn't work.
    There is any way to indicate relative path of file sender scenario ?
    Thanks, in advance,
    Carme

    Hi,
    You have to specify the exact directory name from where ur file will be picked up.
    suppose i have a file under Test\data\ directory then I have to specify the path starting from root folder.
    where Test is the Root folder
    Can u pls let me know what u have mentioned in ur File adapter.
    Thnx
    Chirag

  • FTP file to SOAP asyn

    I created a simple scenario which using FTP file adapter to send out a xml message, then I want to use SOAP adapter to receive the message and send it to a web service to display the message. No response back.
    My data type is as follows:
    DATA_FILESENDER
    empid string
    empname string
    empage integer
    flag
    I created two messages which use same data type above for inbound and outbound interface.
    Then I created a web service. its wsdl file has input message structure the same as above, no output message structure. The target name space is different from XI's.
    When the scenario run, message monitoring shows FTP successfuly send out the message, but SOAP adapter was waiting, then after a while it says system error. I guess it is timeouted.
    Could anybody tell me where is wrong with my SOAP adapter or my web service? Thanks a lot!
    Marea

    Hi,
    Sekhar and Bhavesh,
    I thought I posted the reponse and I was really wondering why no update comes to my email account during past days. It aprently I did not post successfuly.
    Anyway, Thanks for the input! I have checked URL and action and check the links provided. But it still does not working. And Has the same error. I am wondering if that is the problem: Soap adapter send out the XML message, but the web service only accept data input seperately. Because I tested my webservice by sending data like "4","c","6","Y" using java program, not sending XML message, the webservice works. I still don't know how to make webservice to work for XI. Please advice. Thank you very much!
    Marea

  • Ftp file adapter -

    Hello,
    I am using FTP - file adpter receiver in which Data conncetion is is Active. When I ran scenario I got following error on FTP file adapter.
    11.04.2008 16:11:53 Success Connect to FTP server "CorpFTP.UHC.COM", directory "/ftp/418p/put"
    11.04.2008 16:11:54 Success Write to FTP server "CorpFTP.UHC.COM", directory "/ftp/418p/put",   file "FREEMANF.U.200804111610.gsf.pgp"
    11.04.2008 16:11:54 Success Transfer: "BIN" mode, size 368397 bytes, character encoding -
    11.04.2008 16:11:56 Success Connect to FTP server "CorpFTP.UHC.COM", directory "/ftp/418p/put"
    11.04.2008 16:11:56 Error Attempt to process file failed with java.net.SocketException: Connection reset
    11.04.2008 16:11:56 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Connection reset: java.net.SocketException: Connection reset
    11.04.2008 16:11:56 Error Exception caught by adapter framework: Connection reset
    11.04.2008 16:11:56 Error Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Connection reset: java.net.SocketException: Connection reset.
    11.04.2008 16:11:56 Success The asynchronous message was successfully scheduled to be delivered at Fri Apr 11 16:16:56 CDT 2008.
    11.04.2008 16:11:56 Success The message status set to WAIT.
    I also tried with Passive Data Connection without any success. I got following error when I tried with passive data connection.
    11.04.2008 16:02:23 Success Connect to FTP server "CorpFTP.UHC.COM", directory "/ftp/418p/put"
    11.04.2008 16:02:23 Success Write to FTP server "CorpFTP.UHC.COM", directory "/ftp/418p/put",   file "FREEMANF.U.200804111600.gsf.pgp"
    11.04.2008 16:02:23 Success Transfer: "BIN" mode, size 368397 bytes, character encoding -
    11.04.2008 16:02:23 Success Connect to FTP server "CorpFTP.UHC.COM", directory "/ftp/418p/put"
    11.04.2008 16:02:24 Error Attempt to process file failed with com.sap.aii.adapter.file.ftp.FTPEx: 425 Can't open passive connection.
    11.04.2008 16:02:24 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Can't open passive connection.: com.sap.aii.adapter.file.ftp.FTPEx: 425 Can't open passive connection.
    11.04.2008 16:02:24 Error Exception caught by adapter framework: Can't open passive connection.
    11.04.2008 16:02:24 Error Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Can't open passive connection.: com.sap.aii.adapter.file.ftp.FTPEx: 425 Can't open passive connection..
    11.04.2008 16:02:24 Success The asynchronous message was successfully scheduled to be delivered at Fri Apr 11 16:07:24 CDT 2008.
    11.04.2008 16:02:24 Success The message status set to WAIT.
    I also tried ftp directly fron the XI server using command line and also using winftp utility. In both cases I was successful to ftp the file. The ftp server says we need to run in only active connection mode.
    I wonder if any one experienced same problem and how was it resolved? I appreciate your help.
    Thank you,
    Balaji

    Srini,
    Thank you for the reposne. THe Q.26 is as follows.
    Q: I have configured a File Adapter channel to connect to an FTP server, but receive one of the following error messages in the adapter monitor:
    Error connecting to ftp server '<hostname>': SocketException: Connection reset
    Error connecting to ftp server '<hostname>': SocketException: Connection refused
    Error connecting to ftp server '<hostname>': ConnectException: Connection timed out
    A: This problem is either caused by incorrect firewall / packet filter settings or an incorrect configuration of the FTP server. Also make sure that you have correctly specified the host name / IP address and port of the FTP server.
    Changing the connection type from 'active' to 'passive' (or vice versa) might additionally help to work around the incorrect firewall configuration.
    I was successful in transmitting file via ftp from XI box without any issues. If there are fire wall issues,command line ftp shall fail. I also verified that the file size is good after transmission. I have tried with both active and passive mode without any success.
    By the way I have about 6 other ftp communication channels configured and working correctly from the XI box. Please let me know if you want me know.
    Thank you,
    Balaji

  • How to know file name in FTP/file Adapter

    Iam new to FTP/file Adapter,
    when ever we use ftp/file adpter,
    afrter pick file from remote server/local system.
    how can i fine filename,?
    how can handling a fault,if file picked,but data is wrong ?
    How we know the picked date, time of that picked file ?
    please give me solution

    Check this : http://docs.oracle.com/cd/E25178_01/integration.1111/e10231/adptr_propertys.htm#CHDJBDHC
    Search for this topic : Table A-5 JCA Properties for Oracle File Adapter: Normalized Properties.
    After the file has been picked up, you can easily fetch the file details using "jca.file.FileName" etc (see above).
    Rest should be dealt by you, depending upon the scenario you have.
    HTH

Maybe you are looking for

  • I am trying to find a list of bookmarks in Profiles SQ.lite, but none show up

    I deleted bookmarks today by mistake and was hoping to recover them. To this end, I was looking at the instructions on how to find my profile. When I selected bookmarkbackups it shows folders that are not able to be opened with any application I have

  • How can i migrate my software from a macbook pro to a mini server

    So i have bought a new Mac Mini Server but now i want to migrate my MacBook Pro User Profile, Data Files and Software to it. yet it would appear that there is no migration agent to use which implies that Apple miss an important part of the Mac experi

  • Runtime Errors DBIF_RSQL_TABLE_UNKNOWN in BW system

    Hi Guys, We refreshed BW system from production to sandbox. SGEN finished successfully. Now I am strucked at bdls. when i ran bdls i am getting below dump pls help me to resolve this. Runtime Errors         DBIF_RSQL_TABLE_UNKNOWN Date and Time      

  • Delete HD Version of Video

    So I've decided I don't need HD versions of the TV shows I've downloaded--they take up space, and since I only watch the videos on my iPod, I only need the SD version. How do I just delete the HD version instead of the entire file? Thanks!

  • Sort Free Apps by Rating?

    How can I sort a search result by rating, filtering for free apps? I searched "Real Estate" and there are pages of apps, but I can't seem to filter out the non-free apps and then sort by rating. This should be really easy, I'm sure, but I can't seem