Inet4AddressImpl.lookupAllHostAddr(String) hangs/blocks

I'm experiencing a hang when attempting to establish a socket connection.
Debugging indicates the VM is blocked here:
Inet4AddressImpl.lookupAllHostAddr(String) line: not available [native method]
I'm experiencing this problem during an ANT build.
Interestingly the problem disappears if I execute the offending code in a forked process.
Consequently, I suspect this may be a bug in the VM implementation.
Can anyone offer any insights into why the hang is occurring?
Kind Regards,
Matthew

Which operating system do you see this with? If Windows then it may be a locking issue between pipe connection between ANT and child process and the host lookup. Here is the bug tracking the issue (looking at the referenced bugs to see other examples:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4653680
The problem has been investigated many times and requires a fix in Windows (can't be fixed or worked around in the JDK).

Similar Messages

  • From string to block diagram

    Hi,
    I need to know how you can translate a string, a formula, to the block diagram. So for instance, if you have G=5+3*lnW, how can you translate the ln to the ln in the block diagram. The formula isn't fixed so I can't make a hard code.
    Thanks in advance
    KF_ 

    You would need to write a parser that would evaluate the equation entered. If you use RPN this is fairly easy to do. RPN is nice since it lends itself well to using a stack for processing the equation and you will always be dealing no more than the top two elements of the stack. Your evaluation routine would be in a loop that would parse the equation and invoke the proper case in a simple state machine. You will need to use a shift register to store the variables, operations and intermediate results as you parse the equation. You would need a case for each operation you will support.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • One node RAC pause/hang/block on other node shutdown

    Hi,
    We have a Java application running on Linux servers connecting to a 10.2.0.1 RAC cluster, also Linux. When the application starts it opens up a pool of connections to the databsae, and these are used throughout the life time of the application. One server connects to one RAC node.
    AppA - DBA
    AppB - DBB
    When we shutdown one node, the application connecting to that node stops, which is what we would expect in this configuration.
    What is strange is that the other application blocks for 63 seconds and then continues. So it is like the database is blocking, or the database connections are blocking.
    We are not using TAF, FAN, FCN, LB, VIPs or any special features, just simple lightweight JDBC from one server to one database. In fact I do not thing we are unwittingly using any of these features, we have them switched off.
    john

    user1788323 wrote:
    What is strange is that the other application blocks for 63 seconds and then continues. So it is like the database is blocking, or the database connections are blocking.How have you determined/diagnosed the 63s blocking? (more details in this regard may shed some light on the problem)
    Assuming that the block is server side, then two basic reasons comes to mind.
    Networking issue - the CRS on the surviving node has to perform certain functions, like switching the VIP of the node that left the cluster to a surviving cluster node. The listener may need to re-register services. A local firewall may need to be dynamically reconfigured for supporting the new failed-over VIP. Etc.
    Thus these could result in some kind of delay or issue in the network layer that you are seeing from the client side.
    Infrastructure issue. If the actual client request via JDBC reaches the server process, and it is slow in responding, then that is not a network issue - instead some underlying service or s/w layer that the server process needs to use to perform the client request is busy for those 63s.
    This could be related to the Interconnect, the shared I/O storage layer or something along those lines. For example, how does the Interconnect and/or SAN switch re-act when a server node is powered down or rebooted?
    There's not really sufficient information to make anything but a guesses.. You will need to isolate the problem with further testing.
    I have seen similar problems with 10.1.0.3 CRS and RAC when a node is evicted from the cluster. In this case the "hung" period was in excess of 15 minutes and only for new connections (Listener unable to hand off to dedicated servers or dispatchers). Existing connections worked fine however and were unaware of any problems. But part of the issue in this case was a poor (outdated) driver layer - and also the last time we used proprietary binary drivers (kernel modules) from 3rd party vendors that results in a tainted (and very fixed and rigid) Linux kernel. Today we're sticking with an OpenSource driver layer only for Linux.

  • PreparedStatement.close() hangs, blocking finalization

    We encountered an incident on a production system with a class that would call PreparedStatement.close() on finalize(), and there was an instance where the jvm finalizer thread stalled on this the PreparedStatement.close() call, blocking garbage collection.
    The last sql statement run with the preparedstatement was most probably a select statement (we cannot determine for sure), and the OCI driver was used.
    While I realize it's not recommended to close PreparedStatements on finalize(), can I ask for some possible reasons why the close() call would stall? Would it be a database issue or a java issue?

    Can you do the close() in a PhantomReference? That might be a good alternative to using finalize(). These refs are rather obscure and most Java authors parrot the usual line about post-mortem cleanup, but if you dig deep enough you can find a few examples of its use (I think that there is Apache group source with an example).
    If you are running in a servlet, move the close() to the servlet destroy() method.
    The best solution is to use 10.2 implicit connection caching and close all your Connections immediatly after use in a finally block. Then close your DataSource in the destroy().

  • Downloaded VM Template (EL5U3/DB 11.1.0.7/Agent 10.2.0.5/PVM) blocking

    Hi:
    I've downloaded and installed the Oracle paravirtualized VM template for EL5U3/DB 11.1.07/Agent 1.0.2.05 to a 2.1.5 VM Server. I have used the xm create -c vm.cfg command to start up the domU. After a short period of time, an xm list shows the status as blocked. The console shows this:
    Linux version 2.6.18-128.0.0.0.2.el5xen ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Wed Jan 21 05:49:36 EST 2009
    BIOS-provided physical RAM map:
    Xen: 0000000000000000 - 0000000080800000 (usable)
    1328MB HIGHMEM available.
    727MB LOWMEM available.
    NX (Execute Disable) protection: active
    ACPI in unprivileged domain disabled
    Built 1 zonelists. Total pages: 526336
    Kernel command line: ro root=LABEL=/ S
    Enabling fast FPU save and restore... done.
    Enabling unmasked SIMD FPU exception support... done.
    Initializing CPU#0
    CPU 0 irqstacks, hard=c0744000 soft=c0724000
    PID hash table entries: 4096 (order: 12, 16384 bytes)
    Xen reported: 2792.998 MHz processor.
    Console: colour dummy device 80x25
    Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    Software IO TLB disabled
    vmalloc area: ee000000-f4ffe000, maxmem 2d7fe000
    Memory: 2065604k/2105344k available (2126k kernel code, 30380k reserved, 875k data, 176k init, 1359880k highmem)
    Checking if this processor honours the WP bit even in supervisor mode... Ok.
    Calibrating delay using timer specific routine.. 6984.47 BogoMIPS (lpj=13968955)
    Security Framework v1.0.0 initialized
    SELinux: Initializing.
    selinux_register_security: Registering secondary module capability
    Capability LSM initialized as secondary
    Mount-cache hash table entries: 512
    CPU: L1 I cache: 32K, L1 D cache: 32K
    CPU: L2 cache: 256K
    CPU: L3 cache: 8192K
    Checking 'hlt' instruction... OK.
    SMP alternatives: switching to UP code
    Freeing SMP alternatives: 13k freed
    Brought up 1 CPUs
    checking if image is initramfs... it is
    Freeing initrd memory: 5584k freed
    Grant table initialized
    NET: Registered protocol family 16
    ACPI Exception (utmutex-0262): AE_BAD_PARAMETER, Thread C06F2AA0 could not acquire Mutex [2] [20060707]
    No dock devices found.
    ACPI Exception (utmutex-0262): AE_BAD_PARAMETER, Thread C06F2AA0 could not acquire Mutex [2] [20060707]
    Brought up 1 CPUs
    PCI: setting up Xen PCI frontend stub
    ACPI: Interpreter disabled.
    Linux Plug and Play Support v0.97 (c) Adam Belay
    pnp: PnP ACPI: disabled
    xen_mem: Initialising balloon driver.
    usbcore: registered new driver usbfs
    usbcore: registered new driver hub
    PCI: System does not support PCI
    PCI: System does not support PCI
    NetLabel: Initializing
    NetLabel: domain hash size = 128
    NetLabel: protocols = UNLABELED CIPSOv4
    NetLabel: unlabeled traffic allowed by default
    NET: Registered protocol family 2
    IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
    TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
    TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
    TCP: Hash tables configured (established 131072 bind 65536)
    TCP reno registered
    audit: initializing netlink socket (disabled)
    type=2000 audit(1253809727.462:1): initialized
    highmem bounce pool size: 64 pages
    VFS: Disk quotas dquot_6.5.1
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    Initializing Cryptographic API
    alg: No test for crc32c (crc32c-generic)
    ksign: Installing public key data
    Loading keyring
    - Added public key 5739E02E34E738D4
    - User ID: Oracle USA, Inc. (Kernel Module GPG key)
    io scheduler noop registered
    io scheduler anticipatory registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    pci_hotplug: PCI Hot Plug PCI Core version: 0.5
    rtc: IRQ 8 is not free.
    Non-volatile memory driver v1.2
    Linux agpgart interface v0.101 (c) Dave Jones
    RAMDISK driver initialized: 16 RAM disks of 16384K size 4096 blocksize
    Xen virtual console successfully installed as xvc0
    Event-channel device installed.
    Console: switching to colour frame buffer device 100x37
    input: Xen Virtual Keyboard/Mouse as /class/input/input0
    Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
    ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
    ide-floppy driver 0.99.newide
    usbcore: registered new driver hiddev
    usbcore: registered new driver usbhid
    drivers/usb/input/hid-core.c: v2.6:USB HID core driver
    PNP: No PS/2 controller found. Probing ports directly.
    i8042.c: No controller found.
    mice: PS/2 mouse device common for all mice
    md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
    md: bitmap version 4.39
    TCP bic registered
    Initializing IPsec netlink socket
    NET: Registered protocol family 1
    NET: Registered protocol family 17
    Using IPI No-Shortcut mode
    XENBUS: Device with no driver: device/vbd/51712
    XENBUS: Device with no driver: device/vbd/51728
    XENBUS: Device with no driver: device/vbd/51744
    XENBUS: Device with no driver: device/vbd/51760
    XENBUS: Device with no driver: device/vif/0
    XENBUS: Device with no driver: device/console/0
    Freeing unused kernel memory: 176k freed
    Write protecting the kernel read-only data: 383k
    USB Universal Host Controller Interface driver v3.0
    SCSI subsystem initialized
    device-mapper: uevent: version 1.0.3
    device-mapper: ioctl: 4.11.5-ioctl (2007-12-12) initialised: [email protected]
    device-mapper: dm-raid45: initialized v0.2429
    Registering block device major 202
    xvda: xvda1 xvda2 xvda3
    xvdb: xvdb1
    xvdc: xvdc1
    xvdd: xvdd1
    EXT3-fs: INFO: recovery required on readonly filesystem.
    EXT3-fs: write access will be enabled during recovery.
    kjournald starting. Commit interval 5 seconds
    EXT3-fs: recovery complete.
    EXT3-fs: mounted filesystem with ordered data mode.
    SELinux: Disabled at runtime.
    type=1404 audit(1253810793.906:2): selinux=0 auid=4294967295 ses=4294967295
    At this point, it just hangs. I can't type anything in to the console.
    My vm.cfg is this:
    bootloader = '/usr/bin/pygrub'
    disk = ['file:/OVS/running_pool/110_dsrepo1/System.img,xvda,w',
    'file:/OVS/running_pool/110_dsrepo1/db11g.img,xvdb,w',
    'file:/OVS/running_pool/110_dsrepo1/oradata.img,xvdc,w',
    'file:/OVS/running_pool/110_dsrepo1/agent10g.img,xvdd,w',
    memory = '2048'
    name = '110_dsrepo1'
    on_crash = 'restart'
    on_reboot = 'restart'
    uuid = '37d0f14d-41fb-c7eb-93b1-34085b0af2fb'
    maxcpus = 1
    vcpus = 1
    vfb = ['type=vnc,vncunused=1,vnclisten=0.0.0.0,vncpasswd=dsrepomgr']
    vif = ['bridge=xenbr4,mac=00:16:3E:10:2B:8F,type=netfront']
    vif_other_config = []
    Can anyone help me figure out why the domU is just hanging/blocked?
    TIA

    pasinc wrote:
    Can anyone help me figure out why the domU is just hanging/blocked?It's not hanging (blocked just means it doesn't need the CPU) -- it's just switched into a graphic mode that the console view can't display. You can either VNC into the guest, or change the kernel boot parameters by removing rhgb quiet and replacing them with console=xvc0 -- this should allow you to see the full boot process and answer the first-boot interview questions without using VNC.
    You can get the VNC details by running: virsh dumpxml <domain ID> and you can get the domain ID from the xm list output.

  • GW API hangs intermittently when shutting down

    I would welcome any insight into the following issue.
    I have an application that uses the GroupWise Objects API to search users
    mailboxes for new messages that fit certain criteria and generate XML that
    describes them. This application is run as part of a batch process. On a
    customer site, the application occasionally hangs, blocking the rest of the
    batch process, leading to no end of grief!
    The customer is using GroupWise 7.0.3 build 1068 - I have the same build on
    my test system but have been unable to replicate the issue.
    I have got the customer to run debug diagnostics to generate hang dumps on
    the stalled process at 5 minute intervals. When we examined the dumps, we
    found the application had hung at shutdown, sleeping waiting for a function
    in gwenv1.dll to complete. Here is the relevant part of the output and
    stack trace:
    Type Description Recommendation
    Warning The following threads in
    GroupWiseConnector.exe__PID__3056__Date__09_23_200 9__Time_01_24_05PM__117__Manual
    Dump.dmp are calling the Sleep API. The call to this API originated from
    gwenv1!WpioTimeDelay+12.
    ( 0 )
    25.00% of threads blocked
    The duration of the Sleep call is 500 miliseconds. Short calls to the
    Sleep API often occur inside of a tight loop, which will delay the
    application and cause high CPU until the loop is exited.
    Please follow up with vendor Novell, Inc. for problem resolution
    concerning the following file: C:\WINDOWS\system32\gwenv1.DLL.
    This thread is calling the Sleep API. The call to this API originated from
    gwenv1!WpioTimeDelay+12.
    Function Source
    ntdll!KiFastSystemCallRet
    ntdll!NtDelayExecution+c
    kernel32!SleepEx+68
    kernel32!Sleep+f
    gwenv1!WpioTimeDelay+12
    gwenv1!WpcomTCPClientSSL+27a6
    gwenv1!SYM_CheckVersion+137
    gwenv1!WpcomExit+33
    gwenv1!WpeGlobalExit+5d
    GWXPLT1!XPDmPrefCache::AreDefaultListsSame+178a9b
    gwcma1!DllUnregisterServer+30b
    gwcma1!DllUnregisterServer+380
    gwcma1!DllUnregisterServer+32b62
    gwcma1!DllUnregisterServer+32990
    gwcma1+126e
    gwcma1+4e3c
    oleaut32!CStdDisp::Release+11
    oleaut32!VariantClear+b1
    Does anyone have any insight into why it is wating? (TCP SSL perhaps?)
    What type of object is blocking?
    What conditions might cause this to occur?
    Is there any way to stop it?
    Is this a GroupWise bug?
    Dave M

    I have implemented a brute force and ignorance work-around to this problem.
    When the application is told to shutdown, I keep track of the time, and wait
    5 minutes for the process to stop. If it doesn't shut down cleanly in that
    time, I unceremoniously kill the process. Hardly elegant, but...
    I would still like to understand what is causing the GW api to hang as I may
    have an underlying issue, but time to move on.
    Thanks
    Dave M
    "Preston Stephenson" <[email protected]> wrote in message
    news:[email protected]...
    > I'll pass the details onto another developer to see if he has
    > seen anything like this.
    >
    >>>> On Thursday, September 24, 2009 at 11:35 AM, Dave M<[email protected]>
    > wrote:
    >> I would welcome any insight into the following issue.
    >>
    >> I have an application that uses the GroupWise Objects API to search users
    >
    >> mailboxes for new messages that fit certain criteria and generate XML
    >> that
    >
    >> describes them. This application is run as part of a batch process. On a
    >
    >> customer site, the application occasionally hangs, blocking the rest of
    > the
    >> batch process, leading to no end of grief!
    >>
    >> The customer is using GroupWise 7.0.3 build 1068 - I have the same build
    > on
    >> my test system but have been unable to replicate the issue.
    >>
    >> I have got the customer to run debug diagnostics to generate hang dumps
    >> on
    >
    >> the stalled process at 5 minute intervals. When we examined the dumps,
    >> we
    >
    >> found the application had hung at shutdown, sleeping waiting for a
    > function
    >> in gwenv1.dll to complete. Here is the relevant part of the output and
    >> stack trace:
    >>
    >> Type Description Recommendation
    >> Warning The following threads in
    >>
    > GroupWiseConnector.exe__PID__3056__Date__09_23_200 9__Time_01_24_05PM__117__M
    >
    >> anual
    >> Dump.dmp are calling the Sleep API. The call to this API originated from
    >> gwenv1!WpioTimeDelay+12.
    >>
    >> ( 0 )
    >>
    >> 25.00% of threads blocked
    >>
    >> The duration of the Sleep call is 500 miliseconds. Short calls to
    >> the
    >
    >> Sleep API often occur inside of a tight loop, which will delay the
    >> application and cause high CPU until the loop is exited.
    >>
    >> Please follow up with vendor Novell, Inc. for problem resolution
    >> concerning the following file: C:\WINDOWS\system32\gwenv1.DLL.
    >>
    >>
    >> This thread is calling the Sleep API. The call to this API originated
    >> from
    >
    >> gwenv1!WpioTimeDelay+12.
    >>
    >> Function Source
    >> ntdll!KiFastSystemCallRet
    >> ntdll!NtDelayExecution+c
    >> kernel32!SleepEx+68
    >> kernel32!Sleep+f
    >> gwenv1!WpioTimeDelay+12
    >> gwenv1!WpcomTCPClientSSL+27a6
    >> gwenv1!SYM_CheckVersion+137
    >> gwenv1!WpcomExit+33
    >> gwenv1!WpeGlobalExit+5d
    >> GWXPLT1!XPDmPrefCache::AreDefaultListsSame+178a9b
    >> gwcma1!DllUnregisterServer+30b
    >> gwcma1!DllUnregisterServer+380
    >> gwcma1!DllUnregisterServer+32b62
    >> gwcma1!DllUnregisterServer+32990
    >> gwcma1+126e
    >> gwcma1+4e3c
    >> oleaut32!CStdDisp::Release+11
    >> oleaut32!VariantClear+b1
    >>
    >>
    >>
    >>
    >> Does anyone have any insight into why it is wating? (TCP SSL perhaps?)
    >>
    >> What type of object is blocking?
    >>
    >> What conditions might cause this to occur?
    >>
    >> Is there any way to stop it?
    >>
    >> Is this a GroupWise bug?
    >>
    >>
    >>
    >>
    >>
    >> Dave M

  • Instance status "BLOCKED" and ora-12528

    Oralce 10.2.0.1 -- SUN SPARC 10 64bit
    instance is in nomount state, can connect using "sys/passwd@string as sysdba" on node 1 but unable to connect from 2nd node. following error received.
    Node:2
    connect sys/passwd@string as sysdba;
    ERROR:
    ORA-12528: TNS:listener: all appropriate instances are blocking new connections
    Listener state on node 1 is following:
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "string" has 1 instance(s).
    Instance "string", status BLOCKED, has 1 handler(s) for this service...
    Service "string" has 1 instance(s).
    Instance "string", status UNKNOWN, has 1 handler(s) for this service...
    Service "string_XPT" has 1 instance(s).
    Instance "string", status BLOCKED, has 1 handler(s) for this service...
    Message was edited by:
    jees

    tnsnames.ora file is same on both nodes and tnsping is working fine.
    Following is listener.ora on node1........
    LISTENER_DB01 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = db01-vip)(PORT = 1521)(IP = FIRST))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.10.20)(PORT = 1521)(IP = FIRST))
    (ADDRESS = (PROTOCOL = TCP)(HOST = db01-dg)(PORT = 1521)(IP = FIRST))
    SID_LIST_LISTENER_DB01 =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/10.2.0/asm)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = string)
    (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db)
    )

  • StringIndexOutOfBoundsException error while convering char to string

    I am getting the following error could someone please help. thanks.
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    the error is on line : char a = middleinitial.trim().charAt(0);
    following is my code:
    if (!fname.equals("") && (!lname.equals("") && (!mi.equals(""))))
                 s = lname.trim()+fname.trim()+mi.trim();
                 lastName = st.nextToken().trim();
                 firstName = st.nextToken().trim();
                 middleinitial = st.nextToken().trim();
                 char a =  middleinitial.trim().charAt(0);
                 if (mi.equalsIgnoreCase(String.valueOf(a)))
                   {name3 = lastName+firstName+mi;
                     if (name3.equalsIgnoreCase(s))
                       row.addElement(lastName);
                       row.addElement(firstName);
                       row.addElement(middleinitial);
                       while (st.hasMoreTokens())
                         row.addElement(st.nextToken());
                       dataVector.addElement(row);
                 }

    if i am trying to serch midname z i still get
    exception because it hits null before it hits zYou should place the search inside the empty String
    if() block like this:
      while ( (record = dis.readLine()) != null)        
          StringTokenizer st = new StringTokenizer(record, ":", false);
          Vector row = new Vector();
          String s;
          String t;
          if (!fname.equals("") && (!lname.equals("") && (!mi.equals(""))))          
              s = lname.trim()+fname.trim()+mi.trim();
              lastName = st.nextToken().trim();
              firstName = st.nextToken().trim();
              middleinitial = st.nextToken().trim();
              if(!middleinitial.equals("")
                char a =  middleinitial.trim().charAt(0);
                if (mi.equalsIgnoreCase(String.valueOf(a)))              
                    name3 = lastName+firstName+mi;
                    if (name3.equalsIgnoreCase(s))                
                        row.addElement(lastName);
                        row.addElement(firstName);
                        row.addElement(middleinitial);
                        while (st.hasMoreTokens())                  
                            row.addElement(st.nextToken());
                        dataVector.addElement(row);                       }
      }Is this how you tried it?
    Alpha75

  • Tpnotify with TPACK flag hangs after upgrading to Tuxedo 12c RP020

    Hi,
    We are experiencing issues with tptonify with TPACK flag set after upgrading to Tuxedo 12c. Looks like tpnotify is not returned or reporting errors. Is there anything to do with "009. Bug16506218 - TPNOTIFY WITH TPACK FLAG THROW OUT EXCEPTION"? Is there any documentation about the new flag TPACK_INTL?
    Thanks

    Hello,
    If all you have done is upgrade to Tuxedo12 the behavior should be the same. The TPACK flag definition is:
    "The request is sent and the caller blocks until an acknowledgement message is received from the target client"
    Is there any additional change(e.g. in your client) you have made?
    What Tuxedo version are you upgrading from?
    The bug 16506218 fix was for a jolt client exception and a JSH failure.
    Do you see an error or is the process which executes tpnotify() just hanging/blocking waiting for the ack message?
    The flag that you mention is actually an undocumented customer requested enhancement that went into Tuxedo 10.3.
    Are you using it? Using it changes the tpnotify() behavior dependent upon the client status.
    Regards,
    Bob Finan

  • HTMLEditorKit triggers lookupAllHostAddr and slow down the app

    Hi,
    When I want to dynamically insert HTML code in my HTML Editor kit :
    HTMLEditorKit kit = new HTMLEditorKit();
    kit.insertHTML(doc, doc.getLength(), chatContent , 0, 0, null);
    It always trigger a :
    java.net.Inet6AddressImpl.lookupAllHostAddr(String) : java.net.InetAddress 2.114023 2568 ms (2.1%) 2568 ms 1
    and it slows down my application a lot.
    Would you have any idea to avoid that ?
    Thank you very much.
    Regards.

    COuld you post what's the chatContent ?
    Would be great if you can post SSCCE to illustrate the problem.

  • How to declare and initialize a STRING ARRAY (assign strings to array elements)

    How to declare and initialize a STRING ARRAY (assign desired strings to elements of an array, for example "abc", "def", "ghi", "jkl", etc.) in LabVIEW? I saw a "string array" block in help, but could not find it in the function palette. Does a spreadsheet string have to be in a file (or can it be in a string constant block)? Thank you.

    Hi,
    you can do it in several ways:
    1. Direct way: Create string array control on front panel and type strings in its elements
    2. Programmatically 1: Create string array indicator (or local variable of control), right click on it in block diagram, select "Create constant" from drop down menu. The array constant will appear. Now type values in this constant's strings
    3. Programmatically 1: Use "Build array", "Replace array subset", "Insert into array" or "Initialize array" functions from "Functions->Array" palette.
    And of course you can combine all of these methods.
    Good luck.
    Oleg Chutko.

  • InetAddress posting Unknown Host Exception

    Hello,
    I am relatively new to java and I am running into an Unknown Host Exception when attempting to return the IP's for valid host names. The strange part is that the first host name returns an address however every entry after the first returns the Unkown Host Exception. Here is the snippet of code that the problem is occuring in.
    Inet address as declared earlier in the code:
         private InetAddress Address = null;Code reporting errors:
              StringBuffer sb0 = new StringBuffer();
              int chr;
              // Read until the end of the stream     
              while ((chr = inputStream0.read()) != -1)
                      sb0.append((char) chr);
              String display = sb0.toString();
              String temp = display.replace("Giant ", "g0");
              String[] words = temp.split("\\|");
              StringBuffer db = new StringBuffer();
              for (int i=0; i < words.length; i++)
                      String many = (words[i] +"wu1");
                      try
                              Address = InetAddress.getByName(many);
                   db.append(words[i] + "wu1|" + Address);
                      catch(NullPointerException e)
                              db.append(words[i] + "wu1 - Null Pointer - ");
                      catch(UnknownHostException e)
                              db.append(words[i] + "wu1 - Unknown Host - ");
              String yay = db.toString();
              log.append(yay);
                                    catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
                                    catch (IOException e)
              // TODO Auto-generated catch block
              e.printStackTrace();
              }I have attempted setting Address back to null after the address was appended but it didn't make any difference.
    Edited by: mudbuggle on Aug 4, 2008 7:19 PM

    I made the adjustments however I am still experiencing the same problem.
    www.yahoo.com returns an ip address but the rest return Unknown Host Exceptions.
    www.yahoo.comjava.net.UnknownHostException:
    forums.sun.com
         at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
         at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source)
         at java.net.InetAddress.getAddressFromNameService(Unknown Source)
         at java.net.InetAddress.getAllByName0(Unknown Source)
         at java.net.InetAddress.getAllByName(Unknown Source)
    forums.sun.com     at java.net.InetAddress.getAllByName(Unknown Source)
         at java.net.InetAddress.getByName(Unknown Source)
         at IP$1.actionPerformed(IP.java:83)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    java.net.UnknownHostException:
    www.google.com
         at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
         at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source)
         at java.net.InetAddress.getAddressFromNameService(Unknown Source)
         at java.net.InetAddress.getAllByName0(Unknown Source)
         at java.net.InetAddress.getAllByName(Unknown Source)
         at java.net.InetAddress.getAllByName(Unknown Source)
         at java.net.InetAddress.getByName(Unknown Source)
         at IP$1.actionPerformed(IP.java:83)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

  • Unable to resolve hostname to IP

    Hi,
    I have a query which seems unusual but very important to get my job done. I'm trying to resolve the hostname to IP on a linux platform (Cent OS). Have a sample code how I'm trying to achieve the same.
    TestJava Class:
    import java.net.*;
    import java.util.*;
    public class TestJava {
    public static void main(String [] args) {
    String IP="10.10.1.7";
    try {
    InetAddress [] addr = InetAddress.getAllByName(args[0]);
    for(InetAddress ad : addr)
    if(ad.getHostAddress().equals(IP))
    System.out.println("Success");
    catch(Exception e) {
    e.printStackTrace();
    Output
    -bash-3.2# java TestJava _viscore
    java.net.UnknownHostException: _viscore
    at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:850)
    at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1201)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1154)
    at java.net.InetAddress.getAllByName(InetAddress.java:1084)
    at java.net.InetAddress.getAllByName(InetAddress.java:1020)
    at TestJava.main(TestJava.java:7)
    NSLookup Result:
    -bash-3.2# nslookup _viscore
    Server: 10.10.1.1
    Address: 10.10.1.1#53
    Name: _viscore.BDC.Maveric.local
    Address: 10.10.1.7
    Java Version:
    java version "1.6.0_21"
    Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
    Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode, sharing)
    All necessary setup to establish connection to DNS is done in "/etc/resolv.conf"
    Hostnames like "_hostname", "host/name" are valid and could able to do nslookup to these from console. But the same is failing from java end.
    Any help is highly appreciated.
    Manjunath

    Your code looks good, and I suppose your resolv.conf file is ok as well. The only potential problem I see is that an underscore is not allowed in hostnames. Does your code work for hostnames that don't contain underscores?

  • Extremely slow performance with ojdbc6.jar on IBM JVMs (Java 6)

    We are consistently seeing slow performance (easily demonstrable by the simplest of test cases) while using ojdbc6.jar on IBM JDKs. Pefrormance is normal when we simply opt for ojdbc14.jar under the same JDK, same java program.
    Works well
    =======
    JRockit, ojdbc6.jar
    JRockit, ojdbc14.jar
    IBM JDK, ojdbc14.jar
    A lot slower
    =======
    IBM JDK, ojdbc6.jar
    All we had to do was to write a simple JDBC access program and measure time taken around
    Connection conn = DriverManager.getConnection(jdbcURL, dbProps);
    The first 3 combinations mentioned above return comparable numbers. The 4th combination takes 3-4 times as much.
    We initially saw this during performance test of our software on WebSphere (also supported on Weblogic). Later was able to eliminate WebSphere and Weblogic as the problem areas and narrow it down to the JVM. Reproduce-able on development machines.
    We have been using Oracle/WLS since BEA used to market 'Tengah' servers. This is the worst we have seen as far as the qaulity of support staff goes. We first level support seems clueless. We filed this case and the support comes back tells us that IBM JDKs are not supported for WLS! Oh, we have been running WLS/AIX/IBM JVM combination only for 5+ years.

    A quick solution to test this would be to do the following:
    mv /dev/random /dev/random.bk
    ln /dev/urandom /dev/random
    Note: The quick solution will disappear after a reboot. You could add it to rc.local to automatically make this change, but I wouldn't recommend it.
    The following is from [http://www.usn-it.de/index.php/2009/02/20/oracle-11g-jdbc-driver-hangs-blocked-by-devrandom-entropy-pool-empty/]:
    "Oracle 11g JDBC driver hangs blocked by /dev/random – entropy pool empty
    On a headless (=without console) network server, the 11g JDBC driver used for (java) application connect may cause trouble. In my case, it refused to connect to the DB without any error, trace or log entry. It simply hung. After several hours, it connected one time, and freezed again. Remote debugging done by the development clarified that it locks after calling SeedGenerator() and SecureRandom().
    Reason: The JDBC 11g needs about 40 bytes of secure random numbers, gathered from /dev/random, to encrypt its connect string.
    But public-available “man 4 random” says:
    When read, the /dev/random device will only return random bytes within the estimated number of bits of noise in the entropy pool. /dev/random should be suitable for uses that need very high quality randomness such as one-time pad or key generation. When the entropy pool is empty, reads from /dev/random will block until additional environmental noise is gathered.
    So far so good, now the question arises: Why does this mystic “entropy pool” runs out of gas?
    The answer is as simple as unsatisfying: because too less entropy “noise” was generated by the system. You can check the “filling level” (maybe zero?) of your pool and the overall size of the pool (usually 4096) by issuing
    cat /proc/sys/kernel/random/entropy_avail
    cat /proc/sys/kernel/random/poolsize
    Hint: /dev/random will deliver one new random number as soon as the pool has reached more than 64 entropy units.
    So why does my box not generate more entropy noise?
    Because only few drivers will fill the entropy pool, first of all keyboard and mouse. Sounds very useful on a server in a datacenter, isn’t it? Some block device and network drivers seem to do so as well, and I have read from guys on the net changing their network card and driver to enjoy this “feature”! But let’s stop ranting, /dev/random is simply made for high security randomness, and if it can’t make sure that randomness is as good as possible in this deterministic world, it stops. Intelligent people have created /dev/urandom for that, like “man 4 random” clearly states:
    A read from the /dev/urandom device will not block waiting for more entropy. As a result, if there is not sufficient entropy in the entropy pool, the returned values are theoretically vulnerable to a cryptographic attack on the algorithms used by the driver. Knowledge of how to do this is not available in the current non-classified literature, but it is theoretically possible that such an attack may exist. If this is a concern in your application, use /dev/random instead.
    Now let’s get back on our JDBC problem. Oracle JDBC 11g seems to use /dev/random by default, which causes usually no trouble on clients running with console access by a user, because his/her unpredictable :) actions will keep the entropy pool well-fed. But to make it usable on a headless server with a latently empty entropy pool, you should do several things, in descending security order (without warranty):
    1. Involve an audio entroy daemon like AED to gather noise from your datacenter with an open microphone, maybe combine it with a webcam noise collector like VED. Other sources are talking about “Cryptographic Randomness from Air Turbulence in Disk devices“. :)
    2. Use the Entropy Gathering Daemon to collect weaker entropy from randomness of userspace programs.
    3. Talk your JDBC into using /dev/urandom instead:
    -Djava.security.egd=file:///dev/urandom"

  • Java Server Chat, Help Needed PLEASE!! - NullPointerException

    Hi i am having problem with my java chat. when i go to load it i get a NullPointerException i know what code is causeing the problem but im not quite sure what it does can u explain to me please. Ive been looking at this error trying to fix it for a few weeks now and its annoying. Thank you for any help. Here is the code that causes the NullPointerException
         public static final void j()
            try
                String as[] = {
                    "ar", "aq", "ao"
                Class class1;
                Object obj = (class1 = Class.forName((new StringBuilder()).append(com/diginet/oldchat/server/g.getPackage().getName()).append(".an").toString())).getMethod(as[0], new Class[0]);
                if(q)
                    obj = ((Method) (obj)).invoke(null, new Object[0]);
                    Class aclass[];
                    (aclass = new Class[1])[0] = java/lang/String;
                    Object aobj[];
                    (aobj = new Object[1])[0] = obj;
                    for(int i1 = 1; i1 < as.length; i1++)
                        Method method;
                        (method = class1.getMethod(as[i1], aclass)).invoke(null, aobj);
                    q = false;
                return;
            catch(Exception _ex)
                ChatServer.q_java_util_Vector_static_fld = new Vector();
            ChatServer.q_com_diginet_digichat_common_SerialInfo_static_fld = null;
        }If part of the program uses
    com.diginet.oldchat.server.g.j();wich will load the code above it always gives NullPointerException and then wont continue loading what is wrong? Please help me
    Oh and by the way this is my first post on this forum and i found it quite easy to use!
    Please please please help me thnk youuu

    Ok here is what u asked for. Oh and by the way im running this from CMD so wilse the Chat Server is loading i can do the Stack Trace just as its trying to do what it does after saying "Expires On:" (Wich after gives NullPointerException) once the errors come on the screen i cant get a stack trace anymore by useing {CTRL} + Break. but i still hope this can help u :)
    *2009-05-07 22:23:30*
    Full thread dump Java HotSpot(TM) Client VM (11.3-b02 mixed mode, sharing):
    *"Low Memory Detector" daemon prio=6 tid=0x02a7e000 nid=0xbcc runnable [0x0000000*
    *0..0x00000000]*
    java.lang.Thread.State: RUNNABLE
    *"CompilerThread0" daemon prio=10 tid=0x02a7b000 nid=0xd80 waiting on condition [*
    *0x00000000..0x02d2f9c0]*
    java.lang.Thread.State: RUNNABLE
    *"Attach Listener" daemon prio=10 tid=0x02a79800 nid=0x270 runnable [0x00000000..*
    *0x00000000]*
    java.lang.Thread.State: RUNNABLE
    *"Signal Dispatcher" daemon prio=10 tid=0x02a78400 nid=0x224 waiting on condition*
    *[0x00000000..0x00000000]*
    java.lang.Thread.State: RUNNABLE
    *"Finalizer" daemon prio=8 tid=0x02a73400 nid=0xf60 in Object.wait() [0x02c3f000.*
    *.0x02c3fa94]*
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x22a80288> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    - locked <0x22a80288> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(Unknown Source)
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
    *"Reference Handler" daemon prio=10 tid=0x02a6ec00 nid=0xe2c in Object.wait() [0x*
    *02bef000..0x02befb14]*
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x22a80310> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:485)
    at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
    - locked <0x22a80310> (a java.lang.ref.Reference$Lock)
    *"main" prio=6 tid=0x002b6400 nid=0x6b0 runnable [0x0090f000..0x0090fe54]*
    java.lang.Thread.State: RUNNABLE
    at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source)
    at java.net.InetAddress.getAddressFromNameService(Unknown Source)
    at java.net.InetAddress.getAllByName0(Unknown Source)
    at java.net.InetAddress.getAllByName(Unknown Source)
    at java.net.InetAddress.getAllByName(Unknown Source)
    at java.net.InetAddress.getByName(Unknown Source)
    at java.net.InetSocketAddress.<init>(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    - locked <0x229fac68> (a sun.net.www.http.HttpClient)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
    Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
    ce)
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
    urce)
    - locked <0x229f4118> (a sun.net.www.protocol.http.HttpURLConnection)
    at java.net.URL.openStream(Unknown Source)
    at com.diginet.oldchat.server.an.w(Unknown Source)
    at com.diginet.oldchat.server.an.ar(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.diginet.oldchat.server.g.j(Unknown Source)
    at com.diginet.digichat.server.ChatServer.<init>(Unknown Source)
    at com.diginet.digichat.server.ChatServer.main(Unknown Source)
    *"VM Thread" prio=10 tid=0x02a6d000 nid=0xe38 runnable*
    *"VM Periodic Task Thread" prio=10 tid=0x02a82c00 nid=0xa8 waiting on condition*
    JNI global references: 814
    Heap
    def new generation   total 960K, used 505K [0x22990000, 0x22a90000, 0x22e70000)
    eden space 896K,  49% used [0x22990000, 0x229fe4a0, 0x22a70000)
    from space 64K, 100% used [0x22a80000, 0x22a90000, 0x22a90000)
    to   space 64K,   0% used [0x22a70000, 0x22a70000, 0x22a80000)
    tenured generation   total 4096K, used 139K [0x22e70000, 0x23270000, 0x26990000
    the space 4096K,   3% used [0x22e70000, 0x22e92f88, 0x22e93000, 0x23270000)
    compacting perm gen  total 12288K, used 466K [0x26990000, 0x27590000, 0x2a99000
    *0)*
    the space 12288K,   3% used [0x26990000, 0x26a04b00, 0x26a04c00, 0x27590000)
    ro space 8192K,  63% used [0x2a990000, 0x2aea8810, 0x2aea8a00, 0x2b190000)
    rw space 12288K,  53% used [0x2b190000, 0x2b7fd300, 0x2b7fd400, 0x2bd90000)
    Thanks again an hope this helps.

Maybe you are looking for

  • Issue in /130 & /416

    Dear Folks, Here is a scenario, I have created a wage type , the amount of this wage type is add to /130 & /416 . I have written a pcr and the amount of same is adding in /130 &/ 416  but while exeucting the payroll for next month, amount stored in /

  • Dual boot with archlinux and windows issue

    Hi again! This is what i did from the beginning : windows was already installed and then i installed archlinux after shrinking the windows partition . I made a partition for boot , one for swap and one for root(i wanted to do for home too , but only

  • F-53 Error- u201C Item was not activated due to on line payment block.u201D

    When we are doing payment document against T Code F-53 for FI document  systems is giving message That u201C Item was not activated due to on line payment block.u201D This error is due to what ? Regards, Shekhar Gaikwad

  • Secured PDF editable on iPad?

    We have agents that use iPads to view some of the material we create at our home office.  We secure the PDF, allowing no changes, yet we are hearing reports that these agents are able to still edit the PDFs when using their iPad.  I'm unable to recre

  • Save waveforms with HP/Agilent 35665a with GPIB

    How to save wavaforms on a portable pc using pcmcia gpib card with the hp/agilent 35665a? I'm using the 6.01 Labview version and the instrument driver from the NI developer zone. Thanks.