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

Similar Messages

  • BPEL Process with multiple file types using one FTP adapter is not working

    i created a bpel process which will fetch the files from remote location using FTP adapter.
    Now the process works for only one format or file type like *.xls.
    How can i use more than one file format in one FTP adapter.
    OR
    is there any other way to do it.
    file type assignation is 5th step in FTP adapter configuration.
    i have tried *.xls,*.csv and *.xls;*.csv and *.xls:*.csv by seperating with comman, colon, space... still not working.
    i read the documentation *.* will not work.. for one file format it's working fine.
    looking forward for reply as soon as possible.

    Are you positive that it is not working? I'm not sure how you can use one FTP adapter for multiple file types unless the underlying data is exactly the same format or you are processing it as opaque data. Sometimes when a FTP adapter chokes on a file with a bad structure it doesn't create a BPEL instance, it simply moves the bad file to a separate folder.
    So I assume you are using opaque as the data type instead of using an XSD element?
    That said, I don't think you can put two separate file types in the filter. Is it possible for you to do something like: CommonFileName*.* or do you have similar files with other extensions?
    I know the above probably isn't of much help, but I had so many problems with the FTP adapter and its lack of features that I am writing my own. Unfortunately that is a large undertaking and there isn't any good documentation of JCA resource adapter / BPEL PM integration.

  • FTP/File adapter with Fixed Position File Format

    Hi All,
    Can any one guide me how to deal with the fixed position files while using File or FTP adapters?
    Thanks In advance

    Hi,
    Have a luk at the below link it has gud examples:
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm#CCGIBHFH

  • How to test BPEL Process that starts with a pick consuming a JMS message

    Hi,
    We are using App Server v 10.1.3.3.0 and attempting to test a BPEL process which starts with a pick operation which is awaiting a JMS message on a specific queue.
    We are using the Oracle JMS adapter to achieve this.
    Is there any way in which this particular configuration can be easily tested using the BPEL testing framework? I have problems when I write the first initiate XML statement in my test case (stack trace below)
    <2011-01-27 10:23:47,028> <ERROR> <ProvisioningInterface.collaxa.cube.bpeltest> test run failed!
    ORABPEL-20011
    Instance initiation error.
    An error occurred while launching an instance for suite "BasicTest", test "baseline.xml".
    Please examine the log file for details or contact the system administrator.
    at com.collaxa.cube.engine.test.BPELTestRunManager.initiate(BPELTestRunManager.java:218)
    at com.collaxa.cube.ejb.impl.BPELTestBean.runSuites(BPELTestBean.java:625)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    Unfortunately, there are no further details or any example I can see which simulate the kind of setup I have for my test.
    Any help much appreciated,
    Kind Regards,
    Colin.

    Hi,
    I assume you mean the JMS example under the $OH BPEL examples area. Unfortunately, this only shows how to get a BPEL process kicked off by awaiting a JMS message - but there is no test code there! There are specific examples which show off the testing framework facilities but it appears that all the examples which use async type of interactions are in the middle of a process which is kicked off by a normal synchronous client interaction.
    Any further help much appreciated.
    Colin.

  • Jms clustering with spring

    Hi
    i have created the jms clustering configuration in weblogic 10.3.3 that i am facing issues in the connection queue like this
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'queueConnectionFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Unable to resolve 'QueueConnectionFactory'. Resolved ''; remaining name 'QueueConnectionFactory'
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
    and i have configured servers below
    clustered the managed servers MS-1 and MS-2
    Servers Targets
    JMS Server Admin server
    JMS Module cluster
    connection queue cluster
    queue JMSServer
    i have tried with the 2 different JMS servers for managed servers
    Servers Targets
    JMS Server - 1 MS-1
    JMS Server - 2 MS-2
    JMS Module cluster
    connection queue cluster
    queue JMSServer - 1 and JMSServer - 2
    so, please help us to configure the JMS clustering with spring.
    Note : please find the spring - applicationContext.xml below thats is used to configure the connection factory and jms queue.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
         <bean id="invoiceListener" class="com.spring.jms.InvoiceMDB" />
         <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
              <property name="environment">
                   <props>
                        <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                        <prop key="java.naming.provider.url">t3://localhost:6001,localhost:6003,localhost:6005</prop>
                   </props>
              </property>
         </bean>
         <bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
              <property name="jndiTemplate"><ref bean="jndiTemplate" /></property>
              <property name="jndiName"><value>QueueConnectionFact</value></property>
         </bean>
         <bean id="invoiceQueueTemplate" class="org.springframework.jms.core.JmsTemplate">
              <property name="connectionFactory"><ref bean="queueConnectionFactory" /></property>
              <property name="destinationResolver"><ref bean="jmsDestinationResolver" /></property>
         </bean>
         <bean id="jmsDestinationResolver" class="org.springframework.jms.support.destination.JndiDestinationResolver">
              <property name="jndiTemplate"><ref bean="jndiTemplate" /></property>
              <property name="cache"><value>true</value></property>
         </bean>
         <bean id="jmsInvoiceSender" class="com.spring.jms.InvoiceQueueSender">
              <property name="jmsTemplate"><ref bean="invoiceQueueTemplate" /></property>
         </bean>
         <bean id="invoiceQueue" class="org.springframework.jndi.JndiObjectFactoryBean">
              <property name="jndiTemplate"><ref bean="jndiTemplate"/></property>
              <property name="jndiName"><value>MyQueue</value></property>
         </bean>
         <bean id="Invoicelistener" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
         <property name="concurrentConsumers" value="5" />
         <property name="connectionFactory" ref="queueConnectionFactory" />
         <property name="destination" ref="invoiceQueue" />
         <property name="messageListener" ref="invoiceListener" />
         <property name="sessionAcknowledgeModeName" value="AUTO_ACKNOWLEDGE" />
    <property name="sessionTransacted" value="true" />
         </bean>
    </beans>

    Are you sure you have defined the correct JNDI-name in the Spring config file?
    An example set-up of a domain can be found here - http://middlewaremagic.com/weblogic/?p=7795 (the script presented in the create domain section)
    This is basically the same set-up you have, except that a distributed queue is being used that is targeted to JMS Servers through a subdeployment.
    The Spring configuration looks as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
        <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
            <property name="environment">
                <props>
                    <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                    <prop key="java.naming.provider.url">t3://192.168.1.50:9001,192.168.1.50:9002</prop>
                </props>
            </property>
        </bean>
        <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
            <property name="jndiTemplate" ref="jndiTemplate"/>
            <property name="jndiName" value="jms/ConnectionFactory"/>
        </bean>
        <bean id="destination" class="org.springframework.jndi.JndiObjectFactoryBean">
            <property name="jndiTemplate" ref="jndiTemplate"/>
            <property name="jndiName" value="jms/CompanyQueue"/>
        </bean>
        <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
            <property name="connectionFactory" ref="connectionFactory"/>
            <property name="defaultDestination" ref="destination"/>
        </bean>
        <bean id="taskExecutor" class="org.springframework.scheduling.commonj.WorkManagerTaskExecutor">
            <property name="workManagerName" value="java:comp/env/default"/>
            <property name="resourceRef" value="true"/>
        </bean>
        <bean class="org.springframework.jms.listener.SimpleMessageListenerContainer">
            <property name="connectionFactory" ref="connectionFactory"/>
            <property name="destination" ref="destination"/>
            <property name="messageListener" ref="receiver"/>
            <property name="taskExecutor" ref="taskExecutor"/>
        </bean>
        <bean id="sender" class="model.logic.JMSSender">
            <property name="jmsTemplate" ref="jmsTemplate"/>
        </bean>
        <bean id="receiver" class="model.logic.JMSReceiver"/>
    </beans>To test create a servlet, for example,
    public class TestServlet extends HttpServlet {
        protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            JMSSender jmsSender = SpringUtilities.getJMSSender();
            jmsSender.sendMessage();
            System.out.println("message send by the testservlet");
    }and web.xml as
    <web-app ...>
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:spring-config.xml</param-value>
        </context-param>
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
        <!-- default weblogic work manager -->
        <resource-ref>
            <res-ref-name>default</res-ref-name>
            <res-type>commonj.work.WorkManager</res-type>
            <res-auth>Container</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
        </resource-ref>
        <!-- default weblogic timer manager -->
        <resource-ref>
            <res-ref-name>tm/default</res-ref-name>
            <res-type>commonj.timers.TimerManager</res-type>
            <res-auth>Container</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
        </resource-ref>
        <servlet>
            <servlet-name>TestServlet</servlet-name>
            <servlet-class>test.TestServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>TestServlet</servlet-name>
            <url-pattern>/testservlet</url-pattern>
        </servlet-mapping>
    </web-app>with this set-up the JMS clustered and Spring is able to use it on both servers.

  • Problem with gettigs Timestamp for a FTP files

    Hi All,
    I try to get a files from FTP location to my location Pc using enterprisedt.net.ftp.FTPCient. I need to get the fides from FTP location and copy that files in local with original timestamp.
    ex.
    client.get(localfilenamepath,remotefilename);
    Date ftpdate= client .modtime(remoteFilename);
    after coping file to my local pc,i need to set the original timestamp of the remote file.
    localfile.setLastModified(ftpdate.getTime);
    in that case,i cannot get the original time but the date will updated correct.
    appreciate if anyone give me a solution.
    Thanks
    Message was edited by:
    mayen

    After setting lastmodified time,the date only updated with original but the time is bit differnt (i.e) its updated with some time different
    for ex,
    FTP File shows>> 30/05/2006 1:39PM
    after coping in local file>> 30/05/2006 5:39 AM.
    The original ftp file's time is update with different one.
    How do i set the time also the same one.
    Message was edited by:
    mayen
    Message was edited by:
    mayen

  • 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.

  • Help with FTP files in Tiger

    Ever since I installed Tiger on this computer, I am unable to FTP files to my ISP. I have tried various client software solutions (Dreamweaver, Fetch, Bullet Proof). They all act like the connection times out before the file is uploaded. I am able to upload files from another computer on the same network that runs 10.3.9...but that is not a very convenient solution. I have checked to make sure that my Network settings are the same for both of these computers. Any other suggestions? I can log on and see the remove server directory...but cannot upload files.
    Thanks in advance for your sage insight!
    G5 Dual 1.8 GHz   Mac OS X (10.4.8)  

    Utilities>Terminal.
    Command line will have look something like mine:
    Mini:~ rick$[]
    on the command line type:
    ftp <enter>
    (new prompt appears):
    ftp>
    On th ftp> line type:
    open [serverIPaddress]<enter>
    You'll see some connection info. And a colon prompt waiting for your FTP user name
    enter username<enter>
    enter password <enter>
    type ls <enter>(that's an ell and an ess)
    you'll see a remote listing.
    type a !<enter>
    and then another ls<enter>
    Those are your local files. Jot the name of one you want to PUT. jot down the extension, too (JPG, TIF, etc)
    Now type exit<enter> (You're back on the ftp> prompt)
    do a put...
    PUT filename_withextens.ion<enter>
    success, or failure.
    To end ftp session, type:
    quit<enter>
    To end command line type:
    exit<enter>
    then quit Terminal
    Funny firewall settings might be on the mac you're having trouble with. These settings would not affect the the other 3.9 mac.
    If your ftp thing works with Terminal? Time to track down Keychain problems, perhaps.
    I'm going out for coffee for 30 minutes. I'll check on you when I get back I hope I didn't leave out a step :o
    [edit...nope, looks good]
    Message was edited by: Rick Van Vliet

  • 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

  • BPEL Integration with Mainframes

    HI
    I am integrating BPEL with mainframes which would generate a cobol copy book using an FTP adapter at a particular location in mainframe (NTACF.ICCMH.IC100810.IC19.TRANS<+1>).i am encountering a problem as when bpel is trying to create a file it's appending '/' before the path mentioned above .like (/NTACF.ICCMH.IC100810.IC19.TRANS<+1>) and bpel process is getting errored out.
    please help me out in resolving out

    hi this is me only iam posting the error if somebody can help out
    fault code
    <fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>550</code>
    </part><part name="summary"><summary>file:/C:/product/10.1.3.1/OracleAS_3/bpel/domains/default/tmp/.bpel_flow_2.8_8a61747c4951199a7b5a330c139c4f40.tmp/mainframeftp.wsdl [ Put_ptt::Put(MLWriteOffs) ] - WSIF JCA Execute of operation 'Put' failed due to: Error sending file to FTP Server.
    Unable to send file to server.
    ; nested exception is:
         ORABPEL-11429
    Error sending file to FTP Server.
    Unable to send file to server.
    Please ensure 1. Specified remote output Dir has write permission 2. Output filename has not exceeded the max chararters allowed by the OS and 3. Remote File System has enough space.
    </summary>
    </part><part name="detail"><detail>550 Mismatched quotes on pathname 'SCHED.'/NTACF.ICCMH.IC100810.IC19.TRANS(+1)/sample</detail>
    </part></bindingFault></fault></messages>
    from ftp command prompt it is successful
    ftp> put sample 'NTACF.ICCMH.IC100810.IC19.TRANS(+1)'
    200 Port request OK.
    125-Waiting for volume mount for volume WRK002
    125 Storing data set NTACF.ICCMH.IC100810.IC19.TRANS.G0007V00
    250 Transfer completed successfully.
    ftp: 105 bytes sent in 0.00Seconds 105000.00Kbytes/sec.
    __________________________________

  • Researching PC laptops that will run Premiere Pro CC. I am unfamiliar with tech specs. Please help!

    I am an independent filmmaker who is looking to invest in a better and faster laptop to accommodate Premiere Pro CC. I'm a current PC user and love it, and I am trying to stay with the PC OS. I'm not familiar with tech specs, but in my extensive research, this ASUS laptop seems to match almost all of the Adobe System Requirements for Premiere Pro CC (2014). Though, some are not mentioned, so I wasn't sure if it matches up completely.
    https://www.insight.com/insightweb/product/ASUS-X750JA-DB71-17.3%22-Core-i7-4700HQ-Windows -8-64-bit-8-GB-RAM-1-TB-HDD/X750JA-DB71/true/search
    I don't want to spend a big chunk of money on a new piece of technology if it won't be able to do what I need it to do. Please help!

    ...I totally second Bill's suggestion and information.....I did the EXACT SAME thing as he did, when my previous i7 laptop was hit by lightning and KILLED !! My "refurbished " Asus G750JW only cost $850 at the time, and arrived in a "like new" condition, with all the plastic film still on everything......it has been FLAWLESS in operation. It edits 1080p EASILY with multiple video tracks and GPU accelerated effects on the timeline.
    It is AMAZING how in just one year how much advancement has occurred in these "gaming" laptops, which can be used for video editing. However, you MUST be aware that these laptops MUST be plugged in while editing as they are "throttled" on battery power...no matter HOW you make the "power settings". Some newer models offer multiple mSATA slots, where you can create a high speed storage RAID 0 array....a Crucial mSATA 256GB SSD is only $89 right now at the "Egg".....2 or 3 of these in an MSI Dominator would provide a very fast place for your media and project files. The other, standard 2.5" SATA III port would be for your OS drive...again, a Crucial 256GB 550 SSD would be good there.
    Like Bill said....look for a refurbished, open box, or, maybe even slightly used machine that is "user upgradeable" to get the biggest bang for the buck. You will have to research VERY CAREFULLY however to insure EXACTLY which memory slots are already filled and if you have access to only SOME of the slots, or, ALL of the slots. Also, you must determine EXACTLY how the drive bays are configured. For example : one version of the MSI laptop that is a CHEAPER version still has the space for 3 separate mSATA drives,BUT, does NOT include necessary "adapters" to actually connect your OWN mSATA drives in that bay. I DID find a small RESELLER on the internet, ( in Pennsylvania, if I remember correctly) who will MODIFY a BASE model of the MSI for a VERY reasonable cost.....even LESS than it would cost to SELF upgrade !! He would add the memory to 32GB AND max out the potential for the storage configuration FOR you. With the proper "homework" you CAN find a very good machine without getting RAPED...it just takes patience, reading, and learning before pulling the trigger.
    Good Luck !!

  • 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.

  • Error while running BPEL Process with Oracle Apps Adapter.

    Hi All,
    I am trying to configure the oracle apps adapter in JDeveloper.
    Here my EBS is running on different database where as SOA is installed on different database.
    I am able to properly configure the adapter & deploy the process to weblogic server.
    But when I am trying to run the process I am getting following errorr.
    <p>
    The JCA Binding Component was unable to establish an outbound JCA CCI connection due to the following issue: BINDING.JCA-12510\nJCA Resource Adapter location error.\nUnable to locate the JCA Resource Adapter via .jca binding file element <connection-factory/>\nThe JCA Binding Component is unable to startup the Resource Adapter specified in the <connection-factory/> element: location='*<JNDI Name passed in Oracle apps Adapter.>*'.\nThe reason for this is most likely that either \n 1) the Resource Adapters RAR file has not been deployed successfully to the WebLogic Application server or \n 2) the '<jndi-name>' element in weblogic-ra.xml has not been set to <JNDI Name passed in Oracle apps Adapter.>
    </p>
    Please suggest the solution for the same.
    its really urgent . waiting for reply.
    Edited by: aumathe on Dec 16, 2010 2:33 PM

    Have you created a connection pool with the JNDI specified while configuring adapter in Oracle Apps adapter on weblogic admin console. You should create it at Deployments --> OracleAppsAdapter --> Configuration--> Outbound Connection pools
    Make sure to update the adapter after creating a connection pool so that changes can take effect.
    Regards,
    Anuj

  • 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

Maybe you are looking for

  • How can I stream video with Flash?

    Hi guys! I have a placeHolder MC in my main movie. Within the placeHolder is an external swf containing an mpg video. How can I code the preloader of the external swf to stream the mpg? Thank you very much and I hope to hear from you. All the best, M

  • Bill of lading (VL01N)

    Hi All, The bill of lading report (pick list) VL01N needs to be modified to have the third party truck information to be printed on the report. Does anyone know if I can write any user exit or BADI for this? Also I tried to find what the sap script f

  • CSV  FILE READING

    Hi all, I got the Csv parser from the net.It is giving runtime error "IO FILE Exception" actually there are 3 file included in it. CSVFile import java.util.ArrayList; import java.io.BufferedReader; import java.io.FileReader; * holds the file object o

  • Mass email sent from my yahoo account

    I'm not sure how this happens but would appreciate any advice. I receive my yahoo email on iphone, and all my contacts are on my phone, i.e. I have no contacts on yahoo account. Connected to itunes last night for update, and early this morning someon

  • Optimistic Locking fails when version field is part of a Aggregate

    I'm trying to persist a Mapped Object using 9.0.3 Toplink. The object uses optimistic locking while the Timestamp versioning field is part of an Aggreate Descriptor. This works well in the Workbench (does not complain). Unfortunally it does not work