JProgressBar while file copy

Hello,
I give backup option in my application.
so while taking backup (just file copy), i need to show the status of the file copying in JProgressbar
Can any one give solution with sample.

import java.awt.*;
import javax.swing.*;
public class X {
    public static void main(String[] args) {
        JFrame f = new JFrame("X");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JProgressBar bar = new JProgressBar(0,100);
        bar.setStringPainted(true);
        final Updater updater = new Updater(bar);
        f.getContentPane().add(bar, BorderLayout.NORTH);
        f.pack();
        f.show();
        Runnable example = new Runnable() {
            public void run() {
                for(int i=0; i<=100; i+=5) {
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                    updater.update(i);
        new Thread(example).start();
class Updater  {
    private final JProgressBar jpb;
    private boolean queued;
    private int val;
    private Runnable runnable = new Runnable() {
        public void run() {//called from EDT:
            int _val;
            synchronized(Updater.this) {
                queued = false;
                _val = val;
            jpb.setValue(_val);
    public Updater(JProgressBar jpb) {
        this.jpb = jpb;
    public void update(int _val) {
        boolean go = false;
        synchronized(this) {
            val = _val;
            if (!queued) {
                queued = true;
                go = true;
        if (go)
            SwingUtilities.invokeLater(runnable);
}1. I'm assuming you're backing up in a non-EDT thread, to avoid locking up your GUI.
2. If 1 is true, you have to be careful to call Swing using methods like SwingUtilities.invokeLater. See:
http://java.sun.com/docs/books/tutorial/uiswing/overview/threads.html
3. My Updater class is the heart of this example. It is smart enough to update the progress bar's future value while this value is queued for the EDT.

Similar Messages

  • File Copy With JProgressBar

    Hi i'm using the below code to copy a file and display the progress on screen. However the file copies ok by the progressbar is never shown. Can somebody please show me how to use the JProgressBar Component to copy a file and show the progress?
    Thanks
    Arlef
    public void copyFileToMediaFolder(File f){
    String newFileName = f.getName();
    try{
    File inputFile = f.getAbsoluteFile();
    int fSize = (int)f.length();
    FileCopyProgress fcp = new FileCopyProgress(this,true);
    File outputFile = new File(mediaFolder + File.separatorChar + newFileName);
    FileInputStream in = new FileInputStream(inputFile);
    FileOutputStream out = new FileOutputStream(outputFile);
    int c;
    int bytesRead = 0;
    int counter = 0;
    while ((c = in.read()) != -1){
    out.write(c);
    counter = counter + 1;
    bytesRead = fSize / 100 * counter;
    in.close();
    out.close();
    fcp.dispose();
    }catch(Exception ex){
    //System.out.println("nEW FILE NAME = "+newFileName);
    }

    The progressbar is in a JDialog and is represented in
    the following line in the code i sent earlier
    FileCopyProgress fcp = new FileCopyProgress(this,true);Yes, i'm aware of that, but what I'm saying is that you don't seem to be updating the status of the progressbar while copying the file...I suppose the progressbar would start with 0 or 0% and then there should be some functions to be called to make it "progress" to 10..20...50..60% etc... So I believe you should call such a function from inside the loop where the file is being copied...I remember it used to be like that in Visual C++, so i'm supposing the behavior is similar in Java.
    Good luck :)
    Talal

  • MP Drivers An Error occurred while files were being copied 0001 0002

    Afternoon,
    Hope anyone can assist.
    Okay here is a quick recap:
    They did a system recovery on the laptop befor that the printer wasa working 100% after the recovery the printer did not want to work at all.
    We have spoken to 5 different consultans from Canon. They say it is windows problem.
    It does not install from canon links or CD what we have for the printer.
    Canon Pixma MG2140
    Here is the message it keeps repeating:
    MP Drivers
    An Error occurred while files were being copied 0001 0002
    This is urgent as we have been struggling more than 3 Weeks.

    Hi,
    Do you have any anti-virus software installed? If you have, I would suggest you temporarily turn off these software, then try to install again.
    And please do not connect the device to the PC until the driver installation is complete.
    If the MP Drivers have been previously installed on the PC, unistall them first, maybe use the shortcut on the Start>Programs>Canon>MP Drivers menu, or via device manager, you can find instructions in Canon website.
    Yolanda Zhu
    TechNet Community Support

  • Cp: skipping file x' as it was replaced while being copied

    Sorry if this has been asked before but:
    While copying files from another server (cifs) I get the following error:
    cp: skipping file `xxxxxxx', as it was replaced while being copied
    dmesg says:
    CIFS VFS: Autodisabling the use of server inode numbers on \\192.168.xx.xx\xxxx. This server doesn't seem to support them properly. Hardlinks will not be recognized on this mount. Consider mounting with the "noserverino" option to silence this message.
    I am unable to copy any files across and if i manage to they are corrupted.
    I have mounted the server as such without luck
    mount -t cifs //192.168.xx.xx/directory /mnt/floppy/ -o username=xxxxxxxx,password=xxxxxxxxxx,noserverino
    Any ideas?
    Regards,
    Mike.
    Last edited by DrMikeDuke (2010-08-04 18:58:02)

    An "other" that large usually indicates that the "other" includes corrupted files.  Usually restoring from backup eliminated the corrupted files. However, sometimes restoring to factory settings/new iPod is required.
    To restore from backup see:
    iOS: How to back up
    To restore to factory settings/new iPod see:
    iTunes: Restoring iOS software

  • Existing files on drive connected to latest Airport Extreme do not show up, however files copied over the air to the drive do. Any ideas?

    I have the latest Airport Extreme with a Seagate drive connected. I copied files to the drive while it was connected to my MacBook Pro. The files do not show up when connected to the AE, but they appear when connected to the Macbook, Files copied over the network to the drive appear. The drive is formatted HFS+.

         After playing with this for the last few days, I found a solution. Under the "Disks" tab in Airport Utility, the "Secure Shared Disks" drop down needs to be set to "With device password". Mine was set to "With acounts", which even after correct authentication, none of the files would appear.
         Another interesting note:  The files that I could see, the ones I copied over the network, do not appear now. I can copy over new files, and they show up, but the ones copied prior to changing the "Secure Shared Disks" option, do not.

  • How to measure progress of file copy?

    One of the requirements for my AIR application is to copy
    large files from one location to another on the client computer.
    I've been using the copyToAsync() method in AIR, but unfortunately
    this does not trigger progress events. Copying gigabyte files that
    take several seconds becomes pretty uncomfortable for users, when
    they can't see the progress.
    Does anyone know of an alternative or workaround? All I need
    to do is copy a file from one location to another, and measure the
    progress while that is happening.
    Since I control the client machines (it is a closed
    environment), I have the option to setup file servers on every
    machine and use the file download control with Flash instead of
    file copy. However, when I investigate this option it seems that
    the file download control will always trigger user interaction to
    select the target path (which I don't want -- I want to
    programatically select the source files and the target directory).
    If someone knows a solution to that problem I would happily take it
    and move on :)

    Hi,
    Use 2 FileStream objects in async mode (openAsync). One to
    read and another to write. When you read in async mode, you get
    progress events. When they fire, you can read bytesAvailable
    amounts of data and write that to the output filestream.
    The output filestream can listen for output_progress events
    to ensure that new data can be written to it or not.

  • Network speed affected by large file copy operations. Also, why intermittent network outages?

    Hi
    I have a couple of issues on our company network.
    The first is thate a single large file copy imapcts the entire network and dramatically reduces network speed and the second is that there are periodic outages where file open/close/save operations may appear to hang, and also where programs that rely on
    network connectivity e.g. email, appear to hang. It is as though the PC loses it's connection to the network, but the status of the network icon does not change. For the second issue if we wait the program will respond but the wait period can be up to 1min.
    The downside of this is that this affects Access databases on our server so that when an 'outage' occurs the Access client cannot recover and hangs permamnently.
    We have a Windows Active Directory domain that comprises Windows 2003 R2 (soon to be decommissioned), Windows Server 2008 Standard and Windows Server 2012 R2 Standard domain controllers. There are two member servers: A file server running Windows 2008 Storage
    Server and a remote access server (which also runs WSUS) running Windows Server 2012 Standard. The clients comprise about 35 Win7 PC's and 1 Vista PC.
    When I copy or move a large file from the 2008 Storage Server to my Win7 client other staff experience massive slowdowns when accessing the network. Recently I was moving several files from the Storage Server to my local drive. The files comprised pairs
    (e.g. folo76t5.pmm and folo76t5.pmi), one of which is less than 1MB and the other varies between 1.5 - 1.9GB. I was moving two files at a time so the total file size for each operation was just under 2GB.
    While the file move operation was taking place a colleague was trying to open a 36k Excel file. After waiting 3mins he asked me for help. I did some tests and noticed that when I was not copying large files he could open the Excel file immediately. When
    I started copying more data from the Storage Server to my local drive it took several minutes before his PC could open the Excel file.
    I also noticed on my Win7 client that our email client (Pegasus Mail), which was the only application I had open at the time would hang when the move operation was started and it would take at least a minute for it to start responding.
    Ordinarlily we work with many files
    Anyone have any suggestions, please? This is something that is affecting all clients. I can't carry out file maintenance on large files during normal work hours if network speed is going to be so badly impacted.
    I'm still working on the intermittent network outages (the second issue), but if anyone has any suggestions about what may be causing this I would be grateful if you could share them.
    Thanks

    What have you checked for resource usage during one of these copies of a large file?
    At a minimum I would check Task Manager>Resource Monitor.  In particular check the disk and network usage.  Also, look at RAM and CPU while the copy is taking place.
    What RAID level is there on the file server?
    There are many possible areas that could be causing your problem(s).  And it could be more than one thing.  Start by checking these things.  And go from there.
    Hi, JohnB352
    Thanks for the suggestions. I have monitored the server and can see that the memory is nearly maxed out with a lot of hard faults (varies between several hundred to several thousand), recorded during normal usage. The Disk and CPU seem normal.
    I'm going to replace the RAM and double it up to 12GB.
    Thanks! This may help with some other issues we are having. I'll post back after it has been done.
    [Edit]
    Forgot to mention: there are 6 drives in the server. 2 for the OS (Mirrored RAID 1) and 4 for the data (Striped RAID 5).

  • Storage Spaces: Virtual Disk taken offline during file copy, marked as "This disk is offline because it is out of capacity", but plenty of free space

    Server 2012 RC. I'm using Storage Spaces, with two virtual disks across 23 underlying physical disks.
    * First virtual disk is fixed provisioning, parity across 23 physical disks: 10,024GB capacity
    * Second virtual disk is fixed provisioning, parity across the remaining space on 6 of the same physical disks: 652GB capacity
    These have been configured as dynamic disks, with an NTFS volume spanned across the two (larger virtual disk first). Total volume size 10,676GB. For more details of the hardware, and why the configuration is like this, see: http://social.technet.microsoft.com/Forums/en-US/winserver8gen/thread/c35ff156-01a8-456a-9190-04c7bcfc048e
    I'm copying several TB from a network share to this volume. It is very slow at ~12MB/sec, but works. However, three times so far, several hours in to the file copy and with plenty of free space remaining, the 10,024GB virtual disk is suddenly taken offline.
    This obviously then fails the spanned volume and stops the file copy.
    The second time, I took screenshots, below. The disk (Disk27) is marked offline due to "This disk is offline because it is out of capacity". And the disk in the spanned volume is marked as missing (which is what you would expect when one of its member disks
    is offline).
    I can then mark the disk (Disk27) back online again, and this restores the spanned volume. I can then re-start the file copy from where it failed. There doesn't appear to be any data loss, but it does cause an outage that requires manual attention. As you
    can see, there is plenty of space left on the spanned volume.
    Each time this has happened, there are a few event 150 errors in the System event log: "Disk 27 has reached a logical block provisioning permanent resource exhaustion condition.". Source: Disk.
    - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    - <System>
      <Provider Name="disk" /> 
      <EventID Qualifiers="49156">150</EventID> 
      <Level>2</Level> 
      <Task>0</Task> 
      <Keywords>0x80000000000000</Keywords> 
      <TimeCreated SystemTime="2012-06-07T11:24:53.572101500Z" /> 
      <EventRecordID>14476</EventRecordID> 
      <Channel>System</Channel> 
      <Computer>Trounce-Server2.trounce.corp</Computer> 
      <Security /> 
      </System>
    - <EventData>
      <Data>\Device\Harddisk27\DR27</Data> 
      <Data>27</Data> 
      <Binary>000000000200300000000000960004C0000000000000000000000000000000000000000000000000</Binary> 
      </EventData>
      </Event>
    This error seems to be related to thin provisioning of disks. I found this:
    http://msdn.microsoft.com/en-us/library/windows/desktop/hh848068(v=vs.85).aspx. But both these Virtual Disks are configured as Fixed, not Thin provisioning, so it shouldn't apply.
    My thoughts: the virtual disk should not spuriously go offline during a file copy, even if it was out of space. And in any case, there is plenty of free space remaining. Also, I don't understand the reason for why it is marked as offline ("This disk is offline
    because it is out of capacity"). Why would a disk go offline because it was out of thin capacity, rather than just returning an "out of disk space" error while keeping it online.

    Interesting Thread, I've been having the same issue. I had a failed hardware RAID that was impossible to recover in place, so after being forced to do a 1:1 backup, I find myself with 5 2TB hard drives to play with. Storage Spaces seemed like an interesting
    way to go until I started facing the issues we share.
    So my configuration is A VM Running Windows Server 2012 RC with 5 Virtualized Physical drives using a SCSI interface, 2TB in size that make up my storage pool. A Single Thinly provisioned Disk of 18 TB (using 1 disk for parity)
    Interestly enough, write speed has not been an issue on this machine (30~70MB/s, up from 256k on the beta) 
    Of note to me is this error in my event log 13 minutes before the drive disappeared:
    "The shadow copies of volume E: were deleted because the shadow copy storage could not grow in time.Consider reducing the IO load on the system or choose a shadow copy storage volume that is not being shadow copied."Source: volsnap, Event ID: 25, Level: Error
    followed by:
    "The system failed to flush data to the transaction log. Corruption may occur in VolumeId: E:, DeviceName: \Device\HarddiskVolume17.(The physical resources of  this disk have been exhausted.)"Source: Ntfs (Microsoft-Windows-Ntfs), Event ID: 140, Level: Warning
    I figure the amount of space available to me before I start encountering physical limits is in the vicinity of about 7TB. It dropped out for the second time at 184 GB.
    FYI, the number of columns created for me is 5
    Regards,
    Steven Blom

  • How to set local file copy buffer size?

    Is there any sysctl parameter or any other mechanism to set or change file copy buffer sizes? I'm backing up a huge number of files to a local hard drive connected by firewire, and I'd like to play with file copy buffer sizes for the best performance. The machine used is a new macbook pro running OS-X 10.6.7. Any ideas?

    Here is a bash script that uses the dd command to copy a file.  Use the -b option to set the file size.
    example:
    /Users/mac/config/forumcopy.command -vb  4096  /Applications\ \(Mac\ OS\ 9\)/Civilization\ II/Civ\ II\ Map\ Editor  /Applications\ \(Mac\ OS\ 9\)/Civilization\ II/Civ\ II\ Map\ Editorv8
    I haven't tested this a lot. 
    Of course, I haven't figured out how best to post code.  Trying HTML mode. Using the <pre> tag.
    #!/bin/bash
    # macteracopy [ -b blocksize ] [-v ] [-V ] input_file output_file
    # Purpose of this script:
    # Copy a file with optional block size. Default size of 4096.
    # Notes:
    # chmod u+x macteracopy
    # You may have to restart the finder to notice a customized file icon.
    #   Copyright 2010 rccharles
    #   GNU General Public License
    #   This program is free software: you can redistribute it and/or modify
    #   it under the terms of the GNU General Public License as published by
    #   the Free Software Foundation,  version 3
    #   This program is distributed in the hope that it will be useful,
    #   but WITHOUT ANY WARRANTY; without even the implied warranty of
    #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #   GNU General Public License for more details.
    #   For a copy of the GNU General Public License see
    #   <http://www.gnu.org/licenses/>.
    # debug info
    export PS4='+(${BASH_SOURCE}:${LINENO}):'
    ## not in the tiger version of bash ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
    declare -x   verbose="No"   \
             veryVerbose="No"
    blockSize=4096
    # Check for command-line options used when calling the script
    if [ $# -gt 0 ] ; then
       while getopts "b:vV" Option ; do
          case "${Option}" in
          b  )  blockSize=$OPTARG
          v ) verbose="Yes"
          V ) veryVerbose="Yes"
          \? ) echo 'usage macteracopy -b blocksize -V input_file output_file'
          * ) echo "Unknown argument among arguments $* on command line."
             exit 6
          esac
       done
    fi
    # We're done with switches / options from the command line
    shift $(($OPTIND - 1))
    [ "${veryVerbose}" = "Yes" ] \
       && set -x  
    inputFile="${1}"
    outputFile="${2}"
    [ "${verbose}" = "Yes" ] \
       && echo \
       && echo "$0 script revised $(GetFileInfo -m $0)" \
       && echo
    [ ! -f "${inputFile}" ] && echo "File not found.  ${inputFile}" && exit 4
    [ -d "${inputFile}" ] \
       && echo "Directories are not supported, yet.  ${inputFile}" \
       && exit 4
    [ "${veryVerbose}" = "Yes" ] \
       && ulimit -a \
       && df \
       && echo
    if [ "${verbose}" = "Yes" ] ; then
       dd bs=${blockSize} if="${inputFile}" of="${outputFile}"
         dd bs=${blockSize} if="${inputFile}/rsrc" of="${outputFile}/rsrc" 
    else
          dd bs=${blockSize} if="${inputFile}" of="${outputFile}"
          dd bs=${blockSize} if="${inputFile}/rsrc" of="${outputFile}/rsrc"
        } 2>/dev/null
    fi
    [ "${verbose}" = "Yes" ] \
       && echo \
       && ls -l "${inputFile}" \
       && ls -l "${inputFile}"/rsrc \
       && GetFileInfo  "${inputFile}" \
       && ls -l "${outputFile}" \
       && ls -l "${outputFile}"/rsrc \
       && GetFileInfo  "${outputFile}" \
       && echo
    SetFile  -a $(GetFileInfo  -a "${inputFile}"  ) \
           -c $(GetFileInfo  -c "${inputFile}" | sed 's/"// g' ) \
             -t $(GetFileInfo  -t "${inputFile}" | sed 's/"// g' ) \
             "${outputFile}"
    [ "${verbose}" = "Yes" ] \
       && echo "after SetFile" \
       && GetFileInfo  "${outputFile}"

  • Large file copy to iSCSI drive fills all memory until server stalls.

    I am having the file copy issues that people have been having with various versions of Server now for years, as can be read in the forums. I am having this issue on Server 2012 Std., using Hyper-V.
    When a large file is copied to an iSCSI drive, the file is copied into memory first faster than it can be sent over the network. It fills all available GB of memory until the server, which is a VM host, pretty much stalls and also all the VMs stall. This
    continues until the file copy is finished or stopped, then the memory is gradually released as it is taken out of memory as it is sent over the network.
    This issue was happening on send and receive. I change the registry setting for Large Cache to disable it, and now I can receive large files from the iSCSI. They now take an additional 1 GB of memory and it sits there until the file copy is finished.
    I have tried all the NIC and disk settings as can be found in the forums around the internet that people have posted in regard to this issue.
    To describe in a little more detail, when receiving a file from iSCSI, the file copy windows shows a speed of around 60-80 MB / sec, which is wire speed. When sending a file to iSCSI, the file copy window shows a speed of 150 MB/sec, which is actually the
    speed at which it is being written to memory. The NIC counter in Task Mgr shows instead the actual network speed which is about half of that. The difference is the rate at which memory fills until it is full.
    This also happens when using Window Server Backup. It freezes up the VM Host and Guests while the host backup is running because of this issue. It does cause some software issues.
    The problem does not happen inside the Guests. I can transfer files to a different LUN on the same iSCSI, which uses the same NIC as the Host with no issue.
    Does anyone know if the fix has been found for this? All forum posts I have found for this have closed with no definite resolution found.
    Thanks for you help.
    KTSaved

    Hi,
    Sorry if it causes confusion but "by design" I mean "by design it will use memory for copying files via network".
    In Windows 2000/2003, the following keys could help control the memory usage:
    LargSystemCache (0 or 1) HKEY_LOCAL_MACHINE\CurrentControlSet\Control\Session Manager\Memory Management
    Size (1, 2 or 3) in HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameter
    I saw threads mentioned that it will not work in later systems such as Windows 2008 R2.
    For Windows 2008 R2 and Windows 2008, there is a service named Microsoft Windows Dynamic Cache Service which addressed this issue:
    https://www.microsoft.com/en-us/download/details.aspx?id=9258
    However I searched and there is no update version for Windows 2012 and 2012 R2.
    I also noticed that the following command could help control the memory usage. With value = 1, NTFS uses the default amount of paged-pool memory:
    fsutil behavior set memoryusage 1
    You need a reboot after changing the value. 
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Error while system copy export

    Dear all,
    While system copy in export  part we are getting following error.  Sorry for not able to paste in proper format.
    OS :-HPUX 11.23
    Database :- oracle 10g
    Execution of the command "/opt/java1.4/bin/java -classpath /tmp/sapinst_exe.27996.1263558176/JAR/ins-j2ee.jar:/tmp/sapinst_exe.27996.1263558176/JAR/sapxmltoolkit.jar -d64 com.sap.ins.j2ee.TestClassLoader" finished with return code 0. Output: CORRECT
    INFO 2010-01-15 17:54:25
    Found a valid JAVA_HOME directory /opt/java1.4 with JDK version 1.4.2_15.
    INFO 2010-01-15 17:54:25
    Execute step fillContext of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0.
    INFO 2010-01-15 17:54:26
    Execute step collect of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_readProfileDir|ind|ind|ind|ind|0|0.
    INFO 2010-01-15 17:54:26
    Execute step getMounts of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_readProfileDir|ind|ind|ind|ind|0|0.
    INFO 2010-01-15 17:54:26
    Execute step updateMountInfo of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_readProfileDir|ind|ind|ind|ind|0|0.
    INFO 2010-01-15 17:54:26
    Execute step getProfileDir of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_readProfileDir|ind|ind|ind|ind|0|0.
    INFO 2010-01-15 17:54:52
    Account d02adm already exists.
    INFO 2010-01-15 17:54:52
    Account 0 already exists.
    INFO 2010-01-15 17:54:52
    Account 106 already exists.
    INFO 2010-01-15 17:54:56
    Account sapsys already exists.
    INFO 2010-01-15 17:54:56
    Account d02adm already exists.
    INFO 2010-01-15 17:55:00
    Execute step fillContext2 of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0.
    INFO 2010-01-15 17:55:03
    Execute step isUnicodeFromStack of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_getUnicode|ind|ind|ind|ind|1|0.
    INFO 2010-01-15 17:55:03
    Execute step isUnicodeFromExecutables of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_getUnicode|ind|ind|ind|ind|1|0.
    INFO 2010-01-15 17:55:05
    Account d02adm already exists.
    INFO 2010-01-15 17:55:05
    Account 0 already exists.
    INFO 2010-01-15 17:55:05
    Account 106 already exists.
    INFO 2010-01-15 17:55:06
    Creating file /tmp/sapinst_instdir/ERP/LM/COPY/ORA/EXP/CENTRAL/AS-ABAP/PREEXP/disp+work.log.
    INFO 2010-01-15 17:55:06
    Output of /usr/sap/D02/DVEBMGS00/exe/dispwork -v is written to the logfile dispwork.log.
    INFO 2010-01-15 17:55:10
    Execution of the command "/usr/sap/D02/DVEBMGS00/exe/disp+work -v" finished with return code 0. Output:
    INFO 2010-01-15 17:55:10
    Execute step isUnicodeFromMsgServer of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_getUnicode|ind|ind|ind|ind|1|0.
    INFO 2010-01-15 17:55:10
    Execute step isUnicodeFromProfile of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_getUnicode|ind|ind|ind|ind|1|0.
    INFO 2010-01-15 17:55:11
    Execute step askUnicode of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_getUnicode|ind|ind|ind|ind|1|0.
    INFO 2010-01-15 17:55:11
    Execute step fillContext of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_GetUserParameter|ind|ind|ind|ind|3|0.
    INFO 2010-01-15 17:55:11
    Execute step setDefaults of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_GetUserParameter|ind|ind|ind|ind|3|0|NW_GetUserParameterUnix|ind|ind|ind|ind|2|0.
    INFO 2010-01-15 17:55:12
    Execute step askSidAdm of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_GetUserParameter|ind|ind|ind|ind|3|0|NW_GetUserParameterUnix|ind|ind|ind|ind|2|0.
    INFO 2010-01-15 17:55:12
    Execute step dbInfo of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0.
    INFO 2010-01-15 17:55:12
    Execute step fillContext of component |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_getDBInfo|ind|ind|ind|ind|4|0.
    ERROR 2010-01-15 17:55:12
    CJS-00030  Assertion failed: in component: NW_getDBInfo step:fillContextat this point the dbtype has to be != ind
    ERROR 2010-01-15 17:55:12
    MUT-03025  Caught ESAPinstException in Modulecall: ESAPinstException: error text undefined.
    ERROR 2010-01-15 17:55:12
    FCO-00011  The step fillContext with step key |NW_Prepare_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|2|0|NW_getDBInfo|ind|ind|ind|ind|4|0|fillContext was executed with status ERROR .

    > We resolved issue by setting oracle_home  environment.Now we get screen asking export location.While exporting we get error  BR0804I BRCONNECT terminated with errors.
    Nice - but how should we now find out what you problem is? We have no magic ball to look into..
    > We are doing Hetrogenous system copy.
    Be aware that you need a certified migration consultant on-site for a heterogeneous copy. Otherwise you'll loose support for problems during the migration and for the target system (http://service.sap.com/osdbmigration --> FAQ).
    Markus

  • Speeding up FileIO - Double Buffered File Copy?

    We are trying to speed up file copy from disk to tape, and I need a little more speed. I have tried playing with the size of the buffer, but that isn't changing much (makeing it slower if anything).
    I'm trying to make a double buffered file copy and I can't figure out how to do it. I figured this would be a good place to get speed. Right now, my write is very simple:
    byte buffer = new buffer[8 * 1024 * 1024];
    FileInputStream in = new FileInputStream(srcFile);
    while(true) {
      int amountRead = in.read(buffer);
      if (amountRead == -1) { break; }
      write(buffer, 0, length);
    }So what i need to do it be able to read and write at the same time. So I was thinking that I could either make the write method a sperate thread, or some how make threaded buffers that read while the other is being writen. Has anyone tackled this problem before?
    If this isn't the right way to speed up File IO, can you let me know other ideas? Thanks in advance!
    Andrew

    Once again: I wish I could claim credit for these classes, but they were in fact posted a year or so ago by someone lese. If I had the name I would give credit.
    I've used these for two heavy-duty applications with never a problem.
    <code>
    package pipes;
    import java.io.IOException;
    import java.io.InputStream;
    * This class is equivalent to <code>java.io.PipedInputStream</code>. In the
    * interface it only adds a constructor which allows for specifying the buffer
    * size. Its implementation, however, is much simpler and a lot more efficient
    * than its equivalent. It doesn't rely on polling. Instead it uses proper
    * synchronization with its counterpart PipedOutputStream.
    * Multiple readers can read from this stream concurrently. The block asked for
    * by a reader is delivered completely, or until the end of the stream if less
    * is available. Other readers can't come in between.
    public class PipedInputStream extends InputStream {
    byte[] buffer;
    boolean closed = false;
    int readLaps = 0;
    int readPosition = 0;
    PipedOutputStream source;
    int writeLaps = 0;
    int writePosition = 0;
    * Creates an unconnected PipedInputStream with a default buffer size.
    * @exception IOException
    public PipedInputStream() throws IOException {
    this(null);
    * Creates a PipedInputStream with a default buffer size and connects it to
    * source.
    * @exception IOException It was already connected.
    public PipedInputStream(PipedOutputStream source) throws IOException {
    this(source, 0x10000);
    * Creates a PipedInputStream with buffer size <code>bufferSize</code> and
    * connects it to <code>source</code>.
    * @exception IOException It was already connected.
    public PipedInputStream(PipedOutputStream source, int bufferSize) throws IOException {
    if (source != null) {
    connect(source);
    buffer = new byte[bufferSize];
    * Return the number of bytes of data available from this stream without blocking.
    public int available() throws IOException {
    // The circular buffer is inspected to see where the reader and the writer
    // are located.
    return writePosition > readPosition ? // The writer is in the same lap.
    writePosition - readPosition : (writePosition < readPosition ? // The writer is in the next lap.
    buffer.length - readPosition + 1 + writePosition :
    // The writer is at the same position or a complete lap ahead.
    (writeLaps > readLaps ? buffer.length : 0)
    * Closes the pipe.
    * @exception IOException The pipe is not connected.
    public void close() throws IOException {
    if (source == null) {
    throw new IOException("Unconnected pipe");
    synchronized (buffer) {
    closed = true;
    // Release any pending writers.
    buffer.notifyAll();
    * Connects this input stream to an output stream.
    * @exception IOException The pipe is already connected.
    public void connect(PipedOutputStream source) throws IOException {
    if (this.source != null) {
    throw new IOException("Pipe already connected");
    this.source = source;
    source.sink = this;
    * Closes the input stream if it is open.
    protected void finalize() throws Throwable {
    close();
    * Unsupported - does nothing.
    public void mark(int readLimit) {
    return;
    * returns whether or not mark is supported.
    public boolean markSupported() {
    return false;
    * reads a byte of data from the input stream.
    * @return the byte read, or -1 if end-of-stream was reached.
    public int read() throws IOException {
    byte[] b = new byte[0];
    int result = read(b);
    return result == -1 ? -1 : b[0];
    * Reads data from the input stream into a buffer.
    * @exception IOException
    public int read(byte[] b) throws IOException {
    return read(b, 0, b.length);
    * Reads data from the input stream into a buffer, starting at the specified offset,
    * and for the length requested.
    * @exception IOException The pipe is not connected.
    public int read(byte[] b, int off, int len) throws IOException {
    if (source == null) {
    throw new IOException("Unconnected pipe");
    synchronized (buffer) {
    if (writePosition == readPosition && writeLaps == readLaps) {
    if (closed) {
    return -1;
    // Wait for any writer to put something in the circular buffer.
    try {
    buffer.wait();
    catch (InterruptedException e) {
    throw new IOException(e.getMessage());
    // Try again.
    return read(b, off, len);
    // Don't read more than the capacity indicated by len or what's available
    // in the circular buffer.
    int amount = Math.min(len,
    (writePosition > readPosition ? writePosition : buffer.length) - readPosition);
    System.arraycopy(buffer, readPosition, b, off, amount);
    readPosition += amount;
    if (readPosition == buffer.length) {
    // A lap was completed, so go back.
    readPosition = 0;
    ++readLaps;
    // The buffer is only released when the complete desired block was
    // obtained.
    if (amount < len) {
    int second = read(b, off + amount, len - amount);
    return second == -1 ? amount : amount + second;
    } else {
    buffer.notifyAll();
    return amount;
    package pipes;
    import java.io.IOException;
    import java.io.OutputStream;
    * This class is equivalent to java.io.PipedOutputStream. In the
    * interface it only adds a constructor which allows for specifying the buffer
    * size. Its implementation, however, is much simpler and a lot more efficient
    * than its equivalent. It doesn't rely on polling. Instead it uses proper
    * synchronization with its counterpart PipedInputStream.
    * Multiple writers can write in this stream concurrently. The block written
    * by a writer is put in completely. Other writers can't come in between.
    public class PipedOutputStream extends OutputStream {
    PipedInputStream sink;
    * Creates an unconnected PipedOutputStream.
    * @exception IOException
    public PipedOutputStream() throws IOException {
    this(null);
    * Creates a PipedOutputStream with a default buffer size and connects it to
    * <code>sink</code>.
    * @exception IOException It was already connected.
    public PipedOutputStream(PipedInputStream sink) throws IOException {
    this(sink, 0x10000);
    * Creates a PipedOutputStream with buffer size <code>bufferSize</code> and
    * connects it to <code>sink</code>.
    * @exception IOException It was already connected.
    public PipedOutputStream(PipedInputStream sink, int bufferSize) throws IOException {
    if (sink != null) {
    connect(sink);
    sink.buffer = new byte[bufferSize];
    * Closes the input stream.
    * @exception IOException The pipe is not connected.
    public void close() throws IOException {
    if (sink == null) {
    throw new IOException("Unconnected pipe");
    synchronized (sink.buffer) {
    sink.closed = true;
    flush();
    * Connects the output stream to an input stream.
    * @exception IOException The pipe is already connected.
    public void connect(PipedInputStream sink) throws IOException {
    if (this.sink != null) {
    throw new IOException("Pipe already connected");
    this.sink = sink;
    sink.source = this;
    * Closes the output stream if it is open.
    protected void finalize() throws Throwable {
    close();
    * forces any buffered data to be written.
    * @exception IOException
    public void flush() throws IOException {
    synchronized (sink.buffer) {
    // Release all readers.
    sink.buffer.notifyAll();
    * writes a byte of data to the output stream.
    * @exception IOException
    public void write(int b) throws IOException {
    write(new byte[] {(byte) b});
    * Writes a buffer of data to the output stream.
    * @exception IOException
    public void write(byte[] b) throws IOException {
    write(b, 0, b.length);
    * writes data to the output stream from a buffer, starting at the named offset,
    * and for the named length.
    * @exception IOException The pipe is not connected or a reader has closed
    * it.
    public void write(byte[] b, int off, int len) throws IOException {
    if (sink == null) {
    throw new IOException("Unconnected pipe");
    if (sink.closed) {
    throw new IOException("Broken pipe");
    synchronized (sink.buffer) {
         if (sink.writePosition == sink.readPosition &&
         sink.writeLaps > sink.readLaps) {
         // The circular buffer is full, so wait for some reader to consume
         // something.
         try {
         sink.buffer.wait();
         catch (InterruptedException e) {
         throw new IOException(e.getMessage());
         // Try again.
         write(b, off, len);
         return;
         // Don't write more than the capacity indicated by len or the space
         // available in the circular buffer.
         int amount = Math.min(len,
         (sink.writePosition < sink.readPosition ?
         sink.readPosition : sink.buffer.length)
    - sink.writePosition);
         System.arraycopy(b, off, sink.buffer, sink.writePosition, amount);
         sink.writePosition += amount;
         if (sink.writePosition == sink.buffer.length) {
         sink.writePosition = 0;
         ++sink.writeLaps;
         // The buffer is only released when the complete desired block was
         // written.
         if (amount < len) {
         write(b, off + amount, len - amount);
         } else {
         sink.buffer.notifyAll();
    </code>

  • Slow file copy speeds

    Hello, I can't ul or dl files from client to me or vice-versa faster than 70kbs. Both connections are static, both are 7mbs up and 2.5+mbs down and both isps have assured me that no throttling is taking place. Ports are set correctly, encryption is off for file copy; I am only one guy managing one machine for my dear gray haired mother. The files are huge 300megs plus (.psds with necessary layers, etc.) but it doesn't seem to make any diff. if I copy 1 at a time or zip a bunch-- no faster than 70k and usually 50k. Routers on both ends say connected at 7up/2.5 down and any ftp client flies to and fro. It is just much more convenient to use ARD 3.2--
    Gracias, Dennis

    Welcome to the Discussions Dennis,
    Are you using the Copy command while also Viewing or Controlling?
    Things that I can think off of the top of my head that could be slowing things down (on one of the machines):
    bandwith use from screen sharing
    A FAT formatted drive
    encrypted user or folder
    difference in OS (10.5 to 10.4 - sad but true at times)
    encrypted transfer (which you covered)
    3rd party firewall / security sw
    I've also seen where you may be able to do a good speed test, but due to router port forwarding using ARD to transfer files is slow, so that would be one other thing to check.
    Sorry I don't have a know cause. I hope this helps, JD

  • Documanage Error #2002 (File Copy Error)

    Hi,
    I am getting this error "Documanage Error #2002 (File Copy Error)" during the Genarc process. I am not able to understand the problem. Can any one please let me know about this error.
    Also is there documentation about documanage errors, please let me know.
    Thanks in Advace

    Turn on your debugging options in Documaker INI and see what you get.
    < DBHandler:DMIA >
    DEBUG = YES
    < DBHandler:ODBC >
    Debug = YES
    Also you may want to turn up your logging in the poffice.ini and check those logs as well. It's been a while since I've seen that but if I recall correctly this error usually happens when you are trying to archive a transaction from Genarc to Documanage and either the connection is broken or the document category doesn't match.

  • 2008R2 Network File Copy Fails

    Mystified on this one.
    2008R2 SP1 server in remote location. Trying to copy files over the network either through Windows Copy/Paste, Robocopy, RSync...or you name it.
    Copy fails at some point regardless of method. When using Windows Copy/Paste I get an error that says "There is a problem accessing \\SERVER\SHARE Make sure you are connected to the network and try again."
    I have:
    Upgraded the NIC drivers to the newest
    Tried disabling TCP Chimney
    Tried disabling all TCP offloads in NIC settins
    Applied Hotfix # <cite class="vurls">2477730</cite>
    Removed antivirus software and tried without it (Symantec SEP 12)
    Windows Firewall is disabled
    <cite class="vurls">Verified and even reset permission on the source and destination data</cite>
    Network guy sees nothing as far as errors and problems on the line. When running a ping to the server in question, or from the server to the copy destination, there are no packet drops while the copying is running or when it fails.
    I did notice in the security log there are a larger number of event ID 5156 and 5158, far more than similar servers in remote sites.

    Hi,
    Based on your description, we can try restarting the server in
    Safe Mode with Networking to see whether we can copy the files.
    Besides, although I think the following article may not be too much corresponding to our situation, we can give a try.
    Fix Problems With Copying Large Files in Windows Vista
    http://www.howtogeek.com/howto/windows-vista/fix-problems-with-copying-large-files-in-windows-vista/
    Hope it helps.
    Best regards,
    Frank Shen

Maybe you are looking for

  • TS 140 Windows Server 2012 R2 install failure error 0x80070570

    Recently bought 2 TS140 70A4001PUX servers with Xeon E3 1245 v3 attempting to install eval version of server 2012 R2 (latest on site April refresh) and keep getting the following error at around 62% in the getting files ready for installation: Window

  • Hard drive crash, want to recover photo's from iPhone.

    Hello, Since I've my iPhone, I have no backups of my iPhoto directory. I thought that two places (PC & iPhone) would be enough for a 100% cover. Now the worst happened, my HD bailed on me. Bought a new HD, reinstalled OS X. But when I connected my iP

  • Spotlight fails to search at HFS drive in optibay

    Hello Recently i noticed that Spotlight behaviour is very strange - it fails to find some files in the folder, while other files from the same folder are found easily. Examples are shown on the pics. in first case it fails finding ''Empire of the sun

  • Translating some Oracle documentation

    Some time ago, I sent following mail to [email protected] but did not get any answer. Is this right email address ? Could you please answer my questions ? Hello, The condition of OTN use say: 1. Use of Web Site Documents You may download, view, copy

  • Nice intervivew Q's4...plzzz help

    1.wat r MSEG and MKPF? How would u go about improving the performance of a Program which selects data from MSEG & MKPF ? 2.what is LUW?Different types of LUWs. What r they. 3.From a table how do u find whether a material is used in another material B