DataOuptut/Input Streams || grouping my packets together!

So I just got done networking a 2D side-scroller. There's a little problem. When I test the program on my network using "localhost" it works fine and everything is as smooth as a baby's butt. But when I run it through the network, with two computers connected to the same router.. It seems to be grouping my packets (about 28 per second and it puts them in 4 groups) and the computer that ISNT running the ServerSocket looks like it's really jerky, but actually it's just taking the last packet of each group and setting the players location to that.. I'm using standard DataInputStream and DataOutputStream. Anyone have any suggestions?
To give you a clearer picture.. how this is working is: The ServerSocket program holds both Player information sets, and it recieves keystrokes from both clients. . It then updates the internal Player information and sends x,y and a few other pieces of information through the stream back to the each of the players. There is a 30ms delay between each send. The client receives as much info as it can from the server and sets the updates X,Y locations as long as data is coming in. Any ideas as to why it's grouping my packets?
Edited by: PaRlOaGn on Sep 27, 2008 6:59 PM

I actually was not flushing after each output set. I added a flush, and I wrapped my InputStream in a BufferedInputStream but it didn't seem to do much, thank you for the tip though. Also in response to the first reply, I understand what you are saying, I do have an identifier integer as to which player I'm sending through the stream.. Well what I just did that feels like "cheating" to fix it, is I put a wait time (12 ms) after each "packet" the client recieves. But there is a noticeable delay before anything happens on the screen.. not a huge delay but about 100-200ms. How i'm sending data back to the clients is like this:
public void run() {
          while (1 == 1) {
               if (p1.isClosed() || p2.isClosed()) {
                    try {
                         p1.close();
                         p2.close();
                    } catch (IOException ioe) {
                    System.exit(0);
               updateEntityState(player1);
               updateEntityState(player2);
               int px = (int) player1.getX();
               int py = (int) player1.getY();
               int ppx = (int) player2.getX();
               int ppy = (int) player2.getY();
               try {
                                p1output.writeInt(1);
                    p1output.writeInt(px);
                    p1output.writeInt(py);
                    p1output.writeInt(player1.getFacingDirection());
                    p1output.writeInt(player1.getImageNum());
                    p1output.writeBoolean(player1.onLadder);
                    p1output.writeBoolean(player1.onGround);
                    p1output.writeBoolean(player1.isJumping());
                    p1output.writeBoolean(player1.standingStill);
                    p1output.writeInt(0);
                    p1output.writeInt(ppx);
                    p1output.writeInt(ppy);
                    p1output.writeInt(player2.getFacingDirection());
                    p1output.writeInt(player2.getImageNum());
                    p1output.writeBoolean(player2.onLadder);
                    p1output.writeBoolean(player2.onGround);
                    p1output.writeBoolean(player2.isJumping());
                    p1output.writeBoolean(player2.standingStill);
                    p1output.flush();
                    p2output.writeInt(0);
                    p2output.writeInt(px);
                    p2output.writeInt(py);
                    p2output.writeInt(player1.getFacingDirection());
                    p2output.writeInt(player1.getImageNum());
                    p2output.writeBoolean(player1.onLadder);
                    p2output.writeBoolean(player1.onGround);
                    p2output.writeBoolean(player1.isJumping());
                    p2output.writeBoolean(player1.standingStill);
                    p2output.writeInt(1);
                    p2output.writeInt(ppx);
                    p2output.writeInt(ppy);
                    p2output.writeInt(player2.getFacingDirection());
                    p2output.writeInt(player2.getImageNum());
                    p2output.writeBoolean(player2.onLadder);
                    p2output.writeBoolean(player2.onGround);
                    p2output.writeBoolean(player2.isJumping());
                    p2output.writeBoolean(player2.standingStill);
                    p2output.flush();
                    Thread.sleep(30);
               } catch (InterruptedException ie) {
               } catch (IOException ioe) {
     }So this code is on the server, and it's how i'm sending data back to the clients.
The first int that I'm writing represents whether or not it's the clients player position or the other players position. 1 meaning it is that clients player info, and 0 meaning it's the other plays info.
Here is how i'm reading info from the clients
public void run() {
          while (1 == 1) {
               try {
                    int playa = input.readInt();
                    if (playa == 1) {
                         int y = (int) player.getY();
                         player.setX(input.readInt());
                         player.setY(input.readInt());
                         player.setFacingDirection(input.readInt());
                         player.setImagNum(input.readInt());
                         player.setOnLadder(input.readBoolean());
                         player.setOnGround(input.readBoolean());
                         player.setIsJumping(input.readBoolean());
                         player.standingStill = input.readBoolean();
                    } else if (playa == 0) {
                         other.setX(input.readInt());
                         other.setY(input.readInt());
                         other.setFacingDirection(input.readInt());
                         other.setImagNum(input.readInt());
                         other.setOnLadder(input.readBoolean());
                         other.setOnGround(input.readBoolean());
                         other.setIsJumping(input.readBoolean());
                         other.standingStill = input.readBoolean();
               } catch (IOException ioe) {
     }So what I added to cheat was I added a 12ms delay right before the "catch(IOException ioe) line. It seems to work but it feels like i shouldn't have to do that. Any suggestions?
(Also I dont indent like that, the code tag did it >_>)
Edited by: PaRlOaGn on Sep 28, 2008 12:50 PM
Edited by: PaRlOaGn on Sep 28, 2008 12:53 PM

Similar Messages

  • Set the max bytes per packet for an input stream

    Hi,
    I got this problem:
    I want to store some images into a DB. Now if the images are huge, the DB told me, that the packet size is too large
    maybe like that : 'Packet for query is too large (1668641 > 1048576)'
    I use an ByteArrayInputStream for the transmission to the DB.
    So if I am not able to set the max. packet size of the DB is it possible to cut the input stream into pieces to send them to the DB ?
    regards,
    Olek

    None of this makes any sense.
    The MySQL driver will be using TCP to talk to the database server. TCP is a stream oriented protocol. You can't control the size of the packets (other than the maximum by frigging with OS settings - don't do that). Neither can the server detect the sizes of incoming packets. It just sees a stream of bytes and has no idea where the write() boundries are or how the TCP protocol split that into IP packets - it's just a stream of bytes arriving in the same order they were sent.
    And... the max TCP segment size is nowhere near 32Mb, so that doesn't make any sense eeither.
    So, I conclude (especially in light of the answer about the config settings) that "packet" is a badly abused term by MySQL that allows it to limit the size of individual requests in order to provide some kind of protection against badly written clients and/or malicious attacks. If you need to send more data than this, just up the limit - especially if this is an intranet application where the client is under your control and attacks are unlikely.

  • SocketException during reads - JVM_recv in socket input stream read

    I am getting a SocketException when a Java applet talks to our
    WebLogic 7.0 server. The catch is that it only occurs at one site
    (that has very high T1 utilization, although latency is only ~60 ms)
    Our setup is such that the calls hit an Alteon load balancer, which
    then sends the request out to one of 4 IIS clustered servers, where it
    then is sent to one of 2 WL clustered servers. I figured latency
    would be the cause, but on IIS and on WL, the timeouts are set to
    several hundred seconds, so I am not quite seeing where the connection
    is being reset. To be honest, I really don't know if it is WL that is
    killing the connection, as nothing abnormal shows up in the WL log. I
    have seen similar problems in this group, though, although the stack
    traces never follow the same path mine does. I do have the following
    call stack from the Java plug-in console, though. Any ideas would be
    greatly appreciated.
    java.net.SocketException: Connection reset by peer: JVM_recv in socket
    input stream read
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(Unknown Source)
         at java.io.BufferedInputStream.fill(Unknown Source)
         at java.io.BufferedInputStream.read1(Unknown Source)
         at java.io.BufferedInputStream.read(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
         at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
         at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(Unknown
    Source)
         at sun.plugin.net.protocol.http.HttpURLConnection.checkCookieHeader(Unknown
    Source)
         at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
         at org.xxxx.abstracts.Controller.sendRequest(Controller.java:39)
         at org.xxxx.data.DataMediator.getDataNode(DataMediator.java:46)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Also, here is my code, although I can't see anything on the client
    side that seems off:
    public Object sendRequest( Object request, URL receiver ) throws
    Exception{
    Object response = null;
    URLConnection con = null;
    ObjectOutputStream out = null;
    ObjectInputStream in = null;
    try {
    con = receiver.openConnection();
    con.setDoInput(true);
    con.setDoOutput(true);
    con.setUseCaches(false);
    con.setDefaultUseCaches(false);
    con.setAllowUserInteraction(false);
    out = new ObjectOutputStream(con.getOutputStream());
    out.writeObject(request);
    out.flush();
    out.close();
    in = new ObjectInputStream(con.getInputStream());
    response = in.readObject();
    in.close();
    } catch (ClassCastException e) {
    if( out != null ){
    out.close();
    if( in != null ){
    in.close();
    } catch (Exception e) {
    if( out != null ){
    out.close();
    if( in != null ){
    in.close();
    throw e;
    return response;

    There is a known bug on earlier 1.3.1 releases with sockets on Windows 2k
    and XP. I don't remember all the details.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Keith Patrick" <[email protected]> wrote in message
    news:[email protected]...
    I'm getting the exception on the client, which is an XP machine, while
    the server is Win2K. I can't recall which, but either the applet or
    the server runs 1.3x while the other runs 1.4. I discounted that
    factor, though, as the problem only occurs on one site, which on all
    others it works fine.
    "Cameron Purdy" <[email protected]> wrote in message
    news:<[email protected]>...
    Exception is in the applet or on the server?
    Would one of those by any chance be running on W2K with JDK 131_01 orolder?
    >>
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Keith Patrick" <[email protected]> wrote in message
    news:[email protected]...
    I am getting a SocketException when a Java applet talks to our
    WebLogic 7.0 server. The catch is that it only occurs at one site
    (that has very high T1 utilization, although latency is only ~60 ms)
    Our setup is such that the calls hit an Alteon load balancer, which
    then sends the request out to one of 4 IIS clustered servers, where it
    then is sent to one of 2 WL clustered servers. I figured latency
    would be the cause, but on IIS and on WL, the timeouts are set to
    several hundred seconds, so I am not quite seeing where the connection
    is being reset. To be honest, I really don't know if it is WL that is
    killing the connection, as nothing abnormal shows up in the WL log. I
    have seen similar problems in this group, though, although the stack
    traces never follow the same path mine does. I do have the following
    call stack from the Java plug-in console, though. Any ideas would be
    greatly appreciated.
    java.net.SocketException: Connection reset by peer: JVM_recv in socket
    input stream read
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
    at
    sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(Unknown
    Source)
    atsun.plugin.net.protocol.http.HttpURLConnection.checkCookieHeader(Unknown
    Source)
    atsun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
    at org.xxxx.abstracts.Controller.sendRequest(Controller.java:39)
    at org.xxxx.data.DataMediator.getDataNode(DataMediator.java:46)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Also, here is my code, although I can't see anything on the client
    side that seems off:
    public Object sendRequest( Object request, URL receiver ) throws
    Exception{
    Object response = null;
    URLConnection con = null;
    ObjectOutputStream out = null;
    ObjectInputStream in = null;
    try {
    con = receiver.openConnection();
    con.setDoInput(true);
    con.setDoOutput(true);
    con.setUseCaches(false);
    con.setDefaultUseCaches(false);
    con.setAllowUserInteraction(false);
    out = new ObjectOutputStream(con.getOutputStream());
    out.writeObject(request);
    out.flush();
    out.close();
    in = new ObjectInputStream(con.getInputStream());
    response = in.readObject();
    in.close();
    } catch (ClassCastException e) {
    if( out != null ){
    out.close();
    if( in != null ){
    in.close();
    } catch (Exception e) {
    if( out != null ){
    out.close();
    if( in != null ){
    in.close();
    throw e;
    return response;

  • Reading data from input stream on unix

    I have a program that reads data from input stream from the socket. If the data is over 1500 bytes it is sent in multiple TCP packets. Whats weird is, if I run the program in windows environment it waits till it receives all the packets but when I run the same program in unix environment it only reads the first packet and go further without waiting for all the TCP packets!!
    The line that reads from input stream is
    datalen = inStr.read(byteBuffer);is there anyway I can make it wait till it receives all the packets on unix system? I do not understand why it works fine for windows in this case but not for unix.
    I'll appreciate any help..
    Thanks

    Try using a DataInputStream with the readfully() method.

  • Reading input stream over the tcp socket in unix

    I have a program that reads data from input stream from the socket. If the data is over 1500 bytes it is sent in multiple TCP packets. Whats weird is, if I run the program in windows environment it waits till it receives all the packets but when I run the same program in unix environment it only reads the first packet and go further without waiting for all the TCP packets!!
    The line that reads from input stream is
    datalen = inStr.read(byteBuffer);is there anyway I can make it wait till it receives all the packets on unix system? I do not understand why it works fine for windows in this case but not for unix.
    I'll appreciate any help..
    Thanks

    When the network is busy there can be any amount of dleay between packets. If this is ever 100 ms , then this will break.
    If you send more than one packet per 100 ms you will get two packets at once which will look like one longer packet. Unless you check for this the second packet may get ignored.
    The safe way is to send the packet size before sending the packet. Then on the client read the packet to the correct length. Otherwise you will have a program which just happens to work rather than one which will always work.

  • Hi freiends --  to know how to convert an OuputStream to an Input Stream

    I am using generating reports thru IReports and i am trying to convert an ouput received from a .jrxml file into an .pdf file This is how my code goes.
    System.out.println("inside ReportGenerator()");
              InputStream bais = new ByteArrayInputStream(input.getBytes());
              JasperCompileManager.compileReportToStream(bais,out);
              bais = new ByteArrayInputStream(out.toString().getBytes());
    // i am gtting an error over here it say unable to load an input stream.
              JasperFillManager.fillReportToStream(bais,out,new HashMap(),con);
              bais = new ByteArrayInputStream(out.toString().getBytes());
              JasperExportManager.exportReportToPdfStream(bais,out);
    could anyone plz help me

    InputStreams and OutputStreams are not interchangeable, or even particularly convertible. They do inherently different things.
    Sometimes it's possible to string them together, but it's not even clear from your code whether that's appropriate for your problem.
    Probably you should be creating a whole new output stream, completely separate from the input stream. But who knows; you didn't explain what you're trying to accomplish.

  • How do I return an input stream from a text file

    Suppose there's a class with methods..
    one of the methods is something like..
    public int value() and has a return statement at the end obviously for returning an int value..
    Another method reads a text file and creates an input stream..
    Scanner data  = new Scanner(new File(input.next()));
    I want to return the data when I do a call to this method, but I'm not sure what the method heading would look like..

    flounder wrote:
    Are we supposed to magically know what those errors are? Do you think that copying and pasting the exact error messages and indicating the lines they occur on would be useful to us?Sorry about that..
    I've replicated the same code below; and put the number of the line where the error is.
    +cannot find symbol variable read     [line 21]+
    +cannot find symbol variable read     [line 23]+
    +cannot find symbol variable read     [line 29]+
    +cannot find symbol variable read     [line 31]+
    +cannot find symbol variable inputStream     [line 44]+
    +calculate() in textInput cannot be applied to (java.util.Scanner)     [line 57]+
    the reason I have the _______ for the createInputStream() method is because I'm not really sure what the heading type should be to return the input stream.
    import java.io.*;
    import java.util.*;
    public class textInput
              public void requestFileName()
                   Scanner input = new Scanner(System.in);
                   System.out.print("Enter file name: ");
              public _______ createInputStream() throws FileNotFoundException
                   Scanner input = new Scanner(System.in);
                   Scanner read = new Scanner(new File(input.next()));
                   return read;
              public void calculate() throws IOException
    21           double max;
                   double min;
    23            int count = 0;
                   double total = 0;
                   if (read.hasNextDouble())
                        double temp = read.nextDouble();
    29                 max = temp;
                        min = temp;
    31                 count++
                        total += temp;
                        while (read.hasNextDouble())
                             double current = read.nextDouble();
                             count++;
                             min = Math.min(current, min);
                             max = Math.max(current, max);
                             total += current;
                   System.out.println("Max of: " + max);
                   System.out.println("Min of: " + min);
    44            System.out.println("Average of " + total/count);
              public void close() throws IOException
                   inputStream.close();
              public static void main(String[] args)
                   textInput run = new textInput();
                   try
    57                 run.requestFileName();
                        run.createInputStream();
                        run.calculate();
                        run.close();
                   catch(FileNotFoundException e)
                        System.out.println("File not found.");
                        System.exit(0);
                   catch(IOException e)
                        System.out.prinln("File not found.");
                        System.exit(0);
    }

  • When using URLConnection read input stream error

    hi,
    In my applet I build a URLConnection, it connect a jsp file. In my jsp file I refer to a javaBean. I send two objects of request and response in jsp to javaBean. In javabean return output stream to URLConnect. At that time a error happened.WHY???(Applet-JSP-JAVABean)
    Thanks.
    My main code:
    APPLET:(TestApplet)
    URL url = new URL("http://210.0.8.120/jsp/test.jsp";
    URLConnection con;
    con = url .openConnection();
    con = servlet.openConnection();
    con.setDoInput( true );
    con.setDoOutput( true );
    con.setUseCaches( false );
    con.setRequestProperty( "Content-Type","text/plain" );
    con.setAllowUserInteraction(false);
    ObjectOutputStream out;
    out = new ObjectOutputStream(con.getOutputStream());
    Serializable[] data ={"test"};
    out.writeObject( data );
    out.flush();
    out.close();
    //until here are all rigth
    ObjectInputStream in = new ObjectInputStream( con.getInputStream() );//happened error
    JSP:
    TestBean testBean = new TestBean ();
    testBean .execute(request, response);
    JAVABEAN:
    public void execute( HttpServletRequest request,
    HttpServletResponse response )
    ObjectInputStream in = new ObjectInputStream( request.getInputStream() );
    String direct = (String) in.readObject();
    System.out.prinltn("direct");
    ObjectOutputStream out = new ObjectOutputStream( response.getOutputStream() );
    SerializableSerializable[] data ={"answer"};
    out.writeObject( data );
    out.flush();
    out.close();
    Error detail:
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:729)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:251)
         at TestApplet.postObjects(TestApplet.java:172)

    you have to pay attention to the sequence of opening the streams.
    The following example is: client sends a string to server, and servlet sends a response string back.
    client side:
             URL url = new URL( "http://152.8.113.149:8080/conn/servlet/test" );
             URLConnection conn = url.openConnection();   
             System.out.println( "conn: " + conn );
             conn.setDoOutput( true );
             conn.setDoInput( true );
             conn.setUseCaches( false );
             conn.setDefaultUseCaches (false);
             // send out a string
             OutputStream out = conn.getOutputStream();
             ObjectOutputStream oOut = new ObjectOutputStream( out );
             oOut.writeObject( strSrc ); 
             // receive a string
             InputStream in = conn.getInputStream();     
             ObjectInputStream oIn = new ObjectInputStream( in );
             String strDes = (String)oIn.readObject();server side
             // open output stream
             OutputStream out = res.getOutputStream();  
             ObjectOutputStream oOut = new ObjectOutputStream( out );
             // open input stream and read from client
             InputStream in  = req.getInputStream();
             ObjectInputStream oIn = new ObjectInputStream( in );
             String s = (String)oIn.readObject();
             System.out.println( s );
             // write to client
             oOut.writeObject( s + " back" ); I have the complete example at http://152.8.113.149/samples/app_servlet.html
    don't forget to give me the duke dollars.

  • Error while executing SSIS package - Error: 4014, Severity:20, State: 11. A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)

    Hi,
    We are getting the following error when running our SSIS packages on Microsoft SQL Server 2012 R2 on Windows Server 2008 R2 SP1:
    Error: 4014, Severity:20, State: 11.   A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)
    SQL Server Data Tools and SQL Server Database Engine reside on the same server.
    We tried the following:
    Disabling TCP Chimney Offload
    Installed Windows Server 2008 SP1
    Splitting our SSIS code into multiple steps so it is not all one large continuous operation
    The error occurs during a BulkDataLoad task.
    Other options we are investigating with the engineering team (out-sourced, so delayed responses):
    Firewall configurations (everything is local, so this should not make a difference)
    Disabling the anti-virus scanner
    Are there other things we can try?
    Any insight is greatly appreciated.
    Thanks!

    Hi HenryKwan,
    Based on the current information, the issue can be caused by many reasons. Please refer to the following tips:
    Install the latest hotfix based on your SQL Server version. Ps: there is no SQL Server 2012 R2 version.
    Change the MaxConcurrentExecutables property from -1 to another one based on the MAXDOP. For example, 8.
    Set "RetainSameConnection" Property to FALSE on the all the connection managers.
    Reference:
    https://connect.microsoft.com/SQLServer/feedback/details/774370/ssis-packages-abort-with-unexpected-termination-message
    If the issue is still existed, as Jakub suggested, please provide us more information about this issue.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Error in external tax system: SAX processing failed on input stream SAX pro

    Hi
    When I was posted in T.Code: FB70,  (Customer Invoice) I am getting below mentioned error.
    Error in external tax system: SAX processing failed on input stream SAX processi.
    I put tick mark on calculate Tax column and select O1(A/R Sales Taxable).
    Pls. help me.
    Thanks
    Ranjith

    Hi Ranjith,
    I also face this problem in Production now.
    Could you kindly share with me how you resolved this issue?
    Thanks,
    Markus

  • ExecTask - java.io.EOFException: Unexpected end of ZLIB input stream

    BOXI 3.1 FP 7 deployed on AIX environment with all the lang packs. Trying to install SP2 on AIX, when it comes to deploying the war files, AnalyticalReporting, the install encounters error. This error appears to be with size of the war file.  Anyone came across this issue?
    2010-03-30 10:10:00,633   Target - Target "expand_and_package" started.
    2010-03-30 10:10:00,634   Delete - Deleting directory /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/web/AnalyticalReporting
    2010-03-30 10:10:00,798    Mkdir - Created dir: /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/web/AnalyticalReporting
    2010-03-30 10:10:00,828    Mkdir - Created dir: /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/AnalyticalReporting
    2010-03-30 10:19:32,016 *ExecTask - java.io.EOFException: Unexpected end of ZLIB input stream
    2010-03-30 10:19:32,016 ExecTask -      at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java(Compiled Code))
    2010-03-30 10:19:32,017 ExecTask -      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java(Compiled Code))
    2010-03-30 10:19:32,017 ExecTask -      at java.util.zip.ZipInputStream.read(ZipInputStream.java(Compiled Code))
    2010-03-30 10:19:32,017 ExecTask -      at sun.tools.jar.Main.extractFile(Main.java(Compiled Code))
    2010-03-30 10:19:32,017 ExecTask -      at sun.tools.jar.Main.extract(Main.java(Compiled Code))
    2010-03-30 10:19:32,025 ExecTask -      at sun.tools.jar.Main.run(Main.java:228)
    2010-03-30 10:19:32,025 ExecTask -      at sun.tools.jar.Main.main(Main.java:944)
    2010-03-30 10:19:32,051 ExecTask - Result: 1
    2010-03-30 10:19:32,162     Echo - Adding 'webiApplet/**' to the content to bundle with AnalyticalReporting's war file
    2010-03-30 10:19:32,302      Jar - error while reading original manifest: Error opening zip file /export/home/Business_Objects/global/deployment/workdir/tomc
    at55/application/AnalyticalReporting.war
    2010-03-30 10:19:35,354      Jar - Building jar: /export/home/Business_Objects/global/deployment/workdir/tomcat55/application/AnalyticalReporting.war
    2010-03-30 10:20:29,036      Zip - Building zip: /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/AnalyticalReporting.zip
    2010-03-30 10:23:58,561    Mkdir - Created dir: /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/web/AnalyticalReporting/WEB-INF
    2010-03-30 10:23:58,564     Copy - Copying 1 file to /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/web/AnalyticalReporting/WEB-I
    NF
    2010-03-30 10:23:58,597   Delete - Deleting directory /export/home/Business_Objects/global/deployment/workdir/tomcat55/resources/AnalyticalReporting
    2010-03-30 10:35:00,636   Target - Target "expand_and_package" finished.

    Hi,
    Don't know which of this factors solved the problem:
    1. Error server:
    AIX 5.2
    jdk 1.3.17 (minimum from docu: 1.3.11)
    $ORACLE_HOME wasn't in the begining of $PATH
    2. success server:
    AIX 5.3
    jdk 1.4.02
    $ORACLE_HOME is now in the begining of $PATH
    cheers Lao De

  • Sending Control-Z to Input Stream

    Hi everyone,
    I'm writing an interface to a command line program, and
    one of it's features is that it will accept "forms" through
    standard input. The default is that notepad will open
    when the command is typed, and you can edit the form
    through there.
    To accept the form through standard input, you have to
    send it the form, and then tell it the form is complete.
    This is done using the CTRL-Z keypress, at least when
    typing the form in with the keyboard.
    I need to do this with Java.
    There is another post which poses the same question at
    http://forum.java.sun.com/thread.jsp?forum=1&thread=3050
    so I attempted that solution.. and that didn't work.
    I had the system print out the form as it was being written,
    and the form displayed properly, followed by what was
    supposed to be a CTRL-Z character, which appeared
    on screen (DOS Window) as an arrow pointing right.
    Here is the code constructing the form and adding what i've been told is "ctrl-z":
    new StringBuffer(form+System.getProperty("line.separator")).append(CTRL_Z).append(System.getProperty("line.separator")))CTRL_Z is defined as:
    public static final char CTRL_Z = 26;Does anyone have any other suggestions that might be able to help me?
    If you need more information/code provided, I can do so.
    Thanks for any help!
    Kefka.

    You can't actually send anything to an input stream. But let's suppose you have an output stream somewhere that is connected to the standard input of this command line program. Try sending a byte, not a character, that contains 26 to it (yes, ctrl-z is indeed 26). This has a better chance of working than the character idea, because Java is going to translate your character-26 from Unicode to bytes using your system's default encoding. And I can't predict what that might end up as. But it will leave the byte 26 alone and just send it... I hope. Can't guarantee this.

  • How to get file input stream from the client machine by JSF Fileupload API?

    Dear Friends,
    How to get the file input stream from the client machine by JSF HtmlFileupload or fileupload API. At present, if i execute the file upload code in the client machine, it is able to get the local path of the file and looking for the file in server machine. So i am getting FileNotFoundException.
    E.g., If a file is located at client machine at following location means "C:\Test\Test.txt",
    uploadClass.getFileuploadComponent().getFilename().toString() returns "C:\Test\Test.txt". But it is looking for that file in server and throwing FileNotFoundException.
    Please post your replies soon.
    Thanks,
    JP

    Depends on which version of JSF you're using. If JSF 1.2, I wouldn't even bother trying to hack this into JSF itself unless you can use something like Seam 2 or richfaces.
    http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_fileUpload.html
    http://docs.jboss.org/seam/2.2.1.CR3/reference/en-US/html/controls.html#d0e29259 (look for s:fileUpload)
    But if I were you, a simple non-jsf form with a servlet works best for taking file uploads.
    As for JSF 2.0, there are other ways of getting it done.
    http://balusc.blogspot.com/2009/12/uploading-files-with-jsf-20-and-servlet.html

  • How to get input stream of other application

    Using Java is their any way to get the input stream of another applicaton?. For example i will start a java program and minimize it. Then i will start a notepad and type some thing in it. Java program should print all matters i am typed in notepad.
    Is it possible using java?
    Thanks in advance

    You have many ways to do that in C++. Read about Hooks and you will understand how u can do that. Anyway, even without hooks, u can get the messages from other applications in C++. So, let C++ get the data from other applications for you and let ur java program get data from the C++ program.

  • Parse XML input stream (no .xml file)?

    i have a java applet calling a web service that returns XML data as an input stream (char by char from SOAP) to this applet. if i append a all the chars to a string, is there some XML tool that will parse the string as if it were an XML document (like a getElement functions)?
    the applet cannot write the data to a .xml file, and i don't want to mess around with .jarsigning. any ideas?
    thanks,
    jonathan

    The XML parsers you are likely to be using support receiving input from a variety of sources besides files. For example you could parse XML from a String variable by passing a StringReader wrapping that String to the parser. Check the documentation for more details.

Maybe you are looking for