File Input Stream

Hello !
The FileInputStream has a constructor which uses FileDescriptor object as "FileInputStream(FileDescriptor fdobj)"
The practical use of FileDescriptor object is the FileInputStream and FileOutputStream to contain it.
Can someone help me how to make an elaborate use of it ? I want to use it in some manner in the following program .
God bless you.
NADEEM.
import java.io.* ;
public class CopyingText {
public static void main(String args[])  { 
Thread t = new Thread();
  try {
   System.out.println("Enter java CopyingText Source.txt Target.txt");
   FileInputStream  a = new FileInputStream(args[0]);
   FileOutputStream b = new FileOutputStream(args[1],true);        
   System.out.println("Source size: " + a.available());
   System.out.println(a.getFD());
    CopyingTxt rw  = new CopyingTxt(a,b);
    rw.fileCopying();
//    rw.bytesAvailable();             Giving IOException: Bad file descriptor : Reason ?
  } catch(Exception e) {
    System.out.println("Exception : main() :" + e );
    t.dumpStack();
class CopyingTxt   {
  private int i  , j  ;
  FileInputStream  fa ;
  FileOutputStream fb ;
  CopyingTxt(FileInputStream a, FileOutputStream b) {
   fa = a ;
   fb = b ;
  public int bytesAvailable() throws IOException {
   System.out.println(fa.getFD());
   System.out.println(fa.available());
    return fa.available() ;
  public void fileCopying() throws IOException {
   do {
    i = fa.read();
    j++ ;                                  
    if(i != -1) fb.write(i) ;
   } while(i != -1);                       //EOF condition  -1 .
   System.out.println("Bytes read : " + (j-1) + " / " + fa.available());
   bytesAvailable();
   fa.close();
//    fa.finalize();
   fb.close();
//    fb.finalize();
}

Please don't crosspost. It cuts down on the effectiveness of responses, leads to people wasting their time answering what others have already answered, makes for difficult discussion, and is generally just annoying and bad form.

Similar Messages

  • 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

  • Re: File Input Streams FileNotFoundException

    Hi,
    I'm having problems with file input streams.
    The program is supposed to read from an external file but when I run it in Sun ONE Studio 4 (update 1), it gives me a FileNotFoundException (The system cannot find the file specified). The file, class.dat, is in the same folder as the .java and .class files.
    Anyway, so I run the program through MS-Prompt commands and there is no problem. It executes fine and gives the right output. Go figure.
    Can anyone shed some light on what is going on? Anyone else with the same problem? Is there something I need to configure in SunStudio? Please help...
    Thanks
    The code is taken directly from Sams Java in 21 days.
    // code
    import java.io.*;
    public class ReadBytes {
    public static void main(String[] arguments) {
    try {
    FileInputStream file = new
    FileInputStream("class.dat");
    boolean eof = false;
    int count = 0;
    while (!eof) {
    int input = file.read();
    System.out.print(input + " ");
    if (input == -1)
    eof = true;
    else
    count++;
    file.close();
    System.out.println("\nBytes read: " + count);
    } catch (IOException e) {
    System.out.println("Error -- " + e.toString());

    FileInputStream file = new FileInputStream("class.dat");Is this the line that is giving you the error message? Always, when trying to open a disk file, give the full path. This is because, FileNotFoundException is thrown only in cases when your file cannot be found by your program. But you say that the file exists.
    Try giving your full path for the file...like:
    FileInputStream file = new FileInputStream("C:/Program Files/class.dat");
    //Ofcourse your path will be different. This is just an example!So try giving the full path and let me know.
    Vijay :-)

  • Does File Input stream encode data

    Hi,
    When I retrieve a binary stream of an image from a database and print out all the bytes and then retrieve data with a FileInputStream from the same image stored as a file, and print the results, the 2 printouts are completely different. Can anyone explain why?
    Thanz

    However, the InputStreams do treat bytes as signed entities (-128 to +127 rather then 0 to 255). If you just print these out then you will get odd results which do not match the data you are expecting.
    If you do the following
    int tmp = b & 0xFF;
    where b is a byte from your input then tmp will contain the unsigned value of that byte rather then the signed value.
    matfud

  • File Input Stream problem

    i have a text file that i want to read to be my input into my database in db4o. i was looking through the websites. like http://java.sun.com/javase/6/docs/api/java/io/FileInputStream.html
    and
    http://www.java2s.com/Code/JavaAPI/java.io/FileInputStreamavailable.htm
    there were different types too. like FileReader, FileInputStream. can anyone explain to me the differences between this two?
    below is an example on how inside my text file is going to look like
    Jack | China | 23
    Helen | Holland | 34
    Jenny | US | 34
    Micheal | Brazil | 23
    different attributes is separated by "|". i need to capture all this from a text file and store it in my db4o database. maybe someone could guide me on this? i am very new in java so forgive me if i am wrong. Thanks alot

    ok. thanks alot. i will look into it
    the "|" is because i want to separate different
    attributes by using symbol
    for example:
    Name | Address | Age
    Alex | Australia | 34
    Jack | Malaysia | 32
    Kate | Africa | 11
    Holmes | California | 54
    from there, this will be captured by the
    BufferedReader (because this is use to capture text)
    and read it and then stored inside the db4o. the
    problem now is how can i capture the data and
    automatic separate it as different field with this
    "|" symbol
    Message was edited by:
    erickhHow about using Scanner:
    Scanner inFile = new Scanner(new FileReader("a:\\file.txt"));

  • Using file input stream

    hello,
    i have the following problem.I have a file which consists of characters. I have to consider each character at a time for further manipulation, so in order to that i need to store it in an array..i have read the file using the following ..
    public class fileinput
    public static void main(String args[]) throws IOException
    int size;
    InputStream f = new FileInputStream("laser.txt");
    System.out.println("total available bytes:" +(size=f.available()));
    Now is it possible to store this file into a array ..when i use the following i'm getting an error coz "f.read()" returns an integer so it is incomaptible....
    byte b[]=new byte[size];
    for(int i=1;i<=size;i++)
    b=f.read();
    somebody plz help...

    1. It is really inefficient to read 1 byte at a time. You might do better to read all the bytes you can get and then see what's in the byte[]
    2. When using read(), here's what you want
    int b;
    while ( b = in.read() != -1) {
    byte bb = (byte) b;

  • What's the fastest input stream reader?

    Here's my candidate for the fastest stream reader. My interest and testing is with file input streams, but it's nice to support any stream.
         public static String readStream(InputStream is) throws IOException{
              int i, length = 0;
              StringBuffer s = null;
              char[] c = null;
              InputStreamReader isr = new InputStreamReader(is);
              while(length != -1){
                   length = is.available();
                   if(c == null) c = new char[length];
                   isr.read(c, 0 , length);
                   i = isr.read();
                   if(i == -1){
                        if(s == null) return String.copyValueOf(c);
                        else break;
                   }else{
                        if(s == null) s = new StringBuffer();
                        s.append(c, 0, length);
                        s.append((char)i);
              return s.toString();
         }

    I do have a separate function that's optimized for file reading. I have tried the simpler implementation, and it is slower.
    The reason I'm reading into a StringBuffer is that I have a DOM framework that allows you to load an xhtml document, do stuff, and then print out the result. I have Styles which allow you to merging a document with a style document and then in your project specific code, modify the resulting document. In one case, my style document is located on a remote machine and has the following:
    <link rel="stylesheet" href="<!--SOURCEURL-->style.css" type="text/css" media="all"/>
    I allow the Style class to override a "replaces" function that does string replacements and thus allows the non-xml compliant comment to be replaced by the appropriate URL prefix for the remote machine. I admit this probably isn't the best way to do it, since the comment makes the document invalid. I'd like to change to a better way, but I'd still like to keep the option of doing textual replaces on the input document before loading it into DOM. This may be a requirement since it is the convension that was previously used before we started using DOM.
    As for bounded size, I figure the StringBuffer is going to be a lot smaller than the DOM representation anyway. And, neither should be that significantly large.

  • 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);
    }

  • 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.

  • How to read a file as an input stream after it's posted in an HTML form ?

    Hello,
    I want to read client file after it's posted in an HTML form. But, I don't want to upload it to filesystem or database. I want to read posted file as an input stream. How can I do that ?
    thanks in advance...

    A couple of things. If you have a FILE field in your form, the enctype of the form must be multipart/form-data. Check this link
    http://www.htmlhelp.com/reference/html40/forms/form.html
    Also, when a file is uploaded you cannot use the regular methods to get at the name/value pairs or the file itself. You'll have to use a utility like MultiPartRequest or write your own based on the RFC for Multipart requests.
    http://www.servlets.com/cos/javadoc/com/oreilly/servlet/MultipartRequest.html
    You will need some temporary file system to store this and then delete it when you are done with it.
    hth

  • Document file or input stream is not set.

    Error sending mail :Exception Thrown
    oracle.apps.xdo.delivery.DeliveryException: Document file or input stream is not set.
    at oracle.apps.xdo.delivery.AbstractDeliveryRequest.submit(AbstractDeliveryRequest.java:1154)
    Delivery manager:
    Can some one tell me what was wrong with this,
    I check my document path I can describe it
    When i send one attachment it works with the same path
    but when I use multiple attachment it gives then error
    Attachment m = new Attachment();
    m.addAttachment("/fapps/oracle/fintstcomn/java/chami/test.pdf","test.pdf","application/pdf");
    m.addAttachment("/fapps/oracle/fintstcomn/java/chami/test2.pdf","test2.pdf","application/pdf");
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_ATTACHMENT,m);
    Thanks

    Ok. What I needed to do is use the Bursting Engine to send out an email (list of invoices) to sales reps for our company. From what I read I have created an XML Document (Template) and have successfully ran that but it looks like I need to create a control file(bursting)? This control file would need to be saved as an XML? Is this correct?

  • 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.

  • Passing request of file input type to a jsp

    Hi i m using this script for file uploading the form is.... <html > <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <form action="uploadscript.jsp" name="filesForm" enctype="multipart/form-data" method="post">
    Please specify a file, or a set of files:
    <input type="file" name="userfile_parent" value="userfile_parent" >
    <input type="submit" value="submit" value="Send">
    </form> </body> </html> And i am tring to get the url on uploadscript.jsp by using String parentPath=request.getParameter("userfile_parent"); but i foud that its value is NULL it is not working what should i do to get the userfile_parent on uploadscript.jsp help me!!! Message was edited by: UDAY Message was edited by: UDAY
    avajain      
    Posts: 135
    From: Noida , India
    Registered: 5/10/06
    Read      Re: Passing response but getting NULL
    Posted: Sep 20, 2006 2:43 AM in response to: UDAY in response to: UDAY      
         Click to reply to this thread      Reply
    Use method="GET" in place of method="post" .
    Thanks
    UDAY      
    Posts: 26
    From: JAIPUR
    Registered: 8/14/06
    Read      Re: Passing response but getting NULL
    Posted: Sep 20, 2006 3:18 AM in response to: avajain in response to: avajain      
    Click to edit this message...           Click to reply to this thread      Reply
    now it is giving this error message by e.getMessage()
    [br]the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null
    the uploadscript is this....
    http://www.one.esmartstudent.com
    can u please help me.

    Here is sample code which we have used in one of our projects with org.apache.commons.fileupload.*.
    You can find String fullName = (String) formValues.get("FULLNAMES"); at the end that gives name of file.
    <%@ page import="java.util.*"%>
    <%@ page import="java.util.List"%>
    <%@ page import="java.util.Iterator"%>
    <%@ page import="java.io.File"%>
    <%@ page import="java.io.*"%>
    <%@ page import="org.apache.commons.fileupload.*"%>
    <%@ page import="org.apache.commons.fileupload.disk.*"%>
    <%@ page import="org.apache.commons.fileupload.servlet.*"%>
    <%!     
         //method to return file extension
         String getFileExt(String xPath){ 
                   //Find extension
                   int dotindex = 0;     //extension character position
                   dotindex = xPath.lastIndexOf('.');
                   if (dotindex == -1){     // no extension      
                        return "";
                   int slashindex = 0;     //seperator character position
                   slashindex = Math.max(xPath.lastIndexOf('/'),xPath.lastIndexOf('\\'));
                   if (slashindex == -1){     // no seperator characters in string 
                        return xPath.substring(dotindex);
                   if (dotindex < slashindex){     //check last "." character is not before last seperator 
                        return "";
                   return xPath.substring(dotindex);
    %>
    <%           
    Map formValues = new HashMap();
    String fileName = "";
    boolean uploaded = false;
         // Check that we have a file upload request
         boolean isMultipart = FileUpload.isMultipartContent(request);
         //Create variables for path, filename and extension
         String newFilePath = CoeResourceBundle.getEmailProperties("FILE_UPLOAD_PATH");//application.getRealPath("/")+"temp";
         String newFileName ="";
         String FileExt = "";      
         //System.out.println(" newFilePath"+newFilePath+"/");
         //out.println(" newFilePath"+newFilePath+"<br>");
         // Create a factory for disk-based file items
         FileItemFactory factory = new DiskFileItemFactory();
         // Create a new file upload handler
         ServletFileUpload upload = new ServletFileUpload(factory);
         // Parse the request
         List /* FileItem */ items = upload.parseRequest(request);
         // System.out.println(" newFilePath"+newFilePath+"/");
         // Process the uploaded items
         Iterator iter = items.iterator();
         //Form fields
         while (iter.hasNext()) { 
         //System.out.println("in iterator");
              FileItem item = (FileItem) iter.next();
              if (item.isFormField()) { 
                   String name = item.getFieldName();
                   String value = item.getString();
                   if (name.equals("newFileName")) { 
                        newFileName = value;
                   //System.out.println("LOADING");
                   formValues.put(name,value);
              else { 
              //System.out.println("in iterator----");
                   String fieldName = item.getFieldName();
                   fileName = item.getName();
                   int index = fileName.lastIndexOf("\\");
              if(index != -1)
                        fileName = fileName.substring(index + 1);
              else
                        fileName = fileName;
                   FileExt = getFileExt(fileName);
                   String contentType = item.getContentType();
                   boolean isInMemory = item.isInMemory();
                   long sizeInBytes = item.getSize();
                   if (fileName.equals("") || sizeInBytes==0){ 
                        out.println("Not a valid file.<br>No upload attempted.<br><br>");
                   } else { 
                   // out.println("ACTUAL fileName= " newFilePath"\\"+fileName+ "<br>");
                        //File uploadedFile = new File(newFilePath+"\\", newFileName+FileExt);
                        File uploadedFile = new File(newFilePath+"/",fileName);
                        File oldFile = new File(CoeResourceBundle.getEmailProperties("FILE_UPLOAD_PATH")+"/"+fileName);
                        File oldFileApproved = new File(CoeResourceBundle.getEmailProperties("APPROVED_FILE_LOCATION")+"/"+fileName);
                        try{ 
                             if (!oldFile.exists()&&!oldFileApproved.exists())
                                  item.write(uploadedFile);
                                  uploaded = true;
                             //out.println(fileName+" was successfully uploaded as "+ newFileName+FileExt +".<br><br>");
                        catch (java.lang.Exception e) { 
                             out.println("Errors prevented the file upload.<br>"+fileName+ " was not uploaded.<br><br>");
         String userid = (String) formValues.get("USERID");
         String fullName = (String) formValues.get("FULLNAMES");
         String email = (String) formValues.get("EMAILID");
         String empno = (String) formValues.get("EMPNO");
         String docType = (String) formValues.get("DOCTYPE");
         String desc = (String) formValues.get("MYTEXT");
         String title = (String) formValues.get("TITLEBOX");
         String module = (String) formValues.get("MODULE");
         String techfunctype = (String) formValues.get("TECHFUNCTYPE");
    %>

  • 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

  • Java.io.EOFException: Unexpected end of ZLIB input stream

    Hi,
    I am reading .gz file in servlet and writing it in output stream. It works fine for smaller files. For larger file when I reading file and writing output I am getting exceptions as below in order.
    8/6/09 9:52:28:953 CDT] 00000029 ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet /WEB-INF/pages/TilesTemplate/layouttemplate.jsp. Exception thrown : java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
         at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:489)
         at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:170)
         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:163)
         at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:227)
    ---- Begin backtrace for Nested Throwables
    java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
         at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:489)
         at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:170)
         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:163)
    *[8/6/09 9:52:28:625 CDT] 00000029 SystemErr R java.io.EOFException: Unexpected end of ZLIB input stream*
    *[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:238)*
    *[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:157)*
    *[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:109)*
    *[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.io.FilterInputStream.read(FilterInputStream.java:110)*
    *[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:325)*
    *[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)*
    *[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.io.InputStreamReader.read(InputStreamReader.java:208)*
    *[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.io.BufferedReader.fill(BufferedReader.java:153)*
    *[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.io.BufferedReader.readLine(BufferedReader.java:316)*
    *[8/6/09 9:52:28:656 CDT] 00000029 SystemErr R      at java.io.BufferedReader.readLine(BufferedReader.java:379)*
    *[8/*

    My suggestion would be to run your code as a plain old Java application. Why use a servlet environment to test the problem? There's just too many things going on. So first see if it works the same way in a Java application. If it does, or if it doesn't, you then know where to go next.

Maybe you are looking for

  • Can i use my apple remote with garageband 11?

    Can I use my apple remote to start/stop recording in GB11? Thanks for any help PC

  • Colors not consistent with Snow Leopard 10.6 on an Eizo SX2761W monitor

    I am unable to get any color consistency with Snow Leopard 10.6 on my Eizo SX2761W display. Most of the actual "content" (i.e. images, videos, websites, etc.) is displayed very saturated and dark, much more saturated and dark than in 10.5.8. I presum

  • Event doesn't switch context after switching jpane & class

    Hi, I have (almost) managed the concept (tight) coupling. I switch panels on the display by invoking a method in the parent. However something strange occurs: I have a first panel with an actionListener, getting a user name. I have a second panel sho

  • One Plug-in Points with multiple status instances

    Hi, I deployed the following plug-in point that works as expected: <oimplugins> <plugins pluginpoint="oracle.iam.request.plugins.StatusChangeEvent"> <plugin pluginclass="com.zeropiu.custom.oim.pluginpoint.EmailNotificationOnRequestStatusChange" versi

  • Unit Tests for Beckend Beans?

    Does anybody has any idea how to write Unit Tests for JSF Beckend Beans? Especially if they are using session and request objects. How can I simulate Session for example?