Java Panic, Unable to suspend threads, 1024 (more?)times

I got this error message, after adding up more and more functionality.
Someone already familiar with the reasons for such a message?

I have managed to correct my problem
The problem existed when I was disposing of a frame and then immediately afterwards running the garbage collector. I have modified my code in the following way whicfh seems ot have corrected the problem.
Old Code:
frame.dispose();
System.gc();
New Code:
Frame.Dispose();
try {
Thread.currentThread().sleep(100);
catch(Exception e) { }
System.gc();
This has corrected the panic I was receiving.
Check for specific instances where you are running the garbage collector and change as done above.

Similar Messages

  • JCP4XDOBurstingEngine.java  BURSTING - UNABLE TO USE SPECIFIC FILENAME MORE

    Hello
    I am getting Bursting Issue duplicate entry: /XXXXXX.pdf issue in Oracle XML Publisher, I think I have same issue what is explain in ML#1109893.1 and I am thinking to apply the Patch.
    I NEED to Know the File location and version of JCP4XDOBurstingEngine.java in UNIX
    Can Any body tell me please?
    -------------Issue listed in Meta Link------
    Concurrent Job Getting Java.Util.Zip.Zipexception When Bursting From Xml Publisher Report [ID 1109893.1]
    Bursting code is not allowing to send mail having the same filename in attachment for multiple recipients
    This is due to
    Bug 8937963 - BURSTING - UNABLE TO USE SPECIFIC FILENAME MORE THAN ONCE CAUSING ZIPEXCEPTION
    Thanks
    Ed

    Under Network Adapter -> Advanced Features. I read there
    Enable MAC Address Spoofing (not checked)
    Enable DHCP Guard (not checked)
    Enable router advertisement guard (not checked)
    At all VM states (install, copy, clone, export, import) I never touched the advanced network settings. Only the necessary changes to have networking up (aka attach to the correct, working network switch).
    Also made some extra tests involving attaching / detaching a legacy network adapter (just in case) and checking the MAC Addresses on all VM's (active / inactive).
    Did not figured out a MAC Address issue, all VM's had got their MAC from the pool and were different. Also the MAC address pool between 2 Hyper-V Servers was different (as expected since they have different "real" IP addressee but you never know)

  • DBMS_PARALLEL_EXECUTE multiple threads taking more time than single thread

    I am trying to insert 10 million records from source table to target table.
    Number of chunks = 100
    There are two scenarios:
    dbms_parallel_execute(..... parallel_level => 1) -- for single thread
    dbms_parallel_execute(..... parallel_level => 10) -- for 10 threads
    I observe that the average time taken by 10 threads to process each chunk is 10 times the average time taken in case of single thread.
    Ideally it should be same which would reduce the time taken by a factor of 10 (due to 10 threads).
    Due to the above mentioned behavior, the time taken is the same in both cases.
    It would be great if anybody can explain me the reason behind such behavior.
    Thanks in advance

    Source Table = TEST_SOURCE
    Target Table = TEST_TARGET
    Both tables have 100 columns
    Below is the code:
    DECLARE
    l_task VARCHAR2(30) := 'test_task_F';
    l_sql_stmt VARCHAR2(32767);
    l_try NUMBER;
    l_stmt VARCHAR2(32767);
    l_status NUMBER;
    BEGIN
    l_stmt := 'select dbms_rowid.rowid_create( 1, data_object_id, lo_fno, lo_block, 0 ) min_rid,
                                       dbms_rowid.rowid_create( 1, data_object_id, hi_fno, hi_block, 10000 ) max_rid
                                       from (
                                       select distinct grp,
                                  first_value(relative_fno)
                                  over (partition by grp order by relative_fno, block_id
                                  rows between unbounded preceding and unbounded following) lo_fno,
                                  first_value(block_id )
                                  over (partition by grp order by relative_fno, block_id
                                  rows between unbounded preceding and unbounded following) lo_block,
                                  last_value(relative_fno)
                                  over (partition by grp order by relative_fno, block_id
                                  rows between unbounded preceding and unbounded following) hi_fno,
                                  last_value(block_id+blocks-1)
                                  over (partition by grp order by relative_fno, block_id
                                  rows between unbounded preceding and unbounded following) hi_block,
                                  sum(blocks) over (partition by grp) sum_blocks
                                  from (
                                  select relative_fno,
                                  block_id,
                                  blocks,
                                  trunc( (sum(blocks) over (order by relative_fno, block_id)-0.01) / (sum(blocks) over ()/100) ) grp
                                  from dba_extents
                                  where segment_name = upper(''TEST_REGION_SOURCE'')
                                  and owner = ''FUSION'' order by block_id
                             (select data_object_id from user_objects where object_name = upper(''TEST_REGION_SOURCE'') )';
    DBMS_PARALLEL_EXECUTE.create_task (task_name => l_task);
    DBMS_PARALLEL_EXECUTE.create_chunks_by_sql(task_name => l_task,
    sql_stmt => l_stmt,
    by_rowid => true);
    l_sql_stmt := 'insert into FUSION.TEST_REGION_TARGET(REGION_ID,REGION1,REGION2,REGION3,REGION4,
                             ...., REGION99
                             SELECT REGION_ID,REGION1,REGION2,REGION3,REGION4,
                             .....,REGION99
                             from FUSION.TEST_REGION_SOURCE WHERE (1=1) AND rowid BETWEEN :start_id AND :end_id ';
    DBMS_PARALLEL_EXECUTE.run_task(task_name => l_task,
    sql_stmt => l_sql_stmt,
    language_flag => DBMS_SQL.NATIVE,
    parallel_level => 10);
    -- If there is error, RESUME it for at most 2 times.
    l_try := 0;
    l_status := DBMS_PARALLEL_EXECUTE.task_status(l_task);
    WHILE(l_try < 2 and l_status != DBMS_PARALLEL_EXECUTE.FINISHED)
    Loop
    l_try := l_try + 1;
    DBMS_PARALLEL_EXECUTE.resume_task(l_task);
    l_status := DBMS_PARALLEL_EXECUTE.task_status(l_task);
    END LOOP;
    DBMS_PARALLEL_EXECUTE.drop_task(l_task);
    END;
    Edited by: 943978 on Jul 2, 2012 9:22 AM

  • Testcase for error - "Unable to allocate thread control block"

    Hello,
    The down-below code throws the error message:
    db_stat: Unable to allocate thread control block
    BDB: 4.8, OS: Ubuntu 9.10
    Thanks
    #include <stdlib.h>
    #include <sys/ipc.h>
    #include <db.h>
    #define DIRECTORY "/tmp/db"
    int main()
    // open environment
    DB_ENV *handle;
    int status = db_env_create( &handle, 0 );
    status = handle->set_cachesize( handle, 0, 32*1024*1024, 0 );
    status = handle->set_thread_count( handle, 0x100 );
    key_t key = ftok( DIRECTORY, 'M' );
    handle->set_shm_key( handle, key );
    u_int32_t flags = DB_CREATE | DB_INIT_MPOOL | DB_INIT_TXN | DB_INIT_LOCK | DB_INIT_LOG | DB_SYSTEM_MEM;
    status = handle->open( handle, DIRECTORY, flags, 0644 );
    if( status != 0 )
    exit( 1 );
    // raise error
    chdir( DIRECTORY );
    for( int i=0; i < 0x1000; ++i )
    system( "db_stat -e | grep process/thread | wc" );
    return 0;
    }

    Hello,
    I am still looking into this, but upon closer examination here is the situation, basically as reported.
    The test calls set_thread_count which sizes the memory. In __env_attach(), (dbenv->thr_max is used to size the region. So you are correct, the higher the value used in set_thread_count, the larger the size of the region will be. Eventually that memory will be depleted, and __env_alloc_size() returns ENOMEM, after multiple calls to system(db_stat). __env_alloc_free() is not called. This is the part I am still investigating.
    The test uses system to fork a separate processes for db_stat and the failing stack is:
    lt-db_stat: assert failure: ../dist/../env/env_failchk.c/426: "ret == 0"
    lt-db_stat: __os_stack+0x2b
    lt-db_stat: __os_abort+0x1d
    lt-db_stat: __db_assert+0x47
    lt-db_stat: __env_set_state+0x53c
    lt-db_stat: __env_attach_regions+0x38b
    lt-db_stat: __env_open+0x154
    lt-db_stat: __env_open_pp+0x334
    lt-db_stat: lt-db_stat
    So db_stat is opening an environment, attaching to its region, and then __env_set_state() calls __env_alloc(). It is __env_alloc() which fails with ENOMEM after some point when there is no more space to be allocated from the shared region. And I'm still looking into that space would be returned to the shared region.
    Thanks,
    Sandra

  • Db_checkpoint: Unable to allocate thread control block

    Hello,
    Every second day BDB 4.8 runs out of cache memory (size = 512MB).
    We have 10 static worker processes (no segfaults) and one
    db_checkpoint-process (checkpoints once a minute and exists).
    We use only DB_WRITE_NOSYNC
    After two days the db_checkpoint-process reports:
    db_checkpoint: Unable to allocate thread control block
    As soon as this error apears, I can neither checkpoint nor
    db_recover.
    Is there any chance (or a patch) to track down the memory leak?
    Thanks

    Hi Sandra,
    It happened again one hour ago. I had hardly problems with BDB 4.6
    Down below you will find a current "db_stat -e"
    We have 10 workers with persistent db-connection and once a minute
    a cronjob starts a checkpoint, then the cron-process exists.
    Every second day (40 to 48 hours) the checkpoint-process can't connect
    to the database and "db_checkpoint -1" says:
    db_checkpoint: Unable to allocate thread control block
    A normal "db_recover" would corrupt the database, I had to recover
    catastrophic.
    For sure the cache is not to small (512 MB, all database files: 1,3 GB)
    Thanks
    Markus
    Mon Nov 30 17:32:44 2009 Local time
    0x120897 Magic number
    0 Panic value
    4.8.24 Environment version
    9 Btree version
    9 Hash version
    1 Lock version
    15 Log version
    4 Queue version
    2 Sequence version
    1 Txn version
    Mon Nov 30 16:31:06 2009 Creation time
    0x9d316701 Environment ID
    2 Primary region allocation and reference count mutex [0/360 0% !Own]
    11 References
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Thread tracking information
    75 Thread blocks allocated
    4096 Thread allocation threshold
    521 Thread hash buckets
    Thread status blocks:
    process/thread 5055/3086948768: out
    process/thread 5686/3086850464: out
    [...snip...]
    process/thread 6056/3086653856: out
    process/thread 6087/3086649760: out
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    0x40988 Log magic number
    15 Log version number
    16MB Log record cache size
    0 Log file mode
    10Mb Current log file size
    370618 Records entered into the log
    370MB 354KB 853B Log bytes written
    4MB 466KB 1001B Log bytes written since last checkpoint
    17691 Total log file I/O writes
    0 Total log file I/O writes due to overflow
    198 Total log file flushes
    665 Total log file I/O reads
    1786 Current log file number
    8303086 Current log file offset
    1786 On-disk log file number
    3630597 On-disk log file offset
    1 Maximum commits in a log flush
    1 Minimum commits in a log flush
    17MB Log region size
    9 The number of region locks that required waiting (0%)
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    5387 Last allocated locker ID
    0x7fffffff Current maximum unused locker ID
    9 Number of lock modes
    131072 Maximum number of locks possible
    131072 Maximum number of lockers possible
    131072 Maximum number of lock objects possible
    30 Number of lock object partitions
    622 Number of current locks
    797 Maximum number of locks at any one time
    13 Maximum number of locks in any one bucket
    0 Maximum number of locks stolen by for an empty partition
    0 Maximum number of locks stolen for any one partition
    632 Number of current lockers
    708 Maximum number of lockers at any one time
    69 Number of current lock objects
    160 Maximum number of lock objects at any one time
    2 Maximum number of lock objects in any one bucket
    0 Maximum number of objects stolen by for an empty partition
    0 Maximum number of objects stolen for any one partition
    13M Total number of locks requested (13372706)
    13M Total number of locks released (13372083)
    0 Total number of locks upgraded
    5313 Total number of locks downgraded
    9 Lock requests not available due to conflicts, for which we waited
    1 Lock requests not available due to conflicts, for which we did not wait
    0 Number of deadlocks
    60M Lock timeout value (60000000)
    0 Number of locks that have timed out
    60M Transaction timeout value (60000000)
    0 Number of transactions that have timed out
    66MB 904KB The size of the lock region
    2141 The number of partition locks that required waiting (0%)
    465 The maximum number of times any partition lock was waited for (0%)
    0 The number of object queue operations that required waiting (0%)
    3 The number of locker allocations that required waiting (0%)
    0 The number of region locks that required waiting (0%)
    2 Maximum hash bucket length
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    320MB 1KB 604B Total cache size
    1 Number of caches
    1 Maximum number of caches
    320MB 8KB Pool individual cache size
    0 Maximum memory-mapped file size
    0 Maximum open file descriptors
    0 Maximum sequential buffer writes
    0 Sleep after writing maximum sequential buffers
    0 Requested pages mapped into the process' address space
    17M Requested pages found in the cache (99%)
    71264 Requested pages not found in the cache
    67 Pages created in the cache
    71264 Pages read into the cache
    17944 Pages written from the cache to the backing file
    0 Clean pages forced from the cache
    0 Dirty pages forced from the cache
    0 Dirty pages written by trickle-sync thread
    71298 Current total page count
    71014 Current clean page count
    284 Current dirty page count
    32771 Number of hash buckets used for page location
    4096 Assumed page size used
    16M Total number of times hash chains searched for a page (16751183)
    8 The longest hash chain searched for a page
    39M Total number of hash chain entries checked for page (39437498)
    0 The number of hash bucket locks that required waiting (0%)
    0 The maximum number of times any hash bucket lock was waited for (0%)
    7 The number of region locks that required waiting (0%)
    0 The number of buffers frozen
    0 The number of buffers thawed
    0 The number of frozen buffers freed
    71627 The number of page allocations
    0 The number of hash buckets examined during allocations
    0 The maximum number of hash buckets examined for an allocation
    0 The number of pages examined during allocations
    0 The max number of pages examined for an allocation
    0 Threads waited on page I/O
    0 The number of times a sync is interrupted
    Pool File: article.db
    4096 Page size
    0 Requested pages mapped into the process' address space
    1868517 Requested pages found in the cache (99%)
    13311 Requested pages not found in the cache
    0 Pages created in the cache
    13311 Pages read into the cache
    3428 Pages written from the cache to the backing file
    [...snip...]
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    1786/3630541 File/offset for last checkpoint LSN
    Mon Nov 30 17:32:01 2009 Checkpoint timestamp
    0x8000675a Last transaction ID allocated
    4096 Maximum number of active transactions configured
    0 Active transactions
    3 Maximum active transactions
    26458 Number of transactions begun
    0 Number of transactions aborted
    26458 Number of transactions committed
    0 Snapshot transactions
    0 Maximum snapshot transactions
    0 Number of transactions restored
    1MB 192KB Transaction region size
    0 The number of region locks that required waiting (0%)
    Active transactions:
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    31MB 32KB Mutex region size
    3 The number of region locks that required waiting (0%)
    4 Mutex alignment
    150 Mutex test-and-set spins
    254163 Mutex total count
    149165 Mutex free count
    104998 Mutex in-use count
    104998 Mutex maximum in-use count
    Mutex counts
    149165 Unallocated
    1 env region
    33 lock region
    797 logical lock
    1 log filename
    1 log flush
    1 log region
    74 mpoolfile handle
    71298 mpool buffer
    17 mpool file bucket
    32771 mpool hash bucket
    1 mpool region
    1 mutex region
    1 transaction checkpoint
    1 txn region

  • Unable to suspend laptop - Asus G51J

    Hello,
    Today I installed Arch on my Asus G51J laptop, and am unable to suspend with pm-suspend or s2disk. The screen switches to a blank terminal with cursor blinking in the top-right and sits there indefinitely.
    I am using nVIDIA's binary drivers.
    Following are the contents of /var/log/pm-suspend.log:
    Initial commandline parameters:
    Sat Dec 12 20:32:06 PST 2009: Running hooks for suspend.
    /usr/lib/pm-utils/sleep.d/00auto-quirk suspend suspend: Adding quirks from HAL: --quirk-dpms-on --quirk-dpms-suspend --quirk-vbe-post --quirk-vbemode-restore --quirk-vbestate-restore --quirk-vga-mode-3
    success.
    /usr/lib/pm-utils/sleep.d/00logging suspend suspend: Linux lappy 2.6.31-ARCH #1 SMP PREEMPT Tue Nov 10 19:01:40 CET 2009 x86_64 Intel(R) Core(TM) i7 CPU Q 720 @ 1.60GHz GenuineIntel GNU/Linux
    Module Size Used by
    cpufreq_ondemand 8976 1
    acpi_cpufreq 10288 0
    freq_table 4576 2 cpufreq_ondemand,acpi_cpufreq
    cryptd 8904 0
    aes_x86_64 8960 2
    aes_generic 27968 1 aes_x86_64
    ipv6 338656 34
    ext3 151184 2
    jbd 59496 1 ext3
    uvcvideo 69100 0
    videodev 42752 1 uvcvideo
    v4l1_compat 18276 2 uvcvideo,videodev
    v4l2_compat_ioctl32 11040 1 videodev
    snd_seq_dummy 3588 0
    snd_seq_oss 36320 0
    snd_seq_midi_event 8640 1 snd_seq_oss
    snd_seq 64768 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
    snd_seq_device 8372 3 snd_seq_dummy,snd_seq_oss,snd_seq
    btusb 15540 0
    bluetooth 66852 1 btusb
    snd_pcm_oss 47360 0
    arc4 2240 2
    snd_mixer_oss 21024 1 snd_pcm_oss
    joydev 13376 0
    snd_hda_codec_realtek 286788 1
    ecb 3584 2
    nvidia 9627784 32
    snd_hda_intel 32232 2
    snd_hda_codec 83200 2 snd_hda_codec_realtek,snd_hda_intel
    snd_hwdep 10056 1 snd_hda_codec
    snd_pcm 91848 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
    snd_timer 25456 2 snd_seq,snd_pcm
    snd 77224 15 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
    iwlagn 132576 0
    thermal 17760 0
    asus_laptop 22116 0
    soundcore 8768 1 snd
    snd_page_alloc 10832 2 snd_hda_intel,snd_pcm
    video 24636 0
    output 3872 1 video
    iwlcore 126496 1 iwlagn
    mac80211 179312 2 iwlagn,iwlcore
    processor 42364 1 acpi_cpufreq
    cfg80211 104344 3 iwlagn,iwlcore,mac80211
    rfkill 24232 2 bluetooth,cfg80211
    fan 5704 0
    button 7264 0
    sdhci_pci 9536 0
    sdhci 20484 1 sdhci_pci
    i2c_i801 11584 0
    ohci1394 34228 0
    mmc_core 62368 1 sdhci
    ehci_hcd 41776 0
    led_class 5160 3 asus_laptop,iwlcore,sdhci
    atl1c 37924 0
    ieee1394 99264 1 ohci1394
    usbcore 183764 4 uvcvideo,btusb,ehci_hcd
    evdev 13024 16
    i2c_core 25664 3 videodev,nvidia,i2c_i801
    sg 33664 0
    psmouse 60708 0
    battery 13896 0
    serio_raw 7268 0
    ac 5640 0
    rtc_cmos 13756 0
    rtc_core 22116 1 rtc_cmos
    rtc_lib 3168 1 rtc_core
    ext4 361960 1
    mbcache 9028 2 ext3,ext4
    jbd2 97344 1 ext4
    crc16 2144 1 ext4
    sd_mod 31848 5
    sr_mod 19556 0
    cdrom 41320 1 sr_mod
    ahci 42960 4
    libata 193612 1 ahci
    scsi_mod 133592 4 sg,sd_mod,sr_mod,libata
    total used free shared buffers cached
    Mem: 4044360 653644 3390716 0 53876 236812
    -/+ buffers/cache: 362956 3681404
    Swap: 7413988 0 7413988
    success.
    /usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
    /usr/lib/pm-utils/sleep.d/01grub suspend suspend: not applicable.
    /usr/lib/pm-utils/sleep.d/11netcfg suspend suspend: success.
    /usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: not applicable.
    /usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.
    /usr/lib/pm-utils/sleep.d/55wicd suspend suspend: success.
    /usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable.
    /usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable.
    /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
    /usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable.
    /usr/lib/pm-utils/sleep.d/98smart-kernel-video suspend suspend: success.
    /usr/lib/pm-utils/sleep.d/99video suspend suspend: kernel.acpi_video_flags = 0
    success.
    Sat Dec 12 20:32:08 PST 2009: performing suspend
    If you have any advice or need more information, please let me know.
    Edit: Added laptop model to subject
    Last edited by MikeL (2009-12-13 07:50:39)

    I had similar problem.
    All right guys, it seems that I have finally figured it out. I did following.
    pacman -S uswsusp
    Add the uresume hook to the list of mkinitcpio in the file /etc/mkinitcpio.conf
    HOOKS="base udev autodetect pata scsi sata uresume filesystems"
    then rebuild the init image and reboot
    mkinitcpio -p kernel26
    reboot
    After bootting you can use following command
    pm-suspend --quirk-vbe-post --quirk-vbemode-restore --quirk-vbestate-restore
    or
    echo 'ADD_PARAMETERS="--quirk-vbe-post --quirk-vbemode-restore --quirk-vbestate-restore"' >> /etc/pm/config.d/module
    pm-suspend
    Good luck!
    Last edited by mathmusic (2010-01-23 02:16:11)

  • Multithreaded File Copy takes more time 1.5 times than single thread.

    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.nio.channels.FileChannel;
    public class TestMulti implements Runnable {
         public static Thread Th1;
         public static Thread Th2;
         String str = null;
         static int seqNumber = 1000000000;
         public static void main(String args[]) {
              Th1 = new Thread(new TestMulti("1_1"));
              Th2 = new Thread(new TestMulti("1_2"));
              Th1.start();
              Th2.start();
              try {
                   Th1.join();
                   Th2.join();
              } catch (Exception e) {
                   e.printStackTrace();
         public TestMulti(String str) {
              this.str = str;
         public void run() {
              File f = new File("C:/Songs2/" + str);
              File files[] = f.listFiles();
              String fileName = "";
              String seqName = "";
              String seq = "";
              int sequenceNo = 0;
              try {
                   for (int j = 0; j < files.length; j++) {
                        File musicFiles[] = files[j].listFiles();
                        for (int k = 0; k < musicFiles.length; k++) {
                             seq = "18072006";
                             seqName = seq + seqNumber;
                             sequenceNo = 10000 + seqNumber % 100;
                             seqNumber = seqNumber + 1;
                             fileName = musicFiles[k].getName();
                             String fileExt = fileName.substring(fileName.length() - 3,fileName.length());
                             String targetFile = "C:/Songs1/" + sequenceNo;
                             File fi = new File(targetFile);
                             if (!fi.exists()) { fi.mkdir(); }
                             targetFile = "C:/Songs1/" + sequenceNo + "/" + seqName+ "." + fileExt;
                             FileInputStream fin = new FileInputStream(musicFiles[k]);
                             FileChannel fcin = fin.getChannel();
                             FileOutputStream fout = new FileOutputStream(targetFile);
                             FileChannel fcout = fout.getChannel();
                             fcin.transferTo(0, fcin.size(), fcout);
                             fout.flush();
                             fcout.close();
                             fcin.close();
                             fout.close();
                             fin.close();
              } catch (Exception e) {
                   e.printStackTrace();
    Multithreaded File Copy takes more time 1.5 times than single thread.
    Is there any issue with this code. Please help me.

    If all of your threads are doing CPU-intensive work, or all are doing I/O to the same interface (for example, writing to the same physical disk), then multithreading would not be expected to help you.
    Multithreading does not magically make your CPU able to do more work per unit time than it could otherwise.
    Multithreading does not magically make your network interface or disk controller able to pump more bytes through than it could otherwise.
    Where multithreading helps (some or all of this has already been mentioned):
    * When you have multiple, independent CPU-bound tasks AND multiple CPUs available on which to execute them.
    * When you have tasks that involve a mix of CPU-bound and I/O-bound work. The CPU-bound stuff can crank while the I/O-bound stuff waits for bytes to be written or read, thus making use of what would otherwise be CPU "dead time."
    What you're doing does not fit either of those scenarios. Copying a file is pure I/O. If the source and destination file are on the same phsyical disk or controller, adding threads only adds overhead with no real possibility to do more work per unit time.
    If your source and destination are on different disks or controllers, then it's possible that you could get some benefit from multithreading. While one thread is waiting for bytes to be written to the target disk, the other thread can be reading from the source disk.

  • Unable to Download One or More Packages

    Hello,
    The following patches are giving me the "Unable to Download One or More Packages" error:
    MS 2709630 Update for Windows 7 and Windows Server 2008 R2 (All Languages)
    MS 2699779 Update for Windows 7 and Windows Server 2008 R2 (All Languages)
    Oracle Java JRE 1.6.0_33 for Windows (Update) (All Languages) (See Notes) (Rev 2)
    I've seen it mentioned that I should check the log files to determine the cause, but I'm fairly new to this and I'm not sure where they may be located. Can anyone give me the file path?
    Thanks.
    -Corey Hansen

    coreyhansen,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • Unable to initialize threads

    Hi Friends,
    I am trying to execute this jar command on solaris OS and it gives me an error as under :
    work@student: jar
    Unable to initialize threads: cannot find class java/lang/Thread
    Any body having any idea about this problem and how I could resolve it - please provide help?
    Thanks,
    Vishal

    Sounds as though your CLASSPATH environment variable is mis-set. Depnding on the version of the JVM/JRE you are using it should include the appropriate CLASSES.ZIP (which includes things like the java/lang/thread classes).
    null

  • Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

    Hi there,
    I use visual studio community 2013 to develop app for office. When I create app project using template and directly run it, it shows me this error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    Can anyone help? Thanks in advance.

    Hi holm0104,
    Did you add custom code into the project? Can you reproduce the issue in a new project without custom code?
    If not, did you have issue when you create a normal web application?
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information" while attempting to open UNIX/Linux monitor

    We have upgraded our System Center to 2012 R2, and we cannot open any of the UNIX/Linux LogFile monitor property or the UNIX/Linux process monitor property for those monitors created prior to the upgrade.  Error we get is below.  Any assitance
    appreciated.
    Date: 9/30/2014 10:01:46 PM
    Application: Operations Manager
    Application Version: 7.1.10226.0
    Severity: Error
    Message:
    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection,
    Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection,
    Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection,
    Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.TypeContainer.get_ContainedType()
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.MomExtensionsCommon.AddTemplatePages(LaunchTemplateUIData launchData, Form form)
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.MomExtensionsCommon.Initialize(Object launchData, Form form)
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.MomExtensionsCommon.RunPrivate(Object[] userData)
       at Microsoft.EnterpriseManagement.Internal.UI.Authoring.Extensibility.MomExtensionsCommon.Run(Object[] userData)

    It's possible the upgrade did not update everything properly as it looks like a dll mismatch or a missing file. I'd open a support ticket with MS and have a support engineer look at the upgrade logs. What version of SCOM did you upgrade from?
    Regards,
    -Steve

  • Java with Derby embedded and threads - problem?

    Hello,
    been developing java app and recently switched to derby database. At first i insert some data into derby and my app populates fine. However when my app creates a new thread (to do something in background and then updates the derby database) it all goes wrong. The thread is not responding and the database is not updating..
    What could this be?
    Could this be a database issue with java,jdbc, derby or just threads in general?
    It was working before previously with my previous database: MySQL which runs in a separate process but an embedded derby just wont make it happen.

    you're probably right that i'm making conclusions early but i've done everything i could and the feeling is like you want to give up. You feel de-motivated.
    I've been switching a lot of databases and trying them out and it seems that i can't get it to work with the embedded databases for some reasons. Could it possibly be some other stuff that i'm running in the background.
    Because, my background tasks is really heavy:
    - it creates a few threads to do tasks which some of them recieve information remotely from other machines, a few loops here and there, a few other threads with starts up a few processes (external exe's) to do some work and finally a few threads to do some calculation & update the database..
    But on the brightside i know my app works with my local MySQL database which runs in a separate process. I can also get my app to work with an online database on a hosting site - but the connection is very very slow (20 times as much time it takes to connect, i actually timed it.)

  • Since I updated to iCloud, Mail on my MacBookPro 10.6.8 has been unable to connect to MobileMe more than once or twice per day. Mail on my iPhone 4 has no problems. What's wrong?

    Since I updated to iCloud, (which may or may not be related) Mail on my MacBookPro 10.6.8 has been unable to connect to MobileMe more than once or twice per day. Mail on my iPhone 4 and my old iMac has no problems. When there is no service a yellow warning triangle appears adjacent to the Inbox and Connection Doctor reports,"Trying to log into this MobileMe IMAP account failed. Verify that username and password are correct."  Since it does fetch Mail from time to time they cannot be wrong.... can they? Should I update to 10.7 and if so what does that entail?

    You have been using MobileMe's email settings, which sometimes continue to work for a time after migration but then get turned off. iCloud's mail server settings are different. Strictly speaking Lion 10.7.2 is required for iCloud, and on that Mail is set up automatically.
    Snow Leopard cannot access most of iCloud's facilities, however you can set Mail up manually to access your email. The method is described here:
    http://www.wilmut.webspace.virginmedia.com/notes/icloudmail.html
    The situation with iCloud and Snow Leopard is described in detail here:
    http://www.wilmut.webspace.virginmedia.com/notes/icloudSL.html

  • Coded UI -Unit Test Adapter threw exception: Unable to load one or more of the requested types

    I am working on silver light bases share point application using visual studio 2012 with C#
    While debugging  coded ui tests with ui maps  i am getting this error.
    I have taken the solution developed by team member containing test methods and trying to debug/run the test methods which contain ui maps I am getting 
    Unit Test Adapter threw exception: Unable to load one or more of the requested types.Retrieve the loader exceptions property for more information.
    When i exclude the tests that depend on ui maps and debug/run remaining test methods I am not getting this error and able to run/debug test methods successfully
    But when I include the test methods related to ui maps and tried to debug i am getting this error.
    Please help me in this.

    Thanks for Fouad's help.
    Hi usha.talasila,
    >>Unit Test Adapter threw exception: Unable to load one or more of the requested types.Retrieve the loader exceptions property for more information.
    Generally this error would be related to the references. Like Fouad's suggestion, you would check whether there are specific references in your test project, and then right click the reference->property, and then set the Copy Local =true.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Office App Devlopment: Unable to load one or more of the requested types.

    I'm receiving the following error with the default C# Office App for Word, Excel, Powerpoint, Project Task Pane
    Error Code
    Description
    File
    Line
    Col
    Project
     1
    Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets
    438
    5
    AppName
    I'm using
    Microsoft Visual Studio Community 2013
    Version 12.0.31101.00 Update 4
    Microsoft .NET Framework
    Version 4.5.51641
    Installed Version: Professional
    LightSwitch for Visual Studio 2013   06177-004-0444002-02129
    Microsoft LightSwitch for Visual Studio 2013
    Team Explorer for Visual Studio 2013   06177-004-0444002-02129
    Microsoft Team Explorer for Visual Studio 2013
    Visual Basic 2013   06177-004-0444002-02129
    Microsoft Visual Basic 2013
    Visual C# 2013   06177-004-0444002-02129
    Microsoft Visual C# 2013
    Visual C++ 2013   06177-004-0444002-02129
    Microsoft Visual C++ 2013
    Visual F# 2013   06177-004-0444002-02129
    Microsoft Visual F# 2013
    Visual Studio 2013 Code Analysis Spell Checker   06177-004-0444002-02129
    Microsoft® Visual Studio® 2013 Code Analysis Spell Checker
    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.
    Windows Phone SDK 8.0 - ENU   06177-004-0444002-02129
    Windows Phone SDK 8.0 - ENU
    Application Insights Tools for Visual Studio Package   1.0
    Application Insights Tools for Visual Studio
    ASP.NET and Web Tools   12.4.51016.0
    Microsoft Web Developer Tools contains the following components:
    Support for creating and opening ASP.NET web projects
    Browser Link: A communication channel between Visual Studio and browsers
    Editor extensions for HTML, CSS, and JavaScript
    Page Inspector: Inspection tool for ASP.NET web projects
    Scaffolding: A framework for building and running code generators
    Server Explorer extensions for Microsoft Azure Websites
    Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure
    ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
    For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
    ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
    For additional information, visit http://www.asp.net/
    Common Azure Tools   1.3
    Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
    Microsoft Azure Mobile Services Tools   1.3
    Microsoft Azure Mobile Services Tools
    NuGet Package Manager   2.8.50926.663
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
    Office Developer Tools for Visual Studio 2013 ENU   12.0.31105
    Microsoft Office Developer Tools for Visual Studio 2013 ENU
    PowerShell Tools   1.3
    Provides file classification services using PowerShell
    PreEmptive Analytics Visualizer   1.2
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
    SQL Server Data Tools   12.0.41012.0
    Microsoft SQL Server Data Tools
    Windows Phone 8.1 SDK Integration   1.0
    This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.
    From looking at the build it looks like the web part is building correctly but the application isn't passing validation, I have no idea why since it is the default app, I've made Office Apps on previous machines without a problem.
    Any help would be much appreciated and also let me know if I can give more info!

    Hi mngfinney,
    >> From looking at the build it looks like the web part is building correctly but the application isn't passing validation, I have no idea why since it is the default app, I've made Office Apps on previous machines without a problem.
    I’m trying to reproduce your issue but failed.
    Here is my steps:
    #1 Install Microsoft Visual Studio Community 2013
    #2 Install Microsoft Office Developer Tools for Visual Studio 2013
    #3 Create a new Apps for Office project and rebuild
    According your error message, the failed step is ValidatePackage, I suspect it is an environment issue, but I cannot identify the root cause basing on the information you post.
    Have you tried to re-install the Visual Studio and Microsoft Office Developer Tools for Visual Studio 2013 or test it on another machine with Microsoft Visual Studio Community 2013?
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for