UnmarshalException for large byte array :: Weblogic 8.1 SP2

Hi,
1) We have a application running on Weblogic 8.1SP2.
2) Our scenario consist of Client code which reads a input file via Stream and converts it to a byte array before sending it to the Server.
When the server side code calls the Remote Bean (with byte array as an argument) it throws this exception :
"java.rmi.UnmarshalException: Software caused connection abort: socket write error"
Intermittently also got this error :: "weblogic.rjvm.PeerGoneException: ; nested exception is: java.io.EOFException"
3) This scenario works absolutely fine if the said Input File is of a smaller size.
4) I have also set the following params in config.xml <server .../> tag, but all in vain:
     CompleteMessageTimeout="480" also tried with "0"
     MaxMessageSize="2000000000"
     NativeIOEnabled="true"
Also tried with :
     MaxHTTPMessageSize="2000000000" & MaxT3MessageSize="2000000000"
Below is the exception trace:
java.rmi.UnmarshalException: Software caused connection abort: socket write error; nested exception is: java.net.SocketException: Software caused connection abort: socket write error
java.rmi.UnmarshalException: Software caused connection abort: socket write error; nested exception is: java.net.SocketException: Software caused connection abort: socket write error at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:297)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
Caused by: java.net.SocketException: Software caused connection abort: socket write error
     at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
     ... 6 more
Caused by: java.net.SocketException: Software caused connection abort: socket write error
     at java.net.SocketOutputStream.socketWrite0(Native Method)
     at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
     at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
     at weblogic.socket.SocketMuxer.write(SocketMuxer.java:721)
     at weblogic.rjvm.t3.T3JVMConnection.sendMsg(T3JVMConnection.java:723)
     at weblogic.rjvm.MsgAbbrevJVMConnection.sendOutMsg(MsgAbbrevJVMConnection.java:276)
     at weblogic.rjvm.MsgAbbrevJVMConnection.sendMsg(MsgAbbrevJVMConnection.java:164)
     at weblogic.rjvm.ConnectionManager.sendMsg(ConnectionManager.java:549)
     at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:722)
     at weblogic.rjvm.MsgAbbrevOutputStream.flushAndSendRaw(MsgAbbrevOutputStream.java:292)
     at weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:300)
     at weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:322)
     at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:103)
     ... 7 more
Any thoughts would be helpful?
Thanks,
Khyati

Hi,
1) We have a application running on Weblogic 8.1SP2.
2) Our scenario consist of Client code which reads a input file via Stream and converts it to a byte array before sending it to the Server.
When the server side code calls the Remote Bean (with byte array as an argument) it throws this exception :
"java.rmi.UnmarshalException: Software caused connection abort: socket write error"
Intermittently also got this error :: "weblogic.rjvm.PeerGoneException: ; nested exception is: java.io.EOFException"
3) This scenario works absolutely fine if the said Input File is of a smaller size.
4) I have also set the following params in config.xml <server .../> tag, but all in vain:
     CompleteMessageTimeout="480" also tried with "0"
     MaxMessageSize="2000000000"
     NativeIOEnabled="true"
Also tried with :
     MaxHTTPMessageSize="2000000000" & MaxT3MessageSize="2000000000"
Below is the exception trace:
java.rmi.UnmarshalException: Software caused connection abort: socket write error; nested exception is: java.net.SocketException: Software caused connection abort: socket write error
java.rmi.UnmarshalException: Software caused connection abort: socket write error; nested exception is: java.net.SocketException: Software caused connection abort: socket write error at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:297)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
Caused by: java.net.SocketException: Software caused connection abort: socket write error
     at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
     at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
     ... 6 more
Caused by: java.net.SocketException: Software caused connection abort: socket write error
     at java.net.SocketOutputStream.socketWrite0(Native Method)
     at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
     at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
     at weblogic.socket.SocketMuxer.write(SocketMuxer.java:721)
     at weblogic.rjvm.t3.T3JVMConnection.sendMsg(T3JVMConnection.java:723)
     at weblogic.rjvm.MsgAbbrevJVMConnection.sendOutMsg(MsgAbbrevJVMConnection.java:276)
     at weblogic.rjvm.MsgAbbrevJVMConnection.sendMsg(MsgAbbrevJVMConnection.java:164)
     at weblogic.rjvm.ConnectionManager.sendMsg(ConnectionManager.java:549)
     at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:722)
     at weblogic.rjvm.MsgAbbrevOutputStream.flushAndSendRaw(MsgAbbrevOutputStream.java:292)
     at weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:300)
     at weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:322)
     at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:103)
     ... 7 more
Any thoughts would be helpful?
Thanks,
Khyati

Similar Messages

  • Need to send and receive larger byte array

    I have a small WCF service, self hosted in a console app. On the same computer I have a client application. Both are running in the debugger in VS2008. The proxy code and the config file were generatred from the running service using svcutil.
    In one of the service calls, the service reads a pdf file and sends the contents as a byte array. The client receives the byte array, saves it as a pdf file, and displays it.
    Everything is fine for all other kinds of calls, and this one works fine also as long as the file is small (say 14K). But if the file is larger (say 84K), the client crashes (VHOST has stopped working).
    Is there some kind of setting that will allow me to send and receive larger byte arrays (> 100 K)?
    Thanks,
    Jon Jacobs
    In transmission, subatomic particles managed by professionals.
    No innocent electrons were harmed.

    Hi Jon,
    You'll want something like this to increase the message size quotas:
    <bindings>
    <basicHttpBinding>
    <binding name="basicHttp" allowCookies="true"
    maxReceivedMessageSize="20000000"
    maxBufferSize="20000000"
    maxBufferPoolSize="20000000">
    <readerQuotas maxDepth="32"
    maxArrayLength="200000000"
    maxStringContentLength="200000000"/>
    </binding>
    </basicHttpBinding>
    </bindings>
    The justification for the values is simple, they are sufficiently large to accommodate most messages. You can tune that number to fit your needs. The low default value is basically there to prevent DOS type attacks. Making it 20000000 would allow for a distributed
    DOS attack to be effective, the default size of 64k would require a very large number of clients to overpower most servers these days.
    If you're still getting this error message while using the WCF Test Client, it's because the client has a separate MaxBufferSize setting.
    To correct the issue:
    Right-Click on the Config File node at the bottom of the tree
    Select Edit with SvcConfigEditor
    A list of editable settings will appear, including MaxBufferSize.
    Note: Auto-generated proxy clients also set MaxBufferSize to 65536 by default.
    Let me know if this helped.
    Regards,
    Raghu

  • InsufficientMemoryException while sending large byte array in WCF Service callback

    Hi
    I have a datacontract with a large byte array that is passed by the WCF Service back to the client using a callback contract.
    Until the byte array size remains below 25-30 MB, it is passed OK, but as soon as it exceeds that, an InsufficientMemoryException is thrown on the service side. I have set the max message sizes at 100 MB and using MTOM Encoder.
    I am using WSDualHTTPBinding with sessions and message security - hence streaming is not an option. I know chunking channels are an option, but I want to try to tune the service and client to maximize the byte array size which can be sent over a normal channel.
    Kindly advise how to tune settings to get to around 100 MB byte array size.
    Binding section of web.config is given below. Same settings for sizes are used on client.
    Thanks
    Abhishek
     <wsDualHttpBinding>
            <binding name="WSHttpBinding_IService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
    transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="100000000" maxReceivedMessageSize="100000000" messageEncoding="Mtom" textEncoding="utf-8" useDefaultWebProxy="true">
              <readerQuotas maxArrayLength="100000000"  />
              <security mode="Message">
                <message clientCredentialType="Certificate" algorithmSuite="Default"  />
              </security>
            </binding>
          </wsDualHttpBinding>

    Hi abhisinghal21,
    >>InsufficientMemoryException while sending large byte array in WCF Service callback
    First please try to increase the timeout value in the both client and service side to see if it works:
    closeTimeout="00:10:00" openTimeout="00:10:00"
    receiveTimeout="00:10:00" sendTimeout="00:10:00"
    Then since you do not want to the use the Chunking option to help you, maybe you try to change the wsDualHttpBinding to use the binding which supports the streaming mode and supports callback.
    In streaming transfer mode, the receiver can begin to process the message before it is completely delivered. And the streaming mode is useful when the information that is passed is lengthy and can be processed serially. Streaming mode is also useful when the
    message is too large to be entirely buffered. So it will be better for you to use the streamed mode.
    For more information, please try to check:
    #How to: Enable Streaming:
    http://msdn.microsoft.com/en-us/library/ms789010(v=vs.110).aspx .
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Using the jprogress bar for file byte array downloads

    I am currently using a byte array to send files back and forth between computers. To show a file is transferring i change the mouse to the hour glass but would like to use the jprogressbar.
    To send the file i read the file from one computer into a byte array, and then send it through an objectoutputstream. I am not sure how the file is sent or received though. What can i use to judge the length of time it takes to get one file from one computer to the other? In doing a debug, it looks like the oos sends the file to the other computer, and it is basically like an uploading process. is there a way for me to judge or tell how much of the file that is being uploaded is left?
    Thanks in advance

    If i know the file size how can i then check the progression? I would also like to use an progress bar on the upload of a file to the other computer, and for the download of the byte array to the other computer i could first give it the file size. if then what can i use to base my progression off of?
    i looked at this and it says i am not able to do it, but thought there might have been improvements in the jdk since then, and i might not be seeing them
    http://forum.java.sun.com/thread.jspa?threadID=357217&messageID=1490887
    Thanks

  • Ext2 or ext3 for large RAID array

    I'm just in the process of creating a 10TB array of 5 x 2TB drives.
    I've been burned too many times by EXT4 so it's out for the forseable future.
    My concern is the crazy amount of time required to stabalize the file system when periodic checks are mandated.  I'm using ext3 right now on a 7.5TB file system and have tuned the auto checking down to 2 years and 100 mounts.  It's not the best situation but when the system goes down due to over heating (filter plugs every few months), I turn it on, and it goes into a 2 day recovery procedure during the boot process, it's outside the envelope of acceptibility.
    Last edited by TomB17 (2010-06-26 02:32:55)

    TomB17 wrote:
    I appreciate the comments, gentlemen.
    graysky wrote:Not what you asked but can you describe how you have been burnt by ext4?
    I've been burned by the 0 byte file bug.  The files were all there but some of them went to 0 bytes.
    I did that on a backup array about 6~8 months ago.  Thinking, "It's just a backup array", I tried EXT4 for the first time.  It formatted up nicely, 36 hours of rsync, and I was good to go.  I didn't realize I had the 0 byte file issue until my main array had some issues.  When I went to the backup array, there were tons of 0 byte files, including fstab, and mdadm.conf.  That made it more difficult to rebuild the main array.  I did manage to rebuild the main array.  Once done, I formatted the backup array EXT3 and I've been hessitante to experiment with filesystems.
    The 0 byte file bug is well documented, and perhaps long solved, but I'm not ready to get back on that bandwagon.
    For what it's worth, I was burned by EXT3 several times early in it's existance.  That was a different issue.  The whole filesystem would become corrupt after a while.  It was disasterous but I didn't count on my PC then the way I do now.  That was back in the days I could back up to CD-ROM.  I kept at it and eventually EXT3 stabalized.  These days, I trust EXT3 with my life.
    I encountered very similar issues, which resulted in me switching this workstation to FreeBSD and using ZFS for my raid arrays.
    The beauty of that file system far outweighs anything available on Linux at this current time.

  • How dose BigInteger translate a byte array

    I dont know if this is obvious or not, but where can i find the algorithm used by BigInteger for translating byte/array of bytes into a number?

    I dont know how, but you can have look in BigInteger source file.

  • JSP compiler in Weblogic 7.1 SP2 and Weblogic 8.1

              I have a web application (JSp and Servlets are generated) that loads fine with
              Weblogic 8.1. However, I have problems with Weblogic 7.1 SP2. In trying to load
              some of the JSP pages, I get the follwing type of errors
              Parsing of JSP File '/consume_int.jsp' failed:
              /consume_int.jsp(17): bean type com.mypackage.ConTypes.ConTypesJspBean has no
              read method for property 'consume_int_Int_parameter1'
              probably occurred due to an error in /consume_int.jsp line 17:
              <H4>consume_int_Int_parameter1:</H4> <jsp:getProperty name="ConTypesJspBean" property="consume_int_Int_parameter1"/>
              Wed Jun 09 20:01:34 BST 2004
              Looking further, I found that for property x, there are methods getx() and not
              getX(). Can this cause the problem. It seems to be working for some of the getx()
              methods and not for other ones.
              Any help would be appreciated.
              Thanks,
              MIB
              

              It does NOT seem to work with methods getX and setX for property 'x' in Weblogic
              7.1 SP2. It works fine in Weblogic 8.1. Any ideas ?
              - MBI
              "MIB" <[email protected]> wrote:
              >
              >I have a web application (JSp and Servlets are generated) that loads
              >fine with
              >Weblogic 8.1. However, I have problems with Weblogic 7.1 SP2. In trying
              >to load
              >some of the JSP pages, I get the follwing type of errors
              >
              >Parsing of JSP File '/consume_int.jsp' failed:
              >--------------------------------------------------------------------------------
              > /consume_int.jsp(17): bean type com.mypackage.ConTypes.ConTypesJspBean
              >has no
              >read method for property 'consume_int_Int_parameter1'
              >probably occurred due to an error in /consume_int.jsp line 17:
              ><H4>consume_int_Int_parameter1:</H4> <jsp:getProperty name="ConTypesJspBean"
              >property="consume_int_Int_parameter1"/>
              >
              >--------------------------------------------------------------------------------
              >Wed Jun 09 20:01:34 BST 2004
              >
              >Looking further, I found that for property x, there are methods getx()
              >and not
              >getX(). Can this cause the problem. It seems to be working for some of
              >the getx()
              >methods and not for other ones.
              >
              >Any help would be appreciated.
              >
              >Thanks,
              >
              >MIB
              

  • Tips for shaving a few bytes off a byte array?

    Hi, before you give me the standard solution using Inflator and Deflator, Im doing this on a J2ME device (of which there is no solution already implemented for both compression and decompression).
    I have a few byte arrays of length 150-300 bytes and just want to squeeze things all tighter if possible. The header information for decoding them should be stored in the resulting byte[] array also.
    I know storing a huffman tree would probably be too large for this so I just want suggestions for any tiny things that can be done (ie looking for repetitions of bytes or nibbles in the array)
    Thanks in advance!

    how large a header would I have to store in the byte
    array? The arrays are very small and this header data
    must be included in them!No header at all

  • Byte array convert to image works fine for a peiod of time, Then error

    Hi all
    I'm on a program of reading incoming image set which comes as byte arrays through socket and convert them back to images using the method.
    javax.microedition.lcdui.Image.createImage();This works perfect for some time.
    But after 1 minute of running it gives an error
    java.lang.OutOfMemoryError: Java heap space
            at java.awt.image.BufferedImage.getRGB(Unknown Source)
            at com.sun.kvem.midp.GraphicsBridge.loadImage(Unknown Source)
            at com.sun.kvem.midp.GraphicsBridge.createImageFromData(Unknown Source)
            at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at com.sun.kvem.sublime.MethodExecution.process(Unknown Source)
            at com.sun.kvem.sublime.SublimeExecutor.processRequest(Unknown Source)
            at com.sun.kvem.sublime.SublimeExecutor.run(Unknown Source)My J2ME client code
    public class ChangeImage extends Thread
        private SocketConnection sock = null;
        private Image img = null;
        private CanvasKey canvas = null;
        private InputStream in = null;
        public ChangeImage(SocketConnection sock, Canvas canvas) throws IOException
            this.sock = sock;
            this.canvas = (CanvasKey) canvas;
            in = sock.openInputStream();
        public void run()
            super.run();
            short length;
            while (true)
                DataInputStream din = null;
                try
                    din = new DataInputStream(in);
                    length = din.readShort();     // to determine next data packet size
                    byte[] arr = new byte[length];  // next data packet store here
                    din.readFully(arr);  //read image
                    img = Image.createImage(arr, 0, arr.length);
                    canvas.setImage(img);
                    ChangeImage.sleep(50);
                catch (Exception ex)
                    ex.printStackTrace();
    }When I comment following line no error prints.
    img = Image.createImage(arr, 0, arr.length);So the problem is not with socket program.
    What is this problem? Think old image isn't being flushed!!! in the method javax.microedition.lcdui.Image.createImage();Please help me.

    Forgot to Mention i'm using Windows 8.1 - 32 GB Ram - i7-3970x - 2 SSd's in raid 0 for C Drive/ Storage drive is three ( 2 tb HDD in a raid 0 ) / Pictures Folder defaults to the Storage Drive not the Application drive .

  • How to read a large file(size around 100 kbytes) into a byte array in JAVA

    aa

    But I cannot use array subscript as a long value.what do you mean?
    are you rying the following:
    long aSize = 100000;
    byte[] array = new byte[aSize];
    if this is the case, then don't do it, for your 100k file int is far more than enough.
    but in case you jsut get error while:
    byte b = array[100000];
    then it's probably because you'r array is of size 100000, that means you have bytes from 0 to 99999 in there, and 100000 is one passed the end of the array.... jus in case make your array size to be 1234567 (far more than needed for your file) and see if you still get that exception, if not, then your array was too small. but if it fixes your prob, then don't leave it as it is, try to work out the right size for array and use that....
    i wouldn't recommend using static array size, since that file might some day be bigger than you expected, and then you'd have to recompile your program.
    HTH

  • Is there a memory limitation to byte arrays?

    Everyone,
    I have a huge(16MB) CMYK source file and I am trying to convert it to a sRGB /JPEG file and then compress it.
    When I try to read that file into a byte array it chokes and throws an OutOfMemoryException. Is there a way around this?
    thanks,
    Barat.

    The data looks something like this:
    CCCCC...MMMMM...YYYYY...KKKKK...
    CCCCC...MMMMM...YYYYY...KKKKK...
    where each letter represents one byte.
    For example, the first cyan byte has cyan information
    for 8 pixels -- each bit represents cyan or no cyan, etc.
    The point is to get this data in a viewable form on screen.
    Have tried increasing the heap to 256
    Of course the problem is in a large array that holds the output information, which is ~130M
    The original file size is 16M but this was expanded to eight times the size for the PixelInterleavedSampleModel
    where one data element (a byte in this case) represents one sample of a pixel
    There must be a better way - any suggestions?

  • Large string array in 6.1 is extremely slow

    Good day all,
    While this is in to tech support at NI, I wanted to see if anyone else has encountered it.
    I am upgrading from 6.0.2 to 6.1. Several large (2500 rows by 250 columns or larger) string arrays are used as inputs into subvi's. Under 6.0.2, these functions run in tenths of seconds, while under the converted 6.1 vi's they run in 20 seconds or more!
    Tracing back using probes, the problem is occurring at the point of the input. It is appears that the array is taking many seconds to copy from the input to the wire on the diagram.
    Array controls generated in 6.1 (not converted from 6.0.2) seem to function just fine. Using a save with options... to convert back to 6.0.2, the vi's again function in tenths of
    seconds.
    Anyone have any ideas?
    Thanks!

    I hear what you're saying about legacy code...
    Something you might want to be looking at for the future is migrating to a structure where the data is stored in a 1D array, where each element is a cluster contain the data that's now in a single row. This would be the most straight-forward change, but could make getting at the data tricky, depending on how you need to be able to search it.
    Alternately, you could have a cluster containing arrays of each of the row values.In this structure element 0 of all the arrays is the first "row", element 1 of the arrays is the second "row" and so on. This structure at first blush looks more complicated, but it's really not, plus it would allow you to use any value (or combination of
    values) to search for a specific row without a lot of parsing.
    If the data that is in the example VIs you posted is typical, either of these changes would be advantagous because it looks like there is a lot of reptative data that might be able to be encoded in an enum. Plus storing numbers as numbers often reduces the memory required and produces a predictable memory footprint (an I32 will always take-up 4 bytes per value regardless of how large of small the number is). My sense is that the variability of the string size is what's killing you.
    One thing that would make this sort of dramatic change somewhat easier is that because you are changing the basic datatype of the interface, you aren't going to have to worry about finding all the places the change will effect--the wires will be broken.
    If you ever decide to take this on, give a hollar.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Error returning large String arrays from web service

    Hi,
    I currently have an EJB that returns a String[] array that I have implemented as
    a Web Service. When I execute a Java client (JSP) from Weblogic, I don't have a problem
    as long as the returned array is relatively small, but when the array starts to get
    a little larger (say 20 elements, about 30 chars each), I consistently get:
    SAXException: java.lang.IllegalArgumentException:array element type mismatch.
    Strangely enough, when my web service client is a .asp page running under MS IIS
    (using the MS SOAP Toolkit), it works fine. I have returned as many as 15000 - 20000
    array elements in one call. And since I am calling the same Weblogic EJB with the
    MS client, I know it's a problem with the Java client, not the EJB.
    Anybody know of a bug or had this experience before? Or know what I might be doing
    wrong? FYI, I am using Weblogic 6.1 SP2.
    Thanks,
    Steve

    Hi Steve,
    Sure we're interested...I'll pass this along to the XML folks.
    Thanks for the feedback,
    Bruce
    Steve Alexander wrote:
    In case anyone is interested, I solved my problem. I was mis-diagnosing the problem
    - thinking it was a size issue when it actually was a data issue. On the calls where
    I was returning a large array, some of the array members were null. When I made them
    enpty strings "", it worked. Apparently the default SAX parser BEA uses doesn't like
    the nulls, whereas the MS parser doesn't care.
    "Steve Alexander" <[email protected]> wrote:
    Thanks Bruce,
    FYI - I have reproduced the problem on WL7.0. I have turned it in to support
    as you
    suggested.
    Steve
    Bruce Stephens <[email protected]> wrote:
    Hi Steve,
    This does not ring any bells, however I would suggest that you file a support
    case. If it
    is an option you might try a later release (7.0).
    Bruce
    Steve Alexander wrote:
    Hi,
    I currently have an EJB that returns a String[] array that I have implementedas
    a Web Service. When I execute a Java client (JSP) from Weblogic, I don'thave a problem
    as long as the returned array is relatively small, but when the arraystarts to get
    a little larger (say 20 elements, about 30 chars each), I consistentlyget:
    SAXException: java.lang.IllegalArgumentException:array element type mismatch.
    Strangely enough, when my web service client is a .asp page running underMS IIS
    (using the MS SOAP Toolkit), it works fine. I have returned as many as15000 - 20000
    array elements in one call. And since I am calling the same Weblogic
    EJB
    with the
    MS client, I know it's a problem with the Java client, not the EJB.
    Anybody know of a bug or had this experience before? Or know what I mightbe doing
    wrong? FYI, I am using Weblogic 6.1 SP2.
    Thanks,
    Steve

  • Receiving it as a byte array via socket

    Yes, I could know the data end as read() returning -1 and the total byte-count value is in my hand then. But, however, if the byte-count value is N, I want those bytes in a single byte array of size N. What could be the standard, quickest and smartest way of getting the byte array on a socket peer?

    hiwa wrote:
    The readFully() method takes a byte array as an argument. The size of the array can't be decided as the total data size when we begin reading. We don't know it yet then.
    My method would be:
    LOOP(read -> out to a ByteArrayOutputStream) -> call ByteArrayOutputStream.toByteArray()
    However, if there is/are more smarter ones ...What problem are you actually trying to solve here?
    Here's a possible "solution" for you.
    Use a buffer. Then read the buffer and append the contents to a larger buffer. With code like this.
    private byte[] mergeBuffers(byte[] a, byte b[]){
      byte[] newBuffer = new byte[a.length+b.length];
      System.arraycopy(a,0,newBuffer,0,a.length);
      System.arraycopy(b,0,newBuffer,a.length,b.length);
      return newBuffer;
    }so during the read loop as the buffer fills up add the results of the current buffer to your "super"-buffer or whatever you want that has all the data.
    And then when you have finished reading trim the byte array to fit.

  • Error passing byte array in soap request

    Hi,
    i am trying to pass byte arrays (and also java.lang.Byte array) as parameter in
    a soap request.
    to do so i have defined a simple web service under weblogic 7.0.
    then i test it through the WebLogic Webservice standard testing home page.
    the value field for testing my web service is already filled by weblogic with:
    <bytes xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="xsd:base64Binary">aopd</bytes>
    i only need to invoke my web service to test it.
    then an exception is raised:
    javax.xml.soap.SOAPException: failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException:
    error decoding base64binary - with nested exception: [java.io.IOException: Error
    in encoded stream] javax.xml.soap.SOAPException: failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException:
    error decoding base64binary - with nested exception: [java.io.IOException: Error
    in encoded stream] at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:301)
    at weblogic.webservice.tools.pagegen.SampleInstance.getJavaObject(SampleInstance.java:130)
    at weblogic.webservice.server.servlet.ServletBase.getJavaParams(ServletBase.java:296)
    at weblogic.webservice.server.servlet.ServletBase.invokeOperation(ServletBase.java:239)
    at weblogic.webservice.server.servlet.WebServiceServlet.invokeOperation(WebServiceServlet.java:306)
    at weblogic.webservice.server.servlet.ServletBase.handleGet(ServletBase.java:198)
    at weblogic.webservice.server.servlet.ServletBase.doGet(ServletBase.java:124)
    at weblogic.webservice.server.servlet.WebServiceServlet.doGet(WebServiceServlet.java:224)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5412)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:744)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3086)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    any idea?

    Hi,
    Looks like a known bug (CR087883).
    Thanks,
    Bruce
    cyrille puget wrote:
    Hi,
    i am trying to pass byte arrays (and also java.lang.Byte array) as parameter in
    a soap request.
    to do so i have defined a simple web service under weblogic 7.0.
    then i test it through the WebLogic Webservice standard testing home page.
    the value field for testing my web service is already filled by weblogic with:
    <bytes xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="xsd:base64Binary">aopd</bytes>
    i only need to invoke my web service to test it.
    then an exception is raised:
    javax.xml.soap.SOAPException: failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException:
    error decoding base64binary - with nested exception: [java.io.IOException: Error
    in encoded stream] javax.xml.soap.SOAPException: failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException:
    error decoding base64binary - with nested exception: [java.io.IOException: Error
    in encoded stream] at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:301)
    at weblogic.webservice.tools.pagegen.SampleInstance.getJavaObject(SampleInstance.java:130)
    at weblogic.webservice.server.servlet.ServletBase.getJavaParams(ServletBase.java:296)
    at weblogic.webservice.server.servlet.ServletBase.invokeOperation(ServletBase.java:239)
    at weblogic.webservice.server.servlet.WebServiceServlet.invokeOperation(WebServiceServlet.java:306)
    at weblogic.webservice.server.servlet.ServletBase.handleGet(ServletBase.java:198)
    at weblogic.webservice.server.servlet.ServletBase.doGet(ServletBase.java:124)
    at weblogic.webservice.server.servlet.WebServiceServlet.doGet(WebServiceServlet.java:224)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5412)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:744)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3086)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    any idea?

Maybe you are looking for