Help writing to file

This code is supposed to print all prime numbers between 1 and 100 to a file called PrimeNumbers. However, when I go back and check the file, all it contains is a 1. What is preventing it from printing all of the primes? Thank you.
import java.io.*;
public class Numbers
    public static void main(String[] args) throws IOException
        PrintWriter outputFile = new PrintWriter("PrimeNumbers.txt");
        int num1, num2, num3;
        for(num1=1; num1<= 100; num1++)
            num3 = 0;
            for(num2=1; num2<=num1; num2++)
                if(((num1%num2)==0) & num2!=1 & num2!=num1)
                    num3=1;
            if(num3==0)
                System.out.println(num1 + " is a prime number\n"); 
                outputFile.println(num1);
                outputFile.close();
}Edited by: pfloyd123 on Mar 20, 2009 11:28 PM
Edited by: pfloyd123 on Mar 20, 2009 11:29 PM

pfloyd123 wrote:
This code is supposed to print all prime numbers between 1 and 100 to a file called PrimeNumbers. However, when I go back and check the file, all it contains is a 1. What is preventing it from printing all of the primes? Thank you.
import java.io.*;
public class Numbers
public static void main(String[] args) throws IOException
PrintWriter outputFile = new PrintWriter("PrimeNumbers.txt");
int num1, num2, num3;
for(num1=1; num1<= 100; num1++)
num3 = 0;
for(num2=1; num2<=num1; num2++)
if(((num1%num2)==0) & num2!=1 & num2!=num1)
num3=1;
if(num3==0)
System.out.println(num1 + " is a prime number\n"); 
outputFile.println(num1);
outputFile.close();
}Edited by: pfloyd123 on Mar 20, 2009 11:28 PM
Edited by: pfloyd123 on Mar 20, 2009 11:29 PMI was staring at that code for five minutes trying to workout how it works. So I took a copy, and ran it... and (surpise) it works... and it's not actually too terribly slow... but I made some "performance tweaks", and now it's quit a bit faster.
The console output was the slow part. Wrapping the PrintWriter in a BufferedWriter makes no difference. Hmmm...
package forums;
import java.io.FileWriter;
import java.io.BufferedWriter;
import java.io.PrintWriter;
public class PrimeTester_SieveOfpfloyd123
  private static final int MAX = 1000*1000;
  public static void main(String[] args) throws Exception {
    long start = System.nanoTime();
    PrintWriter out = new PrintWriter("PrimeTester_SieveOfpfloyd123.out");
    //PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("PrimeTester_SieveOfpfloyd123.out")));
    int cnt = 0;
    for ( int a=1; a<=MAX; a++) {
      boolean isPrime = true;
      int n = (int) Math.sqrt(a);
      for ( int b=2; b<n; b++ ) {
        if ( a%b == 0 ) {
          isPrime = false;
          break;
      if ( isPrime) {
        //System.out.print(a);
        //System.out.print(++cnt%20==0 ? '\n' : ' ');
        out.print(a);
        out.print(++cnt%20==0 ? '\n' : ' ');
    long stop = System.nanoTime();
    out.close();
    System.out.println("1.."+MAX+" took "+((stop-start)/1000000.0)+" millis");
}Cheers. Keith.

Similar Messages

  • Need help writing to file

    I have an ArrayList of XML strings. I am trying to write the XML strings in the arraylist to a text file. However, the only XML string that I see in the file is the first string repeated over and over. It is the only one getting to the file for some reason. I have tried the code below:
        public void writeToLogFile(String logFile, String msg) {
                try{   
                    FileWriter WriteFile = new FileWriter(logFile, true);  
                    BufferedWriter WriteBuff = new BufferedWriter(WriteFile); 
                    WriteBuff.write(msg+"\r\n");
                    WriteBuff.close(); 
                    WriteFile.close(); 
                }catch(IOException e) {
                    System.out.println("Error writing to file.");
    //        try {
    //            FileWriter fw = new FileWriter(logFile,true);
    //            PrintWriter pw = new PrintWriter(fw);
    //            pw.println(msg);
    //            pw.close();
    //        }catch(IOException ioExc) {
    //            System.out.println("error writing file");
        }  I tried the commented out code also. I've also tried using PrintStream. They all seem to give me the same result. My first thought was maybe I'm sending the same string to the method over and over but I'm not. If I loop through my arraylist of XML strings and do a System.out.println() instead of writing to file, I see that I am sending in different XML strings.
    Here's how I'm looping through the arraylist of XML strings call "al":
                for(int i=0; i<FileValues.length; i++) {
                    al = adapter.executeQuery(FileValues[0]);
    System.out.println("Writing to output file...");
    for(int x=0; x<=al.size()-1; x++) {
    //System.out.println(al.get(x).toString());
    test.writeToLogFile("c:/temp/a/limAdapterOutput", al.get(i).toString());
    System.out.println("Finished writing to output file.");
    What I'm doing is reading an arraylist (FileValues) of query parameters. For each parameter, I am querying a database based on the parameter and returning an arraylist of XML strings containing the query result. For each paramter, I'm returning about 1200 XML strings in the arraylist. Then I try to loop through the arraylist and write the XML strings to a file. However, this is when I run into my problem.
    Any ideas what's going on and how I can correct the problem? Thanks.

    for(int i=0; i<FileValues.length; i++) {
    al =
    al =
    al = adapter.executeQuery(FileValues[0]);
    System.out.println("Writing to output
    iting to output file...");
    for(int x=0; x<=al.size()-1; x++) {
    //System.out.println(al.get(x).toString());
    test.writeToLogFile("c:/temp/a/limAdapterOutput",
    ut", al.get(i).toString());
    System.out.println("Finished writing
    inished writing to output file.");
    When you write to the log file in the inner loop, it sounds like you want to use the x loop counter, not the i counter from the outer loop.  You comment out the print to System.out, which uses the x loop counter.  Why don't you do the same thing in the uncommented code?  Hard to follow exactly what you're doing, but maybe that will fix it.

  • Help writing control file

    hi all
    Newbie here........i want to write a control file for uploading data from a csv file(Excel), which has 14 colums eg:
    col 1,col 2,col 3,col 4,col 5,...................col 14
    and the length is not constant for the feilds...
    now i need to upload only selected columns into a table.........
    say.....
    col2,col3,col4,col5,col8,col9 and col14........and the table is of 7 columns.......
    can some one please help me in writing the control file for this requirement......
    Many thanks......

    In that case, you should consider using EXTERNAL TABLEs.
    Instead of having a control file sitting outside the database, and having to run and monitor and managed the SQL*Loader process outside the database, you can do it all from inside the database.
    An EXTERNAL TABLE is basically a SQL*Loader control file. You define this once using a CREATE TABLE statement, up front. You can use the ALTER TABLE statement to specify the location and name of the CSV file.
    A simply SQL SELECT allows you to load the data.
    Details are in [url http://oracle.telkom.co.za:7777/oracle/oradoc102/server.102/b14200/statements_7002.htm#i2159541]Oracle® Database SQL Reference guide.
    Here's the example given in the guide:
    CREATE TABLE dept_external (
    deptno NUMBER(6),
    dname VARCHAR2(20),
    loc VARCHAR2(25)
    ORGANIZATION EXTERNAL
    (TYPE oracle_loader
    DEFAULT DIRECTORY admin
    ACCESS PARAMETERS
    RECORDS DELIMITED BY newline
    BADFILE 'ulcase1.bad'
    DISCARDFILE 'ulcase1.dis'
    LOGFILE 'ulcase1.log'
    SKIP 20
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
    deptno INTEGER EXTERNAL(6),
    dname CHAR(20),
    loc CHAR(25)
    LOCATION ('ulcase1.ctl')
    REJECT LIMIT UNLIMITED;

  • Need Help writing CLOB file

    I'm trying to write a servlet that receives a file upload and
    inserts the file into a CLOB in Oracle. Taking it one step at a
    time. I used the O'Reilly classes for file upload to receive the
    file and save it to disk. The next step of reading the file and
    saving it in Oracle is where things don't seem to work.
    Basically, I open a connection to Oracle. Create a new row in my
    table. Select the CLOB column from the table to open the stream,
    then try reading the file and writing it to the stream.
    When I look at my table, I see that the row has been inserted,
    but the CLOB column is null.
    I'm trying to write this for eventual use in receiving
    XMLdocuments into our database for processing. So if anyone has
    a better way of uploading the files directly into the database
    over the net, I'd appreciate it.
    My code follows:
    // Copyright (c) 2000 CPCC
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    import java.text.*;
    import com.oreilly.servlet.multipart.*;
    * A Class class.
    * <P>
    * @author Rivera, Maynard
    public class UpLoad extends HttpServlet {
    private File dir;
    private String username = "mrr";
    private String password = "auction";
    private String thinConn
    = "jdbc:oracle:thin:@192.1.100.6:1526:N";
    private Connection cn = null;
    Statement stmt;
    private void OpenConnection (HttpServletResponse response)
    throws SQLException, IOException {
    try {
    //Connect with the Thin Driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver ());
    cn = DriverManager.getConnection (thinConn, username,
    password);
    cn.setAutoCommit(true);
    } catch (SQLException e) {
    PrintWriter out = response.getWriter();
    out.println("Error connecting to Oracle");
    private void ReadFile (File Dir, String FileName, String
    thedate, PrintWriter out) throws IOException {
    try {
    String cmd = "SELECT document FROM xmldocuments WHERE
    docname = '"+FileName+"' and timestamp = to_date
    ('"+thedate+"', 'dd-mm-yyyy hh24:mi') for update";
    out.println(cmd);
    ResultSet rest = stmt.executeQuery(cmd);
    rest.next();
    CLOB clob = ((OracleResultSet)rest).getCLOB(1);
    File theFile = new File(Dir+"\\"+FileName);
    FileInputStream instream = new FileInputStream(theFile);
    OutputStream outstream = clob.getAsciiOutputStream();
    int size = clob.getBufferSize();
    byte[] buffer = new byte[size];
    int length = -1;
    while ((length = instream.read(buffer)) != -1)
    outstream.write(buffer, 0, length);
    instream.close();
    outstream.close();
    } catch (SQLException e) {
    public void doPost(HttpServletRequest request,
    HttpServletResponse response) throws ServletException,
    IOException {
    PrintWriter out = response.getWriter();
    response.setContentType("text/plain");
    out.println("Upload Servlet Test");
    dir = new File("c:\\myprojects");
    String fileName = null;
    try {
    MultipartParser mp = new MultipartParser(request,
    10*1024*1024);
    Part part;
    while ((part = mp.readNextPart()) != null) {
    String name = part.getName();
    if (part.isFile()) {
    // it's a file part
    FilePart filePart = (FilePart) part;
    fileName = filePart.getFileName();
    if (fileName != null) {
    // the part actually contained a file
    long size = filePart.writeTo(dir);
    out.println("file; name=" + name + "; filename=" +
    fileName +
    ", filePath=" + filePart.getFilePath() +
    ", content type=" + filePart.getContentType() +
    ", size=" + size);
    } else {
    // the field did not contain a file
    out.println("file; name=" + name + "; EMPTY");
    out.flush();
    } catch (IOException lEx) {
    // this.getServletContext().log(lEx, "error reading or
    saving file");
    try {
    OpenConnection(response);
    stmt = cn.createStatement();
    SimpleDateFormat formatter = new SimpleDateFormat ("dd-MM-
    yyyy HH:mm");
    java.util.Date TimeStamp = new java.util.Date();
    String dateString = formatter.format(TimeStamp);
    String cmd = "INSERT into XMLDOCUMENTS (DOCNAME,
    TIMESTAMP, DOCUMENT) VALUES ('"+fileName+"', to_date
    ('"+dateString+"', 'DD-MM-YYYY HH24:MI'), EMPTY_CLOB())";
    ResultSet rest = stmt.executeQuery(cmd);
    ReadFile(dir, fileName, dateString, out);
    } catch (SQLException e) {

    The [url=http://otn.oracle.com/sample_code/tech/xml/xmlnews/
    xnewshome.html]Dynamic News sample application shows how to read
    and write CLOBs. The URL is:
    http://otn.oracle.com/sample_code/tech/xml/xmlnews/xnewshome.html
    Regards,
    -rh

  • Help writing to file in "C" using JNI

    Hi,
    I am trying to write the encrypted data that I read from a file. It writes the decrypted data; however, it prints extra characters at the end of file after the data. I am not sure why this is happening. Below is the code that I use to write the decrypted data to a file. I am using "C" and JNI to call Java classes in my application which is a DLL.
         cipherFile = fopen ( "C:\\ciphertext.1-6", "w" );
         if (cipherFile==NULL)
             printf("\nCan't open cipherFile\n");
             return -1;        
         fprintf(cipherFile, "%s", pass2EncToXUTF);                           
         // obtain file size.
        fseek (cipherFile , 0 , SEEK_END);
        lSize = ftell (cipherFile);
        printf("Size of cipherFile file:  %d\n", lSize);
        rewind (cipherFile);
         fclose(cipherFile);--------------------------------------------------------------------------------
    Here is the output.....
    John Doe 123-45-6789 1234567890123456 01/01/1950
    Jane Doe 234-56-7890 2345678901234567 02/02/1951
    John Smith 345-67-8901 3456789012345678 03/03/1952
    Jane Smith 456-78-9012 4567890123456789 04/04/1953
    John Walker 567-89-0123 5678901234567890 05/05/1954
    Jane Walker 678-90-1234 6789012345678901 06/06/1955
    John Asia 789-01-2345 7890123456789012 07/07/1956
    John Africa 890-12-3456 8901234567890123 08/08/1957
    John Europe 901-23-4567 9012345678901234 09/09/1958
    John America 012-34-5678 0123456789012345 10/10/1959
    ��������������
    As you can see, there is some garbage printed at the end of file. Why?
    Any help will be greatly appreciated. Thanks in advance.

    Sorry about that.
    Here's the code for jstring pass2EncToXUTF.
    pass2EncToXUTF = (*env)->GetStringUTFChars(env, resultOfEncToX, 0);
          if (pass2EncToXUTF == NULL) {
            printf("pass2EncToXUTF is null\n");
            exit(1);
          printf("\nResult of pass2EncToXUTF: %s\n", pass2EncToXUTF);

  • When downloading iTunes, I got a message about error writing to file and it told the file. Then it said to verify that you have access to that directory. I have no idea how to fix it. I could really use some help, please.

    I was trying to download iTunes on my computer, and while doing so, I got this message: Error writing to file: C:/Program Files (x86)/Common Files/Apple/Apple Application Support/Apple Versions.dll. Verify that you have access to that directory. I have downloaded iTunes numerous times and I have never had this problem. If anyone knows what's going on, I would really appreciate the help.

    Well, there's definitely a mac and a Windows version. And you're at the right page. I think the problem is that someone forgot (or decided not to) to update the text at teh bottom of the page to have Mac and Windows.
    Just push the button, you'll get the Mac update no problem.
    Regards,
    Bentley Wolfe
    Senior Support Engineer, Flash/Flash Player/Digital Editions
    Adobe

  • Please can anyone help me..I can not get itunes to install,i get a error message writing to file c and says i need to verify access to directory please help me

    I need help in trying to install I Tunes,,,after multiple attempts I have now pulled all my hair out,and I am without I Tunes,,,I have tried everything ,and all the ideas that I have found in trying to seach the reason for my problem.it will download quick time,,,it gets about half way through I Tunes and I get a error message that says...........Error writing to File C /program files x86  itunes .tunes exc.verify you have access to that directory......I need the wisdom of any and all that are smarter than I about this issue.........I would appreciate any and all help ..thank you....

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Server does not allow relaying email error, fix
    http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
    Why Does My iPad Say "Cannot Connect to Server"?
    http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
    iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
    http://support.apple.com/kb/ts2621
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
    http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • Problem installing itunes- error writing to file C:\Config.Msi\1c16cb7e.rbf. Verify that you have access to that directory. Help!!

    Every time I try to update itunes i get an error that says: error writing to file C:\Config.Msi\1c16cb7e.rbf. Verify that you have access to that directory.
    I've tried uninstalling and I the same error. Help!

    Are you running Kaspersky security software on that PC? (There's been a few reports in recent times of Kaspersky interfering with iTunes installs, with that message being produced.)
    If there is Kaspersky on board, we should try some general-principles getting-past-security-software-interference troubleshooting.
    Download and save a fresh copy of the iTunesSetup.exe (32-bit installer file) or iTunes64Setup.exe to your Hard drive. (Don't run the install on line, and don't start the install just yet.)
    http://www.apple.com/itunes/download/
    Restart the PC. After the PC restarts do not open any applications. Disconnect from your network and/or the internet. Now switch off all your security software (firewall, antivirus, antispyware).
    Now start the install by doubleclicking the iTunesSetup.exe (or iTunes64Setup.exe) file you downloaded earlier.
    Reenable all security software prior to reconnecting to your network and/or the internet.
    Any better luck with the security software shut down?

  • I am trying to upgrade to itunes 10.7 using windows and keep getting the following error message: "Error writing to file: C:\Config.Msi\364460.rbf   Verify access to this dierctory". Help!

    I am trying to upgrade to itunes 10.7 using windows and keep getting the following error message: "Error writing to file: C:\Config.Msi\364460.rbf   Verify access to this dierctory". Help!

    Fixed! (win7 64 bit)! Just stop your antivirus during the upgrade/installation (I've got Kaspersky).
    Good luck!

  • I am trying to download itunes 10.7 and keep getting "error writing to file C\config.msi\6f8a6.rbf.  Can anyone help?

    I am trying to download itunes 10.7 and keep getting "error writing to file C\config.msi\6f8a6.rbf"  Can anyone help?

    Are you running Kaspersky security software on that PC? (There's been a few reports in recent times of Kaspersky interfering with iTunes installs, with that message being produced.)
    If there is Kaspersky on board, we should try some general-principles getting-past-security-software-interference troubleshooting.
    Download and save a fresh copy of the iTunesSetup.exe (32-bit installer file) or iTunes64Setup.exe to your Hard drive. (Don't run the install on line, and don't start the install just yet.)
    http://www.apple.com/itunes/download/
    Restart the PC. After the PC restarts do not open any applications. Disconnect from your network and/or the internet. Now switch off all your security software (firewall, antivirus, antispyware).
    Now start the install by doubleclicking the iTunesSetup.exe (or iTunes64Setup.exe) file you downloaded earlier.
    Reenable all security software prior to reconnecting to your network and/or the internet.
    Any better luck with the security software shut down?

  • Please help me in writing .jad file

    Hi friends,
    i am getting some problem in writing .jad file
    in J2ME.
    by now i created .java file
    from .java -> .class -> preverifying, o/p -> .class
    ->.jar files -> finally i need to create .jad
    i am trying to create a midlet.
    if you know some useful resource available or reference, any thing is good for me right now.
    thanks
    sumit

    thanks friends,
    any how i got it how to do it,
    in future if anybody needs help,
    contact me at
    [email protected]

  • Error writing to file during iTunes 10.6 installation - Help!!

    I am trying to update iTunes to 10.6 but I get 'Error writing to file C:\Config.Msi\1b0f1d.rbf. Verify that you have access to that directory' I am presented with the option to 'Retry' or 'Cancel' after choosing retry on multiple occassions the update will not complete. I have a new pc on Windows 7 Home Premium 64-bit system. I have never had this problem before. Thanks in advance.

    Wierdly after persistance it has worked :s not sure how. but I have iTunes 10.6 which is the main thing!

  • Help please! error writing to file cannot download itunes...cant fix!

    i really dont know what to do... i just got my computer a couple of months and something must have happened when i downloaded it the first time. i few times after using is i was having problems it said something about a corrupt file. So logically i thought to uninstall and then reinstal. but since then i have been dealing with this problem for a couple of weeks.
    installation will go well for a while (a couple of minutes) then i will this error.
    Error writing to file: C:\programfiles\commonfiles\apple\mobiledevicesupport\bin\AOSutils.dll
    then its says please verify that you have access to that directory.
    i have tried so many things and really dont know what to do. this cannot be manually deleted either.
    any advice would be appreciated!

    "Error writing to file: C:\Program Files\Common Files\Apple\Mobile Device Support\AppleMobileDeviceHelper.exe. Verify that you have access to that directory."
    Most commonly, it's caused by disk or file damage, J.
    Let's first try running a chkdsk over your C drive. There's Windows 7 instructions in the following document. Select both "automatically fix file system errors" and "scan for and attempt recovery of bad sectors" or use chkdsk /r (depending on which way you choose to go about things). You should be prompted to schedule the scan to run on restart. That sort of scan of the C drive should take a long time ... if it quits after a few minutes or seconds, something's interfering with the scan:
    [How to use CHKDSK (Check Disk)|http://www.w7forums.com/use-chkdsk-check-disk-t448.html]
    Does the chkdsk find/repair any damage? If so, try another iTunes install. Does it go through properly this time?

  • Access denied error while writing a file to the file system - myfileupload.saveas() throws system.unauthorizedexception

    hi,
    as part of my requirement , i have to perform read and  write  operations of  few files [ using the file upload control in my custom visual web part] and on submit button click.
    but while writing these files - with the help of  fileupload control - and when i use  myfileupload.saveas(mylocation);
    - i am saving these files into my D:\ drive of my server , where i am executing my code -, am getting access denied error.
    it throws system.unauthorizedexception.
    i have given full control on that folder where i was trying to store my attached files. and also  after following asp.net forums,
    i have added  iusr group added and performed all those steps such that, the file is saved in my D:\ drive.
    but unfortunately  that didnt happen.
    also
    a) i am trying the code with runwithelevatedprivileges(delegate() )  code
    b) shared the drive within the  d :drive where i want o save the files.
    c) given the full privieleges for the app pool identity- in my case , its
    network service.
    the  other strange thing is that, the same code works perfectly in  other machine, where the same sp, vs 2012  etc were installed .
    would like to know, any other changes/ steps i need to make it on this  server, where i am getting the  error.
    help is  appreciated!

    vishnuS1984 wrote:
    Hi Friends,
    I have gone through scores of examples and i am failing to understand the right thing to be done to copy a file from one directory to another. Here is my class...So let's see... C:\GetMe1 is a directory on your machine, right? And this is what you are doing with that directory:
    public static void copyFiles(File src, File dest) throws IOException
    // dest is a 'File' object but represents the C:\GetMe1 directory, right?
    fout = new FileOutputStream (dest);If it's a directory, where in your code are you appending the source file name to the path, before trying to open an output stream on it? You're not.
    BTW, this is awful:
    catch (IOException e)
    IOException wrapper = new IOException("copyFiles: Unable to copy file: " +
    src.getAbsolutePath() + "to" + dest.getAbsolutePath()+".");
    wrapper.initCause(e);
    wrapper.setStackTrace(e.getStackTrace());
    throw wrapper;
    }1) You're hiding the original IOException and replacing it with your own? For what good purpose?
    2) Even if you had a good reason to do that, this would be simpler and better:
    throw new IOException("your custom message goes here", e);
    rather than explicitly invokign initCause and setStackTrace. Yuck!

  • "Error writing to file" when installing Oracle9i

    I am fairly new to Oracle and have not been able to install Oracle 9i on my Redhat 7.2 box. In three attempts to install I have encountered the same error at some point, usually early on 5% or 10% into the install.
    The error is:
         "Error in writing to file /usr/oracle/product/9.2.0/olap/wrksht/wks.jar"
    However, it has not happened on the same file each time. I have stopped the installation of that component, but it encounters the same error on other files. I have tried redownloading the oracle disks and reinstalling, but to no avail. I read on one posting that Oracle needs to have glib2.2(rather than glib1.2) installed, so I downloaded it and will be trying that later today. If anyone has encountered this error and knows how to solve it I would appreciate the help. Below I have listed my computer configuration and I have attached the portion of the install log that identifies the error that takes place.
         Thanks
         Ed
         Here is my setup:
         Dual boot system running Redhat 7.2 and Win2k      server.
         Pentium III 400 MHZ
         256 MB of RAM
         30 GB Hard drive split in half-- 15GB for linux      15GB for windows.
         The mount points for linux are
         /          400 MB
         /boot      400 MB
         /home          1GB
         /tmp          600 MB
         /swap          600 MB
         /usr          12GB
         ORACLE_HOME is /usr/oracle/product/9.2.0
         all data files and software are under /usr/oracle
         Portion of the install log:
    Starting install install phase 1 of component Oracle OLAP Worksheet
    Calling query areasQueries2.2.0.7.0 getProductHome
    name = oracle.swd.jre
    startVersion = 1.1.8.0.0
    endVersion = 1.1.8.99.99
    acceptCompatible = null
    Query returned : /usr/oracle/jre/1.1.8
    Setting value of JDK_ROOT to /usr/oracle/jre/1.1.8
    Calling action fileActions2.2.0.10.0 copyGroupFromJar
         selectedNodes = null
         copyGroup = worksheet
         permissions = 644
         owner = null
         group = null
         copyAsText = null
         JarLoc = /tmp/OraInstall2003-01-23_03-02-09PM/temp57
         gpEntries = [[xsjwork.jar ->%ORACLE_HOME%/olap/wrksht/xsjwork.jar 1803268 plats=1=>
    Exception thrown from action: copyGroupFromJar
    Exception Name: IOException2
    Exception String: Error in writing to file /usr/oracle/product/9.2.0/olap/wrksht/wks.jar
    Exception Severity: 2
    *** Cancel Dialog:  ***
    User selected: Stop installation of all products.
    Exception handling set to prompt user with options to  RETRY  IGNORE
    User choice : User selected stop installation of all components
    Error in writing to file /usr/oracle/product/9.2.0/olap/wrksht/wks.jar
    Unable to read the list of homes from the inventory.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    Did you guys finally find solution to the problem?
    I have been trying to install Oracle 9.2.0.1 on redhat 8.0 box, for ages now. I get the following error first during install
    Error in writing to file libclntsh.so.9.0
    Then it is a series of errors, similar.
    In the end there is the dreaded linking error... for the ins_rdbms.mk sdo_on
    i just cant handle it.
    What the hell is wrong?
    I have done everything right as far as i know... any solutions?
    cheers

Maybe you are looking for

  • How to connect the Satellite Pro P100 to Hifi

    I've got Satellite Pro P100. How to connect this notebook to HiFI This is probably easy, but what can i say... just call me stupid. I've got the lead that goes out of the headphone jack, it links up to my hifi nice. Trouble being, there's a nasty his

  • Help to make script

    I would like to run this command: sudo rsync -avzp --progress --delete --exclude=/root --exclude=/var/tmp/kde* --exclude=/proc --exclude=/home --exclude=/media --exclude=/var/cache/pacman --exclude=/tmp/* --exclude=/lost+found --exclude=/var/backup -

  • BI query F4 Help on portal

    Hi I have the BI 7.0 Query as a Iview on portal . The problem which I am facing is that F4 help for Date in selection screen is not popping up with a calendar but it is just giving dates like 20.01.2003, 21.01.2003 etc In bex when I press F4 for the

  • Fusion-icon crashes

    I just did an update (kernel, nvidia module and more), rebooted and discovered that fusion-icon fails to start and gives me no useful info as to why... [loki@shiny 12:43:38 ~]$ fusion-icon -v * Detected Session: fluxbox * Searching for installed appl

  • How do I download and save the user manual as a pdf file?

    where is the "divice manual icon ??? >> Branched from an earlier discussion << Message was edited by: Verizon Moderator