Bad Strand Length Assert

Hi all,
I am getting the following asserts while i am trying to open a document which was created by using my plugin, i am having some text boxes in which i have placed text from word document (which contains some track change data like strike tru text). With normal text placed in these text boxes i wont get any asserts and the document opens correctly, but with the documents containing word data i am getting the following asserts and indesign crashes, can anybody guide me in this regards.
ASSERTS
Bad strand length, class id = kFrameListBoss, strandLength = 535, modelLength = 541
ValidateTextModel - length of strands are out of sync.
waxLine starts before story thread boundry
wax line crosses story thread boundry
no thread?
Wax is screwy. See WaxWorld.txt for details.
Thanks
Madhu

This is not a bug on tabular forms. You will have to add a length check using one of these methods. (I am not being rigorous here on syntax, you may need to search the forum for better examples.)
You can create a page validation (pl/sql body) after submit, that checks the length of a g_fxx(i) column in a loop. Search the forum for g_fxx examples.
or Apply a little Javascript. Under the query's report attributes, you can add this js to the column's Element attributes: onfocus="this.setAttribute('maxLength','80');
or dive into Dynamic actions using jQuery selectors...
td[headers='my column name'] input
(execute javascript action)
this.triggeringElement.setAttribute('maxLength','80');
The Apex team may provide a method for setting the length in the future but these are the options you have now.
Kelly
Edited by: klsharpe on Mar 8, 2011 9:27 AM

Similar Messages

  • How to solve "Bad Content-Length value" Error that show in ADF Mobile

    I was develop application that using web service from mine original ADF project and I can't fetch via AMX Page as pop-up error "Bad Content-Length value" How to solve this problem ?
    My Web-service configuration
    - "Find" is only basic operation that in view instance
    - None of View criteria
    As only find is basic operation, that seems required "findCriteria" and "findControl" parameter(as seen in "Panel From layout" generated in AMX Page)
    After drag generate form view in AMX Page and after to deploy to simulator, I was found pop-up error was said Bad Content-Length value as shown below.
    I am also using HTTP Analyzer and didn't found any request from ADF Mobile Application
    http://img844.imageshack.us/img844/7720/screenshot20130305at163.png

    Hi,
    I'm also got a problem with this tutorial too, after touch at "Salary Upgrade" button and got same error too
    http://docs.oracle.com/cd/E18941_01/tutorials/BuildingMobileApps/ADFMobileTutorial_2.html
    I have some conclusion with develop ADF Mobile in OSX will related with this problem as tutorial are properly working and nobody was said about this problem.
    My current development machine is OSX 10.8.2 with jDeveloper 11.1.2.3.0
    Edited by: meddlesome on Mar 7, 2013 2:49 AM

  • ERROR   OGG-01163  Bad column length (8)

    Hi ,
    I am receiving the following error on the Target side( which have LONG data type. one of the tale name is IMAGE_TABLE) when replicating from 9i to 11g. Table structure is same but still following error persists on REPLICAT , Please help.
    2012-02-20 10:07:45 ERROR OGG-01163 Bad column length (8) specified for column SIGN_LENGTH in table TBAADM.IMAGE_TABLE, maximum allowable length is 2.
    Thanks,
    NC

    Any chance you have an out of sync DEFGEN file ( if you are using DEFGEN that is ).
    We recently had an issue where we were getting column size mismatch errors... developer changed something on the source DB... Corresponding change was not made in target DB and we needed to refresh the DEFGEN. After the refresh we were OK to continue processing without an error. Might be something to check.
    -Dave

  • SSH Disconnecting: Bad packet length

    If I log into my new Xserves (running 10.4.4) using an invalid username, after I submit a password, ssh will hang for a long time then report:
    Disconnecting: Bad packet length xxxxxx
    My older Xserves (running 10.2 and 10.3) don't have this problem, they will just say "Permission denied, please try again" and prompt for the password again. eventually they'll disconnect you, but not with an error.
    Has Apple supplied a new version of SSH in 10.4 that is broken in some way?
    I have noticed this on both OS X server, and the desktop version (All at 10.4.4)
    This doesn't seem to be a problem if you use a valid login, only when you use an invalid userid.
    Any one else run into this? Any idea how to make ssh behave?
    thanks
    -jason

    In this case I was attempting to connect via my laptop (a powerbook) that was connected to the servers via a gigabit switch (the only intervening piece of equipment). Needless to say, these are about the most reliable connections you could expect to have.
    However, I've seen this behavior, when connecting to:
    2 different Xserves running 10.4.4 Server
    1 DualG5 powermac running 10.4.4 and
    1 Powerbook also running 10.4.4
    However when connecting to 10.2.x or 10.3.x servers, I receive the Permission denied response as one would expect.
    I just had an epiphany ....
    While attempting to disable password authentication on the 2 xserves altogether, I had to set not only "PasswordAuthentication no", but also "UsePAM no".
    So, perhaps the problem is that UsePAM is set to yes by default....
    I just attempted to log in to my workstation (10.4.4 with an unmodified sshd_config file) using a bogus username and I received:
    "Disconnecting: Bad packet length 4185019582" after an extended delay
    Then I changed the config file to set "UsePAM no" and tried the login again. this time I received:
    "Permission denied, please try again." almost immediately
    So, It appears that the default configuration that has PAM enabled for sshd is the problem here.
    Thanks for having me revisit this after sitting on it for a couple of days. It led me to the solution.
    -jason

  • Netstat not reporting input errors with packets that have bad checksums ?

    Greetings,
    Is netstat not reporting any checksum errors ? I have a number of Macs reporting checksum errors when sniffing the local net. I would think that these should be reported by netstat as input errors, or collisions right ?
    But it doesn't currently. See below for sample, its occurring across protocols, tcp, and udp. Usually this error is a bad ethernet port or cabling, and sometimes a sw issue. Working on eliminating the switches, router, and dsl modem by doing more testing.
    But is netstat broke ? I havent seen any errors from netstat since @ 3yrs ago.
    length 64, bad cksum 0 (->f9fe)!)
    One other question, can one monitor firewire 400/800 ports or usb with netstat ? Its not listed with man pages or netstat -h
    Thanks in advance

    Im am using two commands to view the data;
    netstat -I en0 2;
    (no errors in or out)
    and tcpdump with the verbose -v argument
    ( reports the cksum ( these are CRC's right, not IP header checksum ? )
    At the very bottom is the netstat -s output, otherwise a snippet of tcpdump ; replaced the IP's with xxxx's to protect the innocent
    Thanks for your help.....
    ===========================
    18:13:37.101690 IP (tos 0x0, ttl 64, id 8134, offset 0, flags [DF], proto TCP (6), length 957, *bad cksum 0 (->68d8)!)* xxxxxxxxxx > xxxxxxxxxxxxxxx: P 8689:9594(905) ack 1 win 65535 <nop,nop,timestamp 1438111158 3084046213>
    18:13:37.136653 IP (tos 0x0, ttl 57, id 26778, offset 0, flags [DF], proto TCP (6), length 52) xxxxxxxxxx > xxxxxxxxxxxxxxx: ., cksum 0xd4bc (correct), ack 5793 win 17376 <nop,nop,timestamp 3084046248 1438111158>
    18:13:37.172381 IP (tos 0x0, ttl 57, id 26779, offset 0, flags [DF], proto TCP (6), length 52) xxxxxxxxxx > xxxxxxxxxxxxxxx: ., cksum 0xc3a0 (correct), ack 7241 win 20272 <nop,nop,timestamp 3084046284 1438111158>
    18:13:37.207358 IP (tos 0x0, ttl 57, id 26780, offset 0, flags [DF], proto TCP (6), length 52) xxxxxxxxxx > xxxxxxxxxxxxxxx: ., cksum 0xb285 (correct), ack 8689 win 23168 <nop,nop,timestamp 3084046319 1438111158>
    18:13:37.230968 IP (tos 0x0, ttl 57, id 26781, offset 0, flags [DF], proto TCP (6), length 52) xxxxxxxxxx > xxxxxxxxxxxxxxx: ., cksum 0xa395 (correct), ack 9594 win 26064 <nop,nop,timestamp 3084046342 1438111158>
    18:13:37.313545 IP (tos 0x0, ttl 57, id 26782, offset 0, flags [DF], proto TCP (6), length 1500) xxxxxxxxxx > xxxxxxxxxxxxxxx: . 1:1449(1448) ack 9594 win 26064 <nop,nop,timestamp 3084046415 1438111158>
    18:13:37.322422 IP (tos 0x0, ttl 57, id 26783, offset 0, flags [DF], proto TCP (6), length 1500) xxxxxxxxxx > xxxxxxxxxxxxxxx: . 1449:2897(1448) ack 9594 win 26064 <nop,nop,timestamp 3084046415 1438111158>
    18:13:37.322440 IP (tos 0x0, ttl 64, id 8135, offset 0, flags [DF], proto TCP (6), length 52, *bad cksum 0 (->6c60)!)* xxxxxxxxxx > xxxxxxxxxxxxxxx ., *cksum 0xaec3 (incorrect (-> 0xff42)*, ack 2897 win 65160 <nop,nop,timestamp 1438111159 3084046415>
    18:13:37.331285 IP (tos 0x0, ttl 57, id 26784, offset 0, flags [DF], proto TCP (6), length 1500) xxxxxxxxxx > xxxxxxxxxxxxxxx: . 2897:4345(1448) ack 9594 win 26064 <nop,nop,timestamp 3084046415 1438111158>
    18:13:37.334407 IP (tos 0x0, ttl 57, id 26785, offset 0, flags [DF], proto TCP (6), length 646) xxxxxxxxxx > xxxxxxxxxxxxxxx: P 4345:4939(594) ack 9594 win 26064 <nop,nop,timestamp 3084046415 1438111158>
    18:13:37.334421 IP (tos 0x0, ttl 64, id 8136, offset 0, flags [DF], proto TCP (6), length 52, *bad cksum 0 (->6c5f)!*) xxxxxxxxxx > xxxxxxxxxxxxxxx: ., *cksum 0xaec3 (incorrect (-> 0xf5d1)*, ack 4939 win 65535 <nop,nop,timestamp 1438111159 3084046415>
    ===============================
    netstat -s
    tcp:
    7470 packets sent
    2868 data packets (671900 bytes)
    0 data packets (0 bytes) retransmitted
    0 resends initiated by MTU discovery
    3534 ack-only packets (101 delayed)
    0 URG only packets
    0 window probe packets
    657 window update packets
    411 control packets
    7918 packets received
    3225 acks (for 672008 bytes)
    185 duplicate acks
    0 acks for unsent data
    4489 packets (2652174 bytes) received in-sequence
    7 completely duplicate packets (7347 bytes)
    0 old duplicate packets
    0 packets with some dup. data (0 bytes duped)
    291 out-of-order packets (412273 bytes)
    0 packets (0 bytes) of data after window
    0 window probes
    1 window update packet
    1 packet received after close
    0 discarded for bad checksums
    0 discarded for bad header offset fields
    0 discarded because packet too short
    207 connection requests
    12 connection accepts
    0 bad connection attempts
    0 listen queue overflows
    219 connections established (including accepts)
    231 connections closed (including 9 drops)
    2 connections updated cached RTT on close
    2 connections updated cached RTT variance on close
    0 connections updated cached ssthresh on close
    0 embryonic connections dropped
    3222 segments updated rtt (of 3193 attempts)
    2 retransmit timeouts
    0 connections dropped by rexmit timeout
    0 persist timeouts
    0 connections dropped by persist timeout
    0 keepalive timeouts
    0 keepalive probes sent
    0 connections dropped by keepalive
    2199 correct ACK header predictions
    4128 correct data packet header predictions
    0 SACK recovery episodes
    0 segment rexmits in SACK recovery episodes
    0 byte rexmits in SACK recovery episodes
    0 SACK options (SACK blocks) received
    275 SACK options (SACK blocks) sent
    0 SACK scoreboard overflow
    udp:
    360 datagrams received
    0 with incomplete header
    0 with bad data length field
    0 with bad checksum
    21 dropped due to no socket
    65 broadcast/multicast datagrams dropped due to no socket
    0 dropped due to full socket buffers
    0 not for hashed pcb
    274 delivered
    390 datagrams output
    ip:
    8278 total packets received
    0 bad header checksums
    0 with size smaller than minimum
    0 with data size < data length
    0 with ip length > max ip packet size
    0 with header length < data size
    0 with data length < header length
    0 with bad options
    0 with incorrect version number
    0 fragments received
    0 fragments dropped (dup or out of space)
    0 fragments dropped after timeout
    0 packets reassembled ok
    8278 packets for this host
    0 packets for unknown/unsupported protocol
    0 packets forwarded (0 packets fast forwarded)
    0 packets not forwardable
    0 packets received for unknown multicast group
    0 redirects sent
    7869 packets sent from this host
    0 packets sent with fabricated ip header
    0 output packets dropped due to no bufs, etc.
    8 output packets discarded due to no route
    0 output datagrams fragmented
    0 fragments created
    0 datagrams that can't be fragmented
    0 tunneling packets that can't find gif
    0 datagrams with bad address in header

  • Tossing bad msg pid 13213

    Hello All,
    We recently received errors in our alert log file regarding:
    tossing data msg
    tossing bad msg pid 13213
    We googled the internet trying to find root of cause but not much there. Does anyone encounter the same errors? What causes it? How to resolve this?
    Thanks!

    Thanks, OrionNet, for the Metalink notes!
    There is another metalink that seems related:
    733831.1: Lmon Tracefile Filling With Tossing Bad Msg Dumps
    In this note, it is suggested that network change may have caused this behavior:
    **Changes
    **Network setup was changed
    **Cause
    **Oracle is reporting these messages when it is receiving bad data through the interconnect
    **A similiar issue was reported in Bug 7319477
    **Solution
    **Review the network cards and switches for the interconnect
    **review the setup of the interconnect - IPMP, bonding, teaming
    **use netstat -s to see if the numbers for 'bad checksums' and 'bad data length fields' are increasing.
    I will "netstat -s " to check if we have any issues there. Thanks!

  • Finder crashes when connecting to server (10.9.4)

    I have been having an issue with my Mac Mini the last few days when it tries to connect to my local server.
    The first few times I can access the server normally through Finder, but after a few goes Finder freezes (spinning beach ball on finder - other apps work ok) up completely and needs to be restarted. Once it has restarted and I re-open Finder, it freezes up again completely until I restart my computer. The same applies when I try to access the server from other apps (eg. when adding a photo from the server to something in Chrome).
    I have reset PRAM, verified/repaired disk, run CCleaner.
    Any solutions to this issue?
    Mac Mini mid-2011
    Processor  2.5 GHz Intel Core i5
    Memory  4 GB 1333 MHz DDR3
    Running 10.9.4

    Sorry...
    tcp:
        61269 packets sent
            14501 data packets (5423429 bytes)
            457 data packets (298568 bytes) retransmitted
            0 resends initiated by MTU discovery
            34229 ack-only packets (284 delayed)
            0 URG only packets
            0 window probe packets
            8915 window update packets
            3181 control packets
            0 data packets sent after flow control
            0 checksummed in software
                0 segments (0 bytes) over IPv4
                0 segments (0 bytes) over IPv6
        66665 packets received
            15538 acks (for 5408457 bytes)
            1286 duplicate acks
            0 acks for unsent data
            46049 packets (49418889 bytes) received in-sequence
            233 completely duplicate packets (175429 bytes)
            0 old duplicate packets
            1 packet with some dup. data (996 bytes duped)
            6329 out-of-order packets (8815198 bytes)
            0 packets (0 bytes) of data after window
            0 window probes
            70 window update packets
            166 packets received after close
            0 bad resets
            0 discarded for bad checksums
            0 checksummed in software
                0 segments (0 bytes) over IPv4
                0 segments (0 bytes) over IPv6
            0 discarded for bad header offset fields
            0 discarded because packet too short
        1604 connection requests
        50 connection accepts
        0 bad connection attempts
        0 listen queue overflows
        1622 connections established (including accepts)
        1613 connections closed (including 48 drops)
            37 connections updated cached RTT on close
            37 connections updated cached RTT variance on close
            15 connections updated cached ssthresh on close
        0 embryonic connections dropped
        15554 segments updated rtt (of 13699 attempts)
        544 retransmit timeouts
            20 connections dropped by rexmit timeout
            0 connections dropped after retransmitting FIN
        2 persist timeouts
            0 connections dropped by persist timeout
        0 keepalive timeouts
            0 keepalive probes sent
            0 connections dropped by keepalive
        2887 correct ACK header predictions
        40214 correct data packet header predictions
        79 SACK recovery episodes
        43 segment rexmits in SACK recovery episodes
        39243 byte rexmits in SACK recovery episodes
        256 SACK options (SACK blocks) received
        6226 SACK options (SACK blocks) sent
        0 SACK scoreboard overflow
        0 LRO coalesced packets
            0 times LRO flow table was full
            0 collisions in LRO flow table
            0 times LRO coalesced 2 packets
            0 times LRO coalesced 3 or 4 packets
            0 times LRO coalesced 5 or more packets
        3 limited transmits done
        106 early retransmits done
        20 times cumulative ack advanced along with SACK
    udp:
        6116 datagrams received
            0 with incomplete header
            0 with bad data length field
            0 with bad checksum
            0 with no checksum
            0 checksummed in software
                0 datagrams (0 bytes) over IPv4
                0 datagrams (0 bytes) over IPv6
            41 dropped due to no socket
            2230 broadcast/multicast datagrams undelivered
            0 times multicast source filter matched
            0 dropped due to full socket buffers
            0 not for hashed pcb
            3845 delivered
        994 datagrams output
            69 checksummed in software
                0 datagrams (0 bytes) over IPv4
                69 datagrams (11318 bytes) over IPv6
    ip:
        72011 total packets received
            0 bad header checksums
            0 headers (0 bytes) checksummed in software
            0 with size smaller than minimum
            0 with data size < data length
            3522 with data size > data length
                0 packets forced to software checksum
            0 with ip length > max ip packet size
            0 with header length < data size
            0 with data length < header length
            0 with bad options
            0 with incorrect version number
            0 fragments received
                0 dropped (dup or out of space)
                0 dropped after timeout
                0 reassembled ok
            71997 packets for this host
            14 packets for unknown/unsupported protocol
            0 packets forwarded (0 packets fast forwarded)
            0 packets not forwardable
            0 packets received for unknown multicast group
            0 redirects sent
        62678 packets sent from this host
            0 packets sent with fabricated ip header
            0 output packets dropped due to no bufs, etc.
            0 output packets discarded due to no route
            0 output datagrams fragmented
            0 fragments created
            0 datagrams that can't be fragmented
            0 tunneling packets that can't find gif
            0 datagrams with bad address in header
            0 packets dropped due to no bufs for control data
            71 headers (1428 bytes) checksummed in software
    icmp:
        41 calls to icmp_error
        0 errors not generated 'cuz old message was icmp
        Output histogram:
            destination unreachable: 41
        0 messages with bad code fields
        0 messages < minimum length
        0 bad checksums
        0 messages with bad length
        0 multicast echo requests ignored
        0 multicast timestamp requests ignored
        Input histogram:
            destination unreachable: 14
        0 message responses generated
        ICMP address mask responses are disabled
    igmp:
        0 messages received
        0 messages received with too few bytes
        0 messages received with wrong TTL
        0 messages received with bad checksum
        0 V1/V2 membership queries received
        0 V3 membership queries received
        0 membership queries received with invalid field(s)
        0 general queries received
        0 group queries received
        0 group-source queries received
        0 group-source queries dropped
        0 membership reports received
        0 membership reports received with invalid field(s)
        0 membership reports received for groups to which we belong
        0 V3 reports received without Router Alert
        2 membership reports sent
    ipsec:
        0 inbound packets processed successfully
        0 inbound packets violated process security policy
        0 inbound packets with no SA available
        0 invalid inbound packets
        0 inbound packets failed due to insufficient memory
        0 inbound packets failed getting SPI
        0 inbound packets failed on AH replay check
        0 inbound packets failed on ESP replay check
        0 inbound packets considered authentic
        0 inbound packets failed on authentication
        0 outbound packets processed successfully
        0 outbound packets violated process security policy
        0 outbound packets with no SA available
        0 invalid outbound packets
        0 outbound packets failed due to insufficient memory
        0 outbound packets with no route
    arp:
        5 ARP requests sent
        9 ARP replies sent
        0 ARP announcements sent
        98 ARP requests received
        6 ARP replies received
        104 total ARP packets received
        0 ARP conflict probes sent
        0 invalid ARP resolve requests
        0 total packets dropped due to lack of memory
        3 total packets dropped due to no ARP entry
        0 total packets dropped during ARP entry removal
        12 ARP entries timed out
        0 Duplicate IPs seen
    ip6:
        793 total packets received
            0 with size smaller than minimum
            0 with data size < data length
            0 with data size > data length
                0 packets forced to software checksum
            0 with bad options
            0 with incorrect version number
            0 fragments received
                0 dropped (dup or out of space)
                0 dropped after timeout
                0 exceeded limit
                0 reassembled ok
            784 packets for this host
            0 packets forwarded
            0 packets not forwardable
            0 redirects sent
            0 multicast packets which we don't join
            0 packets whose headers are not continuous
            0 tunneling packets that can't find gif
            0 packets discarded due to too may headers
            0 forward cache hit
            0 forward cache miss
            0 packets dropped due to no bufs for control data
        126 packets sent from this host
            0 packets sent with fabricated ip header
            0 output packets dropped due to no bufs, etc.
            4145 output packets discarded due to no route
            0 output datagrams fragmented
            0 fragments created
            0 datagrams that can't be fragmented
            0 packets that violated scope rules
        Input histogram:
            TCP: 22
            UDP: 762
            ICMP6: 9
        Mbuf statistics:
            507 one mbuf
            two or more mbuf:
                lo0= 69
            217 one ext mbuf
            0 two or more ext mbuf
            0 failures of source address selection
    icmp6:
        0 calls to icmp_error
        0 errors not generated because old message was icmp error or so
        0 errors not generated because rate limitation
        Output histogram:
            router solicitation: 4
            neighbor solicitation: 4
            neighbor advertisement: 4
            MLDv2 listener report: 7
        0 messages with bad code fields
        0 messages < minimum length
        0 bad checksums
        0 messages with bad length
        Input histogram:
            neighbor solicitation: 3
            neighbor advertisement: 6
        Histogram of error messages to be generated:
            0 no route
            0 administratively prohibited
            0 beyond scope
            0 address unreachable
            0 port unreachable
            0 packet too big
            0 time exceed transit
            0 time exceed reassembly
            0 erroneous header field
            0 unrecognized next header
            0 unrecognized option
            0 redirect
            0 unknown
        0 message responses generated
        0 messages with too many ND options
        0 messages with bad ND options
        0 bad neighbor solicitation messages
        3 bad neighbor advertisement messages
        0 bad router solicitation messages
        0 bad router advertisement messages
        0 bad redirect messages
        0 path MTU changes
    ipsec6:
        0 inbound packets processed successfully
        0 inbound packets violated process security policy
        0 inbound packets with no SA available
        0 invalid inbound packets
        0 inbound packets failed due to insufficient memory
        0 inbound packets failed getting SPI
        0 inbound packets failed on AH replay check
        0 inbound packets failed on ESP replay check
        0 inbound packets considered authentic
        0 inbound packets failed on authentication
        0 outbound packets processed successfully
        0 outbound packets violated process security policy
        0 outbound packets with no SA available
        0 invalid outbound packets
        0 outbound packets failed due to insufficient memory
        0 outbound packets with no route
    rip6:
        0 messages received
        0 checksum calcurations on inbound
        0 messages with bad checksum
        0 messages dropped due to no socket
        0 multicast messages dropped due to no socket
        0 messages dropped due to full socket buffers
        0 delivered
        0 datagrams output
    pfkey:
        0 requests sent to userland
        0 bytes sent to userland
        0 messages with invalid length field
        0 messages with invalid version field
        0 messages with invalid message type field
        0 messages too short
        0 messages with memory allocation failure
        0 messages with duplicate extension
        0 messages with invalid extension type
        0 messages with invalid sa type
        0 messages with invalid address extension
        0 requests sent from userland
        0 bytes sent from userland
        0 messages toward single socket
        0 messages toward all sockets
        0 messages toward registered sockets
        0 messages with memory allocation failure

  • Extremely low message throughput with MQ 3.6

    We performed some load tests to determine maximum throughput of the Sun JMS framework when used in conditions similar to our application.
    The achieved throughput is extremely low: around 10 messages / second while we expected around 100. Could you please verify what may be the reason?
    We encountered one particular problem: the time of closing JMS producers increases much during the test. Message throughput decreases proportionally. Time periods of other phases of the JMS API usage remain constant. What can be the reason?
    detailed information:
    Our configuration used:
    server machine:
    cpu: Intel Celeron 2.8 Ghz
    ram: 1GB
    os: CentOS release 4.4 (Final), 2.6.9-42.0.3.EL
    application server: Sun Java System Application Server Enterprise Edition 8.1 2005Q2 UR2
    java version: 1.5.0_04
    we use default imqbroker configuration
    client machine:
    Intel Celeron 2Ghz
    ram: 512MB
    os: Fedora Core release 3, 2.6.12-1.1381_FC3
    java version: 1.4.02
    Test description (find attached test unit sources presenting our way of using JMS API):
    Load test is performed by running a number of concurrent test units against the JMS broker. Number of units is constant in time. Additionally, every unit test at the end of its life cycle launches another unit to keep long test time perspective.
    Each test unit is self-contained. It contains of a producer and a consumer (MessageListener). It sends messages to itself . Also each message unit sleeps for some time to simulate message processing.
    Messages are non-persistent, no durable subscriptions are used. All units are using one shared Queue for whole messaging. Message selectors are utilized to guarantee that messages are delivered to intended receiver.
    By this test we wanted to determine a maximum value of message throughput for which all messages are delivered successfully and in some reasonable time (say less than 1 minute).
    Some variations of test units are possible, e.g. JMS connections and/or sessions can be open/closed for every sent message or shared among multiple producers. But (contrary to our expectations) we encountered no visible differences in message throughput and message delivery time.
    Code of test units:
    Sender.java
    package pl.ericpol.jmstest;
    import javax.jms.Connection;
    import javax.jms.JMSException;
    import javax.jms.MessageProducer;
    import javax.jms.Session;
    public class Sender{
         private UnitTest unitTest = null;
         private Connection connection = null;
         private Session session = null;
         private MessageProducer producer = null;
         private String selector = null;
         public Sender(Connection con, Session session, MessageProducer producer, String selector, UnitTest unitTest){
         public void send() {
              try {
                   boolean closeSession = false;
                   boolean closeProducer = false;
                   if(this.session == null){
                        this.session = this.connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                        closeSession = true;
                   if(this.producer == null){
                        this.producer = this.unitTest.createProducer(this.session);
                        closeProducer = true;
                   this.producer.send(this.unitTest.createMessage(this.session, this.selector));
                   if(closeProducer){
                        this.producer.close();
                        this.producer = null;
                   if(closeSession){
                        this.session.close();
                        this.session = null;
              } catch (JMSException e) {
                   e.printStackTrace();
    Receiver.java
    package pl.ericpol.jmstest;
    import javax.jms.Connection;
    import javax.jms.ConnectionFactory;
    import javax.jms.Destination;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageConsumer;
    import javax.jms.MessageListener;
    import javax.jms.MessageProducer;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    public class Receiver extends Thread implements MessageListener{
         private Connection connection = null;
         private Session session = null;
         private Destination destination = null;
         private MessageConsumer consumer = null;
         private Connection sendConnection = null;
         private Session sendSession = null;
         private MessageProducer producer = null;
         private String qname = null;
         private String selector = null;
         private int messagesToReceive = -1;
         private int delay = -1;
         private UnitTest unitTest = null;
         private boolean active = true;
         private long[][] localStats = null;
         private Boolean monitor = new Boolean(true);
         public Receiver(ConnectionFactory cf, Connection sendConnection, Session sendSession, MessageProducer producer,
                   String code, UnitTest unit){
              try {
                   this.connection = cf.createConnection();
                   this.session = this.connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                   this.destination = this.session.createQueue(this.qname);
                   this.consumer = this.session.createConsumer(this.destination, UnitTest.KEY + " = '" + code + "'");
                   this.consumer.setMessageListener(this);
                   this.connection.start();
                   this.producer = producer;
                   this.sendSession = sendSession;
                   this.sendConnection = sendConnection;
              } catch (JMSException e) {
                   e.printStackTrace();
              } catch (NumberFormatException e1) {
                   e1.printStackTrace();
         public void run() {
              if(this.consumer == null){
              } else {
                   this.sleep(0);
                   this.close();
                   TestManager.getInstance().unitTestFinished();
         public synchronized void onMessage(Message arg0) {
              Message message = arg0;
              if(this.active){
                   if(message == null){
                   } else {
                        if(message instanceof TextMessage){
                                  this.registerDeliveryTime(this.localStats.length - this.messagesToReceive, message);
                                  this.sleep(this.delay);
                                  synchronized(this.monitor){
                                       if(--this.messagesToReceive == 0){
                                            this.unitTest.messagesReceived();
                                       } else {
                                            if(this.active){
                                                 this.send();     
                        } else {
              } else {
              if(! this.active){
                   this.notify();
         public synchronized void deactivate(){
         public int getMessagesToReceive(){
              return this.messagesToReceive;
         private void send(){
              try {
                   boolean closeSession = false;
                   boolean closeProducer = false;
                   if(this.sendSession == null){
                        this.sendSession = this.sendConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                        closeSession = true;
                   if(this.producer == null){
                        this.producer = this.unitTest.createProducer(this.sendSession);
                        closeProducer = true;
                   this.producer.send(this.unitTest.createMessage(this.sendSession, this.selector));
                   if(closeProducer){
                        this.producer.close();
                        this.producer = null;
                   if(closeSession){
                        this.sendSession.close();
                        this.sendSession = null;
              } catch (JMSException e) {
                   e.printStackTrace();
         private synchronized void sleep(int delay){
         private void registerDeliveryTime(int index, Message message){
         private synchronized void close(){
              try {
                   if(this.producer != null){
                        this.producer.close();
                   if(this.sendSession != null){
                        this.sendSession.close();
                        this.sendSession = null;
                   if(this.sendConnection != null){
                        this.sendConnection.close();
                        this.sendConnection = null;
                   if(this.consumer != null){
                        this.consumer.close();
                        this.consumer = null;
                   if(this.session != null){
                        this.session.close();
                        this.session = null;
                   if(this.connection != null){
                        this.connection.close();
                        this.connection = null;
              } catch (JMSException e) {
                   e.printStackTrace();
    TestUnit.java
    package pl.ericpol.jmstest;
    import java.util.HashMap;
    import java.util.Iterator;
    import javax.jms.Connection;
    import javax.jms.DeliveryMode;
    import javax.jms.JMSException;
    import javax.jms.MessageProducer;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    import com.sun.messaging.ConnectionFactory;
    import com.sun.messaging.QueueConnectionFactory;
    public class UnitTest extends Thread{
         public static final String KEY = "Type";
         private ConnectionFactory cf = null;
         private Connection sendConnection = null;
         private Session sendSession = null;
         private MessageProducer producer = null;
         private int delay = -1;
         private int messagesPerCall = -1;
         private int loop = -1;
         private int timeOut = -1;
         private int maxLoops = -1;
         private boolean waitingFlag = false;
         private boolean messagesReceived = false;
         public UnitTest(int loop){
              try {               
                   this.cf = new QueueConnectionFactory();
                   this.applyProps(this.cf, Properties.getInstance().getSunProps());
                   this.sendConnection = this.cf.createConnection();
                   if(sharedProducer){
                        this.sendSession = this.sendConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                        this.producer = this.createProducer(this.sendSession);
                   } else if(sharedSession){
                        this.sendSession = this.sendConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                   this.sendConnection.start();
              } catch (NumberFormatException e){
                   MyLogger.logger.error("number format exception!!");
              } catch (JMSException e) {
                   e.printStackTrace();
         public void run(){
              String selector = String.valueOf(Randomizer.getRandInt(Integer.MAX_VALUE));
              Receiver receiver = new Receiver(this.cf, this.sendConnection, this.sendSession, this.producer, selector, this);
              receiver.start();
              long startTime = System.currentTimeMillis();
              this.send(selector);
              synchronized (this) {
                   if(! this.messagesReceived){
                        this.sleep(this.timeOut);     
              long finishTime = System.currentTimeMillis();
              receiver.deactivate();
              if(++this.loop < this.maxLoops && TestManager.getInstance().getStatus()){
                   UnitTest newTest = new UnitTest(this.loop);
                   newTest.start();
              } else {
                   TestManager.getInstance().workerFinished();
         public void messagesReceived(){
         private synchronized void sleep(int delay){
         private void applyProps(ConnectionFactory cf, HashMap props){
         private void send(String selector){
              Sender sender = new Sender(this.sendConnection, this.sendSession, this.producer, selector, this);
              sender.send();
         public MessageProducer createProducer(Session session){
              MessageProducer producer = null;
              String qname = (String) Properties.getInstance().getOtherProps().get(Properties.JMS_QUEUE_NAME);
              try {
                   producer = session.createProducer(session.createQueue(qname));
                   producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
              } catch (JMSException e) {
                   e.printStackTrace();
              return producer;
         public TextMessage createMessage(Session session, String selector){
              try {
                   TextMessage message = session.createTextMessage();
                   message.setStringProperty(UnitTest.KEY, selector);
                   String messageLenAsString = (String) Properties.getInstance().getOtherProps().get(Properties.JMS_MESSAGE_LENGTH);
                   int messageLen = Integer.parseInt(messageLenAsString);
                   StringBuffer buf = new StringBuffer();
                   buf.append(selector).append("-");
                   for(int i = 0; i < messageLen; i++){
                        buf.append("x");
                   message.setText(buf.toString());
                   return message;
              } catch(NumberFormatException e){
                   MyLogger.logger.error("bad message length!!");
              } catch (JMSException e) {
                   e.printStackTrace();
              return null;
    }

    If you go here:
    http://www.sun.com/software/solaris/get.jsp
    and
    1.Check Sun Java Enterprise (or the Sun Java Application Platform Suite),
    2.Click Get Download and Media
    3. Then select Systems for windows (the bar at the top)
    I beleive you can get Message Queue 3.6 SP3 from it, by only installing the Message Queue component.
    Note: it is a large download (500 Mb for Application Platform), especially for Sun Java Enterprise...
    TE

  • [CS4/JS] Pnglib.jsx -- A PNG creator function

    After seeing Marc Autret's marvellous pngswatch script, I spent several hours creating PNGs with Photoshop, copying its hex data into Javascript compatible format, finding the relevant color bytes to change ... and all the while I was thinking, "there was an uncompressed PNG format, wasn't there?"
    That's not because I have a bad memory.
    Sure, Marc created his PNG in some other program, saved it as a compressed file, and 'only' changed the palette part in his script -- which involves delving quite deeply into the actual PNG format --, and that's a feasible way of doing the stuff he intended to: change jsut the color. But if you want to actually create a dropdown or listbox image on the fly -- say, for a line widths dropdown --, you have to be able to create an entire image a-new. And PNGs are notoriously difficult to create, because the image pixels themselves are compressed using the very advanced zlib compression.
    But (as I was thinking) ... zlib also allows a "non-compressed" format!
    With some sleuthing I found a couple of hints to get me started, and found a totally useful utility as well: pngcheck, which can take a PNG to bits and tell you what's wrong with it. So, here you have it: a lightweight PNGLIB Javascript, that can create any PNG right out of nothing!
    Any image, apart from the limitations, that is.
    Its main limitation is that you can only create 8-bit palettized PNGs with it. I see no reason to add umpteen functions to cater for the occasional 1-, 2-, or 4-bit or true color PNG, or to add total support for all the different types of transparency that PNG supports. But, hey, its main use is for icons, and you'll have to do with the limits of "just" 256 colors -- or even less than that, if you reserve one or more colors for transparency. On the plus side again, it's total real pixel alpha-level transparency we're talking about (overall that can make your graphics still better than the average '90s DOS game).
    Using the function is easy; at the bottom of the script is an example, but it boils down to:
    Create a string for the palette's colors. Each color is a triplet, in RGB order.
    Create a string for the transparency indexes. Each single entry determines the transparency of the full palette color at that index; the first entry applies to color index #0, the second to color index #1, and so on. The value [00] indicates zero opacity (fully transparent), the value [FF] full opacity. The transparency index string doesn't need to define all of your colors' transparencies; unlisted values are "normal", non-transparent, and if you only need to make color index #0 transparent, you are done right there and then. By the way, the transparency string may be omitted entirely if you don't need it.
    Create a string for the image itself -- wide x high color indexes. Make sure you fill the entire image, 'cause my function will refuse to work if this string length isn't correct.
    Then call my function: myImg = makePng (wide, high, palette, pixels [, transparency]);
    The returned string can be used immediately as a source for a ScriptUI dialog image, or -- less useful, but might come in handy -- be written to a file.
    Tips: hmm. I dunno. Don't use this function to create super-huge PNGs, I guess. The non-compression format uses a couple of checksums on its own, and they are sure to fail on very large images. But, come on, be realistic: it's not a Photoshop replacement we're talking about, it's for icons!
    And Be Kind to Your Users: it's rather overkill to include all of the data for a static PNG image, such as a logo or something. Just create that once, and include the binary data in your script! This function is designed to create PNGs on the fly, from variable rather than static data.
    Before I forget: here it is. Enjoy!
    /****** PngLib.jsx ******/
    /* A Jongware Product -- based *very* heavily, however, upon Marc Autret's pngswatch
    /* script (http://forums.adobe.com/thread/780105?tstart=0), and with further
    /* help from the pages of David "Code Monk" Jones (http://drj11.wordpress.com/2007/11/20/a-use-for-uncompressed-pngs/)
    /* and Christian Fröschlin (http://www.chrfr.de/software/midp_png.html)
    /* Any errors, of course, must have crept in while I wasn't paying attention.
    /* [Jw] 26-Jan-2010
    var makePng = (function()
         // Table of CRCs of 8-bit messages
         var CRC_256 = [0, 0x77073096, 0xee0e612c, 0x990951ba, 0x76dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0xedb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x9b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x1db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x6b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0xf00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x86d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x3b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x4db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0xd6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0xa00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x26d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x5005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0xcb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0xbdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d];
         // PNG Cyclic Redundancy Code algorithm -- http://www.w3.org/TR/PNG/#D-CRCAppendix
         var crc32s = function(/*uint[]*/buf)
              var c = 0xffffffff, i;
              for( i=0 ; i < buf.length; i++ )
                   c = CRC_256[(c ^ buf.charCodeAt(i)) & 0xff] ^ (c >>> 8);
              return (c ^ 0xffffffff);
         var header = function ()
              return "\x89PNG\x0D\x0A\x1A\x0A";
         var i2s = function (/*int32*/i)
              return String.fromCharCode(i>>>24) + String.fromCharCode(i>>>16) + String.fromCharCode(i>>>8) + String.fromCharCode(i);
         var chunk = function (/*4 Char PNG code*/chunkType, /*data*/data)
              var buf = chunkType + data;
              var crc = crc32s(buf);
              buf = i2s (data.length) + buf + i2s (crc);
              return buf;
         var adler32 = function (/*string*/buf)
              var i, a = 1, b = 0;
              for (i=0; i<buf.length; i++)
                   a += buf.charCodeAt(i); s1 %= 65521;
                   b += a; b %= 65521;
              return (b<<16)+a;
         return function(/*int*/wide, /*int*/high, /*string*/ pal, /*string*/image, /*string*/transpIndex)
              var t, bits;
              if (pal.length % 3)
                   alert ("Bad Palette length -- not a multiple of 3");
                   return null;
              if (image.length != high*wide)
                   alert ("Size error: expected "+(high*wide)+" bytes, got "+image.length);
                   return null;
              bits = '';
              for (t=0; t<high; t++)
                   bits += "\x00"+image.substr(t*wide, wide);
              t = bits.length;
              bits += i2s (adler32(bits));
              var r = header() + chunk ('IHDR', i2s (wide)+i2s(high)+"\x08\x03\x00\x00\x00");
              r += chunk ('PLTE', pal);
              if (transpIndex != null)
                   r += chunk ('tRNS', transpIndex);
              r += chunk ('IDAT', "\x78\x9c\x01"+ String.fromCharCode (t & 0xff)+String.fromCharCode((t>>>8) & 0xff)+String.fromCharCode ((~t) & 0xff)+String.fromCharCode(~(t>>>8) & 0xff)+bits);
              r += chunk ('IEND', '');
              return r;
    /* Sample usage. Remove when #including the above in _your_ script! */
    var pngPal  = "\x00\x00\x00"+"\xff\x00\x00"+"\x00\xff\x00"+"\x00\x00\xff"+"\xff\xff\x00"+"\x40\x40\x40";
    var pngData =     "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+
                        "\x00\x01\x01\x02\x02\x03\x03\x04\x04\x00"+
                        "\x00\x01\x01\x02\x02\x03\x03\x04\x04\x00"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05";
    img = makePng (10,11, pngPal, pngData, "\x40");
    var w = new Window("dialog", "Image test");
    w.add ('image', undefined, img);
    var f = new File(Folder.myDocuments+"/test-me2.png");
    if (f.open('w'))
         f.encoding = "BINARY";
         f.write (img);
         f.close();
    } else
         alert ("eh -- couldn't write test file...");
    w.show();

    Here is a more complicated (and useful ) example. (--Its actual usefulness is not as, erm, useful as I hoped, because it seems you don't have access to the built-in stroke styles! If anyone knows a work-around that, let me know ...)
    First, create a few custom Striped and/or Dashed stroke styles; then call this Javascript to see them created "live" in the drop down. Make sure you removed the sample code from the end of "pnglib.jsx", otherwise that dialog with interfere and mess up my nice program.
    #include "pnglib.jsx"
    function createStripeImg (styleIndex)
         var pngPal  = "\x00\x00\x00"+"\xff\xff\xff";
         var pngData = '';
         var x,y, ystart;
         var stripes = [];
         var i;
         for (y=0; y<app.activeDocument.stripedStrokeStyles[styleIndex].stripeArray.length; y++)
              stripes.push (Math.round (11*app.activeDocument.stripedStrokeStyles[styleIndex].stripeArray[y]/100));
         i = 0;
         for (y=0; y<11; y++)
              if (y >= stripes[i])
                   if (y <= stripes[i+1])
                        for (x=0; x<48; x++)
                             pngData += "\x00";
                        continue;
                   i += 2;
              for (x=0; x<48; x++)
                   pngData += "\x01";
         return makePng (48,11, pngPal, pngData, "\xff\x00");
    function createDashImg (styleIndex)
         var pngPal  = "\x00\x00\x00"+"\xff\xff\xff";
         var pngData = '';
         var x,y, xstart;
         var dashes = [];
         var i, len;
         len = 0;
         for (y=0; y<app.activeDocument.dashedStrokeStyles[styleIndex].dashArray.length; y++)
              len += app.activeDocument.dashedStrokeStyles[styleIndex].dashArray[y];
         xstart = 0;
         for (y=0; y<app.activeDocument.dashedStrokeStyles[styleIndex].dashArray.length; y++)
              dashes.push (xstart);
              xstart += Math.round (48*app.activeDocument.dashedStrokeStyles[styleIndex].dashArray[y]/len);
         dashes.push (47);
         i = 0;
         for (y=0; y<11; y++)
              if (y < 3 || y > 8)
                   for (x=0; x<48; x++)
                        pngData += "\x01";
              } else
                   xstart = 0;
                   for (x=0; x<48; x++)
                        if (x >= dashes[xstart])
                             if (x >= dashes[xstart+1])
                                  xstart += 2;
                             pngData += "\x00";
                        } else
                             pngData += "\x01";
         return makePng (48,11, pngPal, pngData, "\xff\x00");
    if (app.activeDocument.stripedStrokeStyles.length+app.activeDocument.dashedStrokeStyles.length < 1)
         alert ("This example needs a few custom stripe or dash stroke styles to play with");
         exit (0);
    var w = new Window("dialog", "Select a stripe type");
    var ddl = w.add("dropdownlist");
    for( i=0; i < app.activeDocument.stripedStrokeStyles.length; i++)
         (ddl.add('item', " "+app.activeDocument.stripedStrokeStyles[i].name)).image = createStripeImg (i);
    for( i=0; i < app.activeDocument.dashedStrokeStyles.length; i++)
         (ddl.add('item', " "+app.activeDocument.dashedStrokeStyles[i].name)).image = createDashImg (i);
    ddl.selection = 0;
    g = w.add ("group");
    g.orientation = 'row';
    g.add ("button", undefined, "OK");
    g.add ("button", undefined, "Cancel");
    w.show();

  • Error -36 when trying to delete from external HD

    Hi there,
    As obviously many people before me, I've just experienced the Error Code -36 problem.
    I'm using an external WD 2tb USB hard drive, formatted to NTFS. It has always worked perfectly using Paragon NTFS (got 10.0.2 installed atm). Today I tried deleting several files in completely different folders and it says the drive can't be read or written with said error code -36.
    Here's what I've tried:
    - ejecting the drive, completely disconnecting it from power and re-connecting it
    - rebooting the Mac
    - re-installing Paragon NTFS
    - connecting the drive directly (I usually connect it through a USB hub)
    - dot_clean on the entire drive and every folder and sub-folder
    Obviously, nothing has worked out...
    I've checked the permissions and it says I should be able to read and write. Then I've tried deleting from any possible folder on that hard drive - same problem - and on the Mac HD itself - works there. I can even copy/move files to that hard drive, access the files on the disc (e.g. pictures, video files) and copy/move from the disk to the Mac HD.
    I couldn't repair the disk in Disk Utility either. First it didn’t even verify it (stopped with an error) and then it told me to repair it (brought loads of “Attribute 0x80 has either a cross-link or a bad allocation length” and “File xy does not contain data attribute”). But then after a while it says “Disk Utility stopped repairing. Disk Utility can’t repair this disk” and tells me to reformat it.
    And here goes the weird part: I've tried deleting the exact same files using another Mac and it worked and now it even works with my Mac again.
    While the problem is solved (for now), I'd just love to know what actually was the problem in the first place (yes, I am a weirdo). So, if anyone has an idea, please let me know :)

    Ok sorry I didn't read your whole first post. I have no idea as to why.
    If you have a Windows PC just delete file on that NTFS formatted drive from there.
    Check in the Paragon forums for a answer to the question why you can't delete from OS X.
    That would be the place to start.
    MissKillALot wrote:
    I know that obviously. That's why I wrote that I'm using Paragon NTFS and also that I was still able to actually move files onto the disk and from the disk to the Mac HD, but just wasn't able to delete anything.

  • Gc cr block lost

    Dear all
    We hava an 10.2.0.4 RAC running on AIX 6.1, we found a lot “gc cr block lost” in awr report.
    How to resolve this problem?
    Event Waits Time (s) (ms) Time Wait Class
    log file sync 171,333 288 2 66.1 Commit
    log file parallel write 170,780 240 1 55.2 System I/O
    CPU time 229 52.7
    gc cr block lost 61 46 755 10.6 Cluster
    db file parallel write 45,676 31 1 7.2 System I/O
    flowing is result of netstat -s
    #netstat -s
    icmp:
         1501240 calls to icmp_error
         0 errors not generated because old message was icmp
         Output histogram:
              echo reply: 48022
              destination unreachable: 1478355
              echo: 3672830
         0 messages with bad code fields
         0 messages < minimum length
         0 bad checksums
         0 messages with bad length
         Input histogram:
              echo reply: 3671367
              destination unreachable: 1586471
              echo: 48049
         48022 message responses generated
    igmp:
         0 messages received
         0 messages received with too few bytes
         0 messages received with bad checksum
         0 membership queries received
         0 membership queries received with invalid field(s)
         0 membership reports received
         0 membership reports received with invalid field(s)
         0 membership reports received for groups to which we belong
         8 membership reports sent
    tcp:
         74915651 packets sent
              57060778 data packets (138705942737 bytes)
              33462 data packets (37970884 bytes) retransmitted
              5375289 ack-only packets (4239002 delayed)
              0 URG only packets
              5 window probe packets
              11436565 window update packets
              2019104 control packets
              5526504 large sends
              132996311078 bytes sent using largesend
              2085120 bytes is the biggest largesend
         107952244 packets received
              61900612 acks (for 138706680574 bytes)
              418658 duplicate acks
              0 acks for unsent data
              89624245 packets (70001950782 bytes) received in-sequence
              4743 completely duplicate packets (818002 bytes)
              0 old duplicate packets
              17 packets with some dup. data (4248 bytes duped)
              302994 out-of-order packets (30842613 bytes)
              32 packets (32 bytes) of data after window
              32 window probes
              286783 window update packets
              6552 packets received after close
              0 packets with bad hardware assisted checksum
              0 discarded for bad checksums
              0 discarded for bad header offset fields
              0 discarded because packet too short
              492 discarded by listeners
              0 discarded due to listener's queue full
              11878766 ack packet headers correctly predicted
              44728305 data packet headers correctly predicted
         322438 connection requests
         278463 connection accepts
         556834 connections established (including accepts)
         604193 connections closed (including 2346 drops)
         0 connections with ECN capability
         0 times responded to ECN
         36 embryonic connections dropped
         62169023 segments updated rtt (of 57866592 attempts)
         0 segments with congestion window reduced bit set
         0 segments with congestion experienced bit set
         0 resends due to path MTU discovery
         44036 path MTU discovery terminations due to retransmits
         156798 retransmit timeouts
              0 connections dropped by rexmit timeout
         9058 fast retransmits
              6049 when congestion window less than 4 segments
         5 newreno retransmits
         156 times avoided false fast retransmits
         0 persist timeouts
              0 connections dropped due to persist timeout
         2859 keepalive timeouts
              0 keepalive probes sent
              0 connections dropped by keepalive
         0 times SACK blocks array is extended
         0 times SACK holes array is extended
         0 packets dropped due to memory allocation failure
         1 connection in timewait reused
         0 delayed ACKs for SYN
         0 delayed ACKs for FIN
         0 send_and_disconnects
         0 spliced connections
         0 spliced connections closed
         0 spliced connections reset
         0 spliced connections timeout
         0 spliced connections persist timeout
         0 spliced connections keepalive timeout
         0 TCP checksum offload disabled during retransmit
         0 Connections dropped due to bad ACKs
         0 Connections dropped due to duplicate SYN packets
         0 fastpath loopback connections
         0 fastpath loopback sent packets (0 bytes)
         0 fastpath loopback received packets (0 bytes)
    udp:
         147486199 datagrams received
         0 incomplete headers
         0 bad data length fields
         0 bad checksums
         1562482 dropped due to no socket
         5229040 broadcast/multicast datagrams dropped due to no socket
         0 socket buffer overflows
         140694677 delivered
         144251657 datagrams output
    ip:
         272497723 total packets received
         0 bad header checksums
         0 with size smaller than minimum
         0 with data size < data length
         0 with header length < data size
         0 with data length < header length
         0 with bad options
         0 with incorrect version number
         14418667 fragments received
         0 fragments dropped (dup or out of space)
         254148 fragments dropped after timeout
         2750080 packets reassembled ok
         255570679 packets for this host
         5112394 packets for unknown/unsupported protocol
         0 packets forwarded
         23568 packets not forwardable
         0 redirects sent
         224311858 packets sent from this host
         0 packets sent with fabricated ip header
         0 output packets dropped due to no bufs, etc.
         0 output packets discarded due to no route
         4173773 output datagrams fragmented
         21581265 fragments created
         0 datagrams that can't be fragmented
         0 IP Multicast packets dropped due to no receiver
         0 successful path MTU discovery cycles
         0 path MTU rediscovery cycles attempted
         0 path MTU discovery no-response estimates
         0 path MTU discovery response timeouts
         0 path MTU discovery decreases detected
         0 path MTU discovery packets sent
         0 path MTU discovery memory allocation failures
         0 ipintrq overflows
         0 with illegal source
         0 packets processed by threads
         0 packets dropped by threads
         0 packets dropped due to the full socket receive buffer
         0 dead gateway detection packets sent
         0 dead gateway detection packet allocation failures
         0 dead gateway detection gateway allocation failures
         0 incoming packets dropped due to MLS filters
         0 packets not sent due to MLS filters
    ipv6:
         122495 total packets received
         Input histogram:
              TCP: 14
              UDP: 61243
              ICMP v6: 61238
         0 with size smaller than minimum
         0 with data size < data length
         0 with incorrect version number
         0 with illegal source
         0 input packets without enough memory
         0 fragments received
         0 fragments dropped (dup or out of space)
         0 fragments dropped after timeout
         0 packets reassembled ok
         122495 packets for this host
         0 packets for unknown/unsupported protocol
         0 packets forwarded
         0 packets not forwardable
         0 too big packets not forwarded
         120071 packets sent from this host
         0 packets sent with fabricated ipv6 header
         0 output packets dropped due to no bufs
         0 output packets without enough memory
         7858 output packets discarded due to no route
         0 output datagrams fragmented
         0 fragments created
         0 packets dropped due to full socket receive buffer
         0 packets not delivered due to bad raw IPv6 checksum
         0 incoming packets dropped due to MLS filters
         0 packets not sent due to MLS filters
    icmpv6:
         61242 calls to icmp6_error
         0 errors not generated because old message was icmpv6
         Output histogram:
              unreachable: 61238
              packets too big: 0
              time exceeded: 0
              parameter problems: 0
              redirects: 0
              echo requests: 0
              echo replies: 0
              group queries: 0
              group reports: 0
              group terminations: 0
              router solicitations: 0
              router advertisements: 0
              neighbor solicitations: 0
              neighbor advertisements: 0
         0 messages with bad code fields
         0 messages < minimum length
         0 bad checksums
         0 messages with bad length
         Input histogram:
              unreachable: 61238
              packets too big: 0
              time exceeded: 0
              parameter problems: 0
              echo requests: 0
              echo replies: 0
              group queries: 0
                   bad group queries: 0
              group reports: 0
                   bad group reports: 0
                   our groups' reports: 0
              group terminations: 0
              bad group terminations: 0
              router solicitations: 0
              bad router solicitations: 0
              router advertisements: 0
              bad router advertisements: 0
              neighbor solicitations: 0
              bad neighbor solicitations: 0
              neighbor advertisements: 0
              bad neighbor advertisements: 0
              redirects: 0
              bad redirects: 0
              mobility calls when not started: 0
              home agent address discovery requests: 0
              bad home agent address discovery requests: 0
              bad home agent address discovery replys: 0
              bad home agent address discovery replys: 0
              prefix solicitations: 0
              bad prefix solicitations: 0
              prefix advertisements: 0
              bad prefix advertisements: 0
         0 message responses generated

    Hi,
    Troubleshooting gc block lost and Poor Network Performance in a RAC Environment (Doc ID 563566.1)
    Regards
    Sebastian

  • Ugly issue with my Magic Mouse

    I have a Magic Mouse that has work essentially flawlessly for quite a while.
    I run VMware Fusion so I can run Windows XP and the Magic Mouse worked great there as well. Tonight I was trying something and I told VMware Fusion to connect the Apple Bluetooth USB Host Controller to Windows XP. Well, at this point my Magic Mouse connectivity stopped and man did my troubles begin.
    I quickly told Vmware to disconnect the USB Host Controller from Windows but this hasn't fixed my new issues with the Magic Mouse. At this point my Magic Mouse is barely functional.
    The symptoms are this:
    - If I disconnect the mouse using the tool bar blue tooth indicator and then reconnect it, the blue tooth indicator says the mouse is connected but it doesn't work. I have to physically power down the mouse and back on before it work.
    - When it does kinda work, the mouse at times "jumps" across the screen so I have to be very careful how quickly I move it at times.
    - The multi-touch scroll feature no longer works. It worked in Windows XP as well ... not any more.
    - When I click on the bluetooth icon and try to bring up the Mouse Properties it takes QUITE a long time.
    When I try to get the system to "discover" the mouse again, it can take quite a long time and the following shows up in the Console App:
    10/7/10 2:32:58 AM kernel [0e65d000][BNBMouseDevice::init][54] init is complete
    10/7/10 2:32:59 AM kernel [0e65d000][BNBMouseDevice::handleStart][54] Done
    10/7/10 2:32:59 AM kernel [10ee2880][AppleMultitouchDevice::start] entered
    10/7/10 2:32:59 AM kernel [0f5f3900][AppleMultitouchHIDEventDriver::start] entered
    10/7/10 2:33:02 AM kernel [BNBMouseDevice][waitForData][d8-30-62-38-b8-ff] Timeout waiting for data
    10/7/10 2:33:02 AM kernel [BNBMouseDevice][getExtendedReport] getReport returned error e00002d6
    10/7/10 2:33:02 AM kernel [BNBMouseDevice][updateBatteryLevel] Couldn't get battery percentage from device
    10/7/10 2:33:06 AM kernel [BNBMouseDevice][waitForData][d8-30-62-38-b8-ff] Timeout waiting for data
    10/7/10 2:33:06 AM kernel [0e65d000][BNBMouseDevice::_simpleGetReport][54] ERROR: getReport returned error 0xe00002d6
    10/7/10 2:33:06 AM kernel [0e65d000][BNBMouseDevice::_getMultitouchReport][54] Bad argument: *length is 0
    10/7/10 2:33:06 AM kernel [10ee2880][AppleMultitouchDevice::_deviceGetReportWithLookUp] ERROR: getMultitouchReport returned error 0xe00002c2
    10/7/10 2:33:09 AM kernel [BNBMouseDevice][waitForData][d8-30-62-38-b8-ff] Timeout waiting for data
    10/7/10 2:33:09 AM kernel [BNBMouseDevice][getExtendedReport] getReport returned error e00002d6
    10/7/10 2:33:09 AM kernel [BNBMouseDevice][updateBatteryLevel] Couldn't get battery percentage from device
    10/7/10 2:33:13 AM kernel [BNBMouseDevice][waitForData][d8-30-62-38-b8-ff] Timeout waiting for data
    10/7/10 2:33:13 AM kernel [0e65d000][BNBMouseDevice::_simpleGetReport][54] ERROR: getReport returned error 0xe00002d6
    10/7/10 2:33:13 AM kernel [0e65d000][BNBMouseDevice::_getMultitouchReport][54] Bad argument: *length is 0
    10/7/10 2:33:13 AM kernel [10ee2880][AppleMultitouchDevice::_deviceGetReportWithLookUp] ERROR: getMultitouchReport returned error 0xe00002c2
    10/7/10 2:33:17 AM kernel [BNBMouseDevice][waitForData][d8-30-62-38-b8-ff] Timeout waiting for data
    10/7/10 2:33:17 AM kernel [0e65d000][BNBMouseDevice::_simpleGetReport][54] ERROR: getReport returned error 0xe00002d6
    <snip>
    I want my Magic Mouse back !!!!
    Any idea anyone ?
    P.S. I'm sssssoooo freak'n mad to VMware right now.

    Sounds to me like you have one of several issues going on there.
    You may have a lot of interference in the same frequency as your bluetooth device.
    Or - you may have a bad bluetooth transceiver in either your mouse or your computer.
    Take the mouse to another computer with bluetooth on it and sync it to that - if it works fine then your computer or your environment is the culprit there ( um this assumes that you took your mouse to another location, say your friends house where the interference threshold is bound to be different than at your house), and you should then take your computer out of the house for the day, and see how the mouse works away from home.
    If the mouse is bad - you will have issues if you take it to another location - replace it - check warranty
    If you think is is your house / place you have your computer, that may contain an the interference that messes with your mouse:
    Try turning everything off you can think of in your house / office, and see if it gets better. Also - a big one - make sure that your computer and mouse are not to close to any speakers / etc, as they do have a magnetic field that could cause a mess with bluetooth mice. (rare but it happens)
    As you can see in your error message:
    10/7/10 2:32:59 AM kernel 0f5f3900AppleMultitouchHIDEventDriver::start entered
    10/7/10 2:33:02 AM kernel BNBMouseDevicewaitForDatad8-30-62-38-b8-ff Timeout waiting for data
    10/7/10 2:33:02 AM kernel BNBMouseDevicegetExtendedReport getReport returned error e00002d6
    it made a connection - then timed out -
    Also check the silly things - like are the batteries dead?
    Last thing I can think of - is to delete the mouse all together, then re-discover it -
    Um - after replacing the batteries of coursse - just to be SURE.
    Then you can turn everything back on in vmware etc - you may also want to make sure that you have the latest version and additions etc installed.
    Good luck!

  • Git Protocol Usage With TFS 2013

    In our organization we have been using TFS for some time. Recently we have had a set of developers building internal tools to be consumed by various parts of our engineering teams to help with our developing or product. These developers used a local Git
    server for their version control. At the time our version of TFS was 2012 which did not support Git repositories.
    We upgraded our TFS servers to 2013 and created a git based team project. All source was successfully moved and it seemed as if everything was good. However, the team has come up against an issue with using Git as TFS provides it.
    With their old server the team was able to use npm, nodejs package manager, to have our other engineers install their tools. The instructions for installing their tool would be:
    npm install git://gitorious.corp.local/project/repo.git
    When trying this command with TFS:
    npm install git://tfs2013.corp.local:8080/tfs/DefaultCollection/TeamProject/_git/Repo
    we have an error:
    npm ERR! git clone git://tfs2013.corp.local:8080/tfs/DefaultCollection/TeamProject/_git/Repo Cloning into bare repository 'C:\npm-cache\_git-remotes\git-tfs-8080-tfs-DefaultCollection-Project-git-repo-fbbf0c4b'...
    npm ERR! git clone git://tfs2013.corp.local:8080/tfs/DefaultCollection/TeamProject/_git/Repo
    npm ERR! git clone git://tfs2013.corp.local:8080/tfs/DefaultCollection/TeamProject/_git/Repo fatal: protocol error: bad line length character: HTTP
    npm ERR! Windows_NT 6.1.7601
    npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "git://tfs2013.corp.local:8080/tfs/DefaultCollection/TeamProject/_git/Repo"
    npm ERR! node v0.10.35
    npm ERR! npm v2.4.1
    npm ERR! code 128
    npm ERR! Command failed: fatal: protocol error: bad line length character: HTTP
    npm ERR!
    npm ERR!
    npm ERR! If you need help, you may report this error at:
    npm ERR! <http://github.com/npm/npm/issues>
    npm ERR! Please include the following file with any support request:
    npm ERR! C:\Source\git\sumtotal-module\npm-debug.log
    If I startup Wireshark and trap the response from TFS I see this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
    <HTML><HEAD><TITLE>Bad Request</TITLE>
    <META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
    <BODY><h2>Bad Request - Invalid URL</h2>
    <hr><p>HTTP Error 400. The request URL is invalid.</p>
    </BODY></HTML>
    Clone, fetch, pull, and push all work with the HTTP protocol and fail if they use git://.
    Is there a way to setup the git protocol with TFS?

    @John, I was working on a reply to you when @Jesse replied. I think my reply to him will cover what I was going to answer.
    @Jesse,
    I think I remember reading somewhere that git:// is SSH.
    We're developing a tool in NodeJS that is consumed by our other engineering teams. When on the previous internal gitorious host we used the git:// protocol for regular git operations (clone, fetch, pull, push) and for using npm (node package manager).
    After I moved the repository to TFS by doing a bare clone and mirror'd push the engineers working on the tools changed their remotes to point at the new TFS repo. The URL that TFS gave us was http. So to answer your question we are using the http protocol
    for regular dev.
    The problems comes from the consumption side. NPM defaults to using the npmjs.com feed for modules. However, npm allows the use of tarball and git repositories from which to install a module. With the gitorious host the consumers of the tools could simply
    type:
    npm install git://gitorious.corp.local/Project/repo@tag
    This would cause NPM to install the version at the tag of the module at that git repository.
    In my OP I stated that this gives an error. I forgot to post that switching git for http also causes an error:
    npm ERR! fetch failed http://tfs2013.corp.local:8080/tfs/DefaultCollection/TeamProject/_git/Repo
    npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 401
    npm ERR! fetch failed http://tfs2013.corp.local:8080/tfs/DefaultCollection/TeamProject/_git/Repo
    npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 401
    Now I did a wireshark trace to get the response to the command with git:// but until now didn't think of doing it for this case. I also let it slip that a 401 code is unauthorized access:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <title>401 - Unauthorized: Access is denied due to invalid credentials.</title>
    <style type="text/css">
    <!--
    body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
    fieldset{padding:0 15px 10px 15px;}
    h1{font-size:2.4em;margin:0;color:#FFF;}
    h2{font-size:1.7em;margin:0;color:#CC0000;}
    h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
    #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
    background-color:#555555;}
    #content{margin:0 0 0 2%;;}
    .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;;}
    -->
    </style>
    </head>
    <body>
    <div id="header"><h1>Server Error</h1></div>
    <div id="content">
    <div class="content-container"><fieldset>
    <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>
    <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
    </fieldset></div>
    </div>
    </body>
    </html>
    I suppose now the question becomes, is there any way to specify the credentials through this request? I'm going to reach out to the npm project to see why it wouldn't be passing me back a challenge or a sending my windows creds.

  • Http keep-alive with SOAP webservices

    Just had an interesting experience with a web service setup behind UAG...under low load conditions all SOAP responses were coming across with no issue...once a high load was introduced by the client app the behavior changed where an initial request was
    processed and subsequent requests were rejected by UAG with a Bad Parameter : Length message...but high load (relatively) on a web browser ran without issue...the client app had to wait ~100 seconds before the next request would process correctly...browser
    works - app has problems...turns out it was the keep-alive "default" settings on both the client app server, as well as my web service in IIS...so -apparently UAG thought the 2nd (and subsequent < 100 seconds) were a parameter of the first request...and
    was way too long and got rejected...I unchecked the keep-alive enabled box on the http response header (set common headers) and all is fine now! Apparently the browsers were closing the connection with each page load and the service responded appropriately
    - so it looked like all was well. Using SOAP UI revealed the error...but it also had it's connection set to keep-alive...once that was disabled in SOAP UI all requests ran correctly...that's when I poked around and found that response header setting.

    ejp wrote:
    and also an incorrect implementation of the timeout period. This code will still wait forever if no data arrives.You're right... actually I didn't mean to put that while loop there! What I meant was simply
    if (!reader.ready())
        wait(keepAliveTimeout);
    if (!reader.ready())
        break mainLoop;
    // If we get here there is a new request to read...and I agree that it's ugly, that's why I'm asking you guys for help!
    setSoTimeout() is of course a way to go... didn't think of that although I have kind of already added it to my code but with a different timeout. Thanks!
    Last question then is:
    does reader.readLine() block like reader.read(), or do I have to use the latter?
    I would test for myself I could, but at the moment I can't...

  • Can someone help with this getPos method of aList class ?

    public class AList<T> implements ListInterface<T>
    private T[] entries; // array of list entries
    private int length; // current number of entries in list
    private static final int MAX_SIZE = 50; // max length of list
    public AList()
    this(MAX_SIZE); // call next constructor
    } // end default constructor
    public AList(int maxSize)
    length = 0;
    entries = (T[]) new Object[maxSize]; // necessary cast to generic type
    } // end constructor
         public boolean add(T newEntry)
              boolean isSuccessful = true;
              if (!isFull())
         // Assertion: Length of list < length of array
         assert length < entries.length;
         // position of new entry will be after last entry in list,
         // that is, at position length+1; corresponding array index is
         // 1 less than this position, so index is length
         entries[length] = newEntry;
                   length++;
              else
                   isSuccessful = false;
              return isSuccessful;
         } // end add
         public boolean add(int newPosition, T newEntry)
         boolean isSuccessful = true;
         if (!isFull() && (newPosition >= 1) && (newPosition <= length + 1))
         makeRoom(newPosition);
         entries[newPosition - 1] = newEntry;
         length++;
         else
         isSuccessful = false;
         return isSuccessful;
         } // end add
         public T remove(int givenPosition)
         T result = null; // return value
         if ((givenPosition >= 1) && (givenPosition <= length))
         assert !isEmpty();     
    result = entries[givenPosition - 1]; // get entry to be removed
         // move subsequent entries toward entry to be removed,
         // unless it is last in list
         if (givenPosition < length)
         removeGap(givenPosition);
         length--;
         } // end if
         return result; // return reference to removed entry, or
    // null if either list is empty or givenPosition
    // is invalid
    } // end remove
         public T getEntry(int givenPosition)
         T result = null; // result to return
         if ((givenPosition >= 1) && (givenPosition <= length))
         assert !isEmpty();
              result = entries[givenPosition - 1];
         } // end if
         return result;
         } // end getEntry
    public int getPos(T anItem)
    }

    I would recommend using a for loop to compare anItem to each member of the array. If you get a match, return the index.

Maybe you are looking for

  • How to send a large email

    I am trying to email a newsletter as an attachment.  The newsletter has several photos in it, and my verizon email says that it is too big to send. I have tried to compress the file, zipping it, but it doesn't reduce the size very much. Am I doing so

  • Kik messenger not available. why? and why can't we...

    I've been using my Nokia Lumia 620 since like July'13. I faced quite alot of problems. But after the update, there arent so many problems now. i searched for kik messenger in the store. No results were shown. Whereas one of my friend, who has Lumia 5

  • How to set a different output format as part of the Concurrent request

    We are on EBS 11.5.10.2 and we are also using XML Publisher 5.6.2. We have few Excel output reports. The issue we are having is that when we defien these reports as a concurrent program, the options for output always defaults to PDF. The end user has

  • Vendor Return Scenario  and movement type

    Hi , My Client is creating a third party Po for  Netwok and Project System .(ie.vendor is Delivering material to Customer Directly ) . Now Some material is retrun back customer .and my client want to return this material to vendor . Sales Return Proc

  • How do I get dates to appear on photos?

    Can anyone tell me how to get dates to appear on photos so that when you print them it shows the date in the bottom corner?