FileNotFoundException problem

i have a simple program which uses FileInputStream and makes a copy of that file by using FileOutputStream. I am sick of getting following errors
Exception in thread "main" java.io.FileNotFoundException: C:\abc\abc.jpg (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at socketprogramming.ClientT.main(ClientT.java:15)
I am 100 percent sure that the file exist in the location.checked many times with file name ...everything good..pls look at my code below..
* To change this template, choose Tools | Templates
* and open the template in the editor.
package socketprogramming;
import java.net.*;
import java.io.*;
* @author user
public class ClientT {
    public static void main(String args[])throws Exception{
    FileInputStream filein=new FileInputStream("C:\\abc\\abc.jpg");
    FileOutputStream fileout=new FileOutputStream("C:\\abc\\test1.jpg");
    //Socket soc=new Socket("localhost",8000);
    //OutputStream out=soc.getOutputStream();
            int b;
            while((b=filein.read())!=-1){
                System.out.println(b);
                fileout.write(b);
            fileout.close();
}I would appreciate your help or any suggestion to fix this!
cheers,
Nitesh

NiteshN wrote:
I am 100 percent sure that the file exist in the location.checked many times with file name ...everything good..pls look at my code below..Have you read the API?
It specifically states: "If the named file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading then a FileNotFoundException is thrown."
I suggest you try setting up a File object first and check File.exists(). If that returns true, then the problem is not that it can't find the file.
Winston
Edited by: YoungWinston on Apr 19, 2010 2:57 AM
PS: Using forward slashes (/) for your directory separators is usually better, and more universal.

Similar Messages

  • PDF generation : FileNotFoundException problem

    Hi all,
    I'm developing a dynamic PDF generation module in web application using iText framework. This module creates PDF on the server side then sends it to the client. Sometimes, Even though the PDF file is created on the hard disk, I got FileNotFoundException when calling the servlet that sends it.
    My program is very simple (no thread used) :
    1- The client calls enters some inputs,
    2 - The iText based class generates the PDF,
    3 - The PDF created is saved as an attribute in the client session (HttpSession).
    4 - The request is redirected to servlet that sends the PDF.
    What could be the problem ?
    thx,

    In fact, I don't know what you mean by:
    3 - The PDF created is saved as an attribute in the client session (HttpSession).What do you mean by this? Did you save the proprietry PDF object? Or the java.io.File object? If it is the PDF object, does its class implement java.io.Serializable?
    Um ... Here are some suggestions ...
    First of all, make sure that the file really exists there.
    Secondly, try to write a Java SE program to read the file using the absolute path you provided.
    Then, if the Java SE program works, I think the reason may be that you haven't closed the "OutputStream" which writes the PDF file, or the security settings of your JSPServer prevents you from getting the file.
    Asuka Kenji (UserID = 289)
    (Duke Dollar Hunting now ...)

  • Problem with GDS - FileNotFoundException

    I get the following ERROR under heavy load in the server.log when "converting" xml to pdf(generatePDFOutput). Running lc es2(cluster), jboss 4.3, suse linux 11 sp2.
    2014-09-11 15:35:32,950 ERROR [com.adobe.idp.Document] DOCS001: Unexpected exception. An exception while handling a remote request.
    java.io.FileNotFoundException: /srv/global_document_storage/docm1410442494924/b61c1af1ccf663bd8a37be64903d0388 (No such file or directory)
      at java.io.RandomAccessFile.open(Native Method)
      at java.io.RandomAccessFile.<init>(RandomAccessFile.java:216)
      at com.adobe.util.FileUtil.randomAccessRead(FileUtil.java:297)
      at com.adobe.idp.DocumentPullServant.readData(DocumentPullServant.java:168)
      at com.adobe.idp.DocumentPullServant.pullContent(DocumentPullServant.java:154)
      at com.adobe.idp.IDocumentPullServantPOA._invoke(IDocumentPullServantPOA.java:42)
      at org.jacorb.poa.RequestProcessor.invokeOperation(Unknown Source)
      at org.jacorb.poa.RequestProcessor.process(Unknown Source)
      at org.jacorb.poa.RequestProcessor.run(Unknown Source)
    Any idea? No luck with increasing the document disposal timeout or sweep interval...

    Our pdf-files is about the size of 130 kb.
    With the current configuration we have set the document max-inline-size to 512 kb. Now the FileNotFoundException to the GDS has disapeared. But i still wonder why this error was shown when we used the GDS instead on the memory.....
    Could it be problem with Synchronizing clock times in our cluster..?
    Now and then we have another FileNotFoundException ERROR  in the tmp-directory. In what way are LC using this directory..?
    2014-09-18 23:33:58,067 ERROR [com.adobe.idp.Document] DOCS001: Unexpected exception. While doing first time passivation for a document..
    com.adobe.idp.DocumentError: java.io.FileNotFoundException: /tmp/AdobeDocumentStorage/local/docm1411075483830/c694140f75dc873cf6c26afd8e73f57e (No such file or directory)
    at com.adobe.idp.Document.passivateInitData(Document.java:1461)
    at com.adobe.idp.Document.passivate(Document.java:1241)
    at com.adobe.idp.DocumentCallback.handleRemotePassivation(DocumentCallback.java:145)
    at com.adobe.idp.DocumentCallback.handleRemotePassivation2(DocumentCallback.java:189)
    at com.adobe.idp._IDocumentCallbackImplBase._invoke(_IDocumentCallbackImplBase.java:71)
    at org.jacorb.orb.ORB$HandlerWrapper._invoke(Unknown Source)
    at org.jacorb.poa.RequestProcessor.invokeOperation(Unknown Source)
    at org.jacorb.poa.RequestProcessor.process(Unknown Source)
    at org.jacorb.poa.RequestProcessor.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: /tmp/AdobeDocumentStorage/local/docm1411075483830/c694140f75dc873cf6c26afd8e73f57e (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:120)
    at com.adobe.idp.Document.passivateInitData(Document.java:1457)
    ... 8 more

  • Problem with FileNotFoundException

    Hi. Sometimes in my application i have problems with FileNotFoundException, but file which i want to open exists. In the documentation I found that:"It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing." What can be another reason that the file is inaccessible?

    EJP wrote:
    That doesn't happen unless the file is currently in use ...I would have to dissagree with you there. Not frequently, but on occasioin, I have had windows just not release a lock that is has on a file. I've had this happen with various editors--Word and Notepad are ones that recently come to mind. It has also happened to me doing a copy from one folder to another. Windows Media Player has also expressed a problem and also Excel and Access. I have had these problems in Windows 7, XP, and other previous Windows versions. And please do not think this is limited to accessing a file with Java--it has expressed in various MS development tools and even just using MS products--no programming outside of the shrink wrap MS product was used.

  • File Making Directories Problem. java.io.FileNotFoundException

    When ever I run my program it is SUPPOSED to make the directories, instead it tells me the file doesn't exist and fails.
    Here is my Code:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package passworddatamacsetup;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JOptionPane;
    * @author jacobgarber
    public class Main {
         * @param args the command line arguments
        public static void main(String[] args) {
            try {
                File PasswordDATA = new File("/Applications/PasswordDATA");
                PasswordDATA.mkdirs();
                File passwords = new File("/Applications/PasswordDATA/PasswordFiles");
                passwords.mkdirs();
                File main = new File("./PasswordDATA_-_MAC.jar");
                File out = new File(PasswordDATA.getPath()+"/PasswordDATA.jar");
                copy(main, PasswordDATA);
                JOptionPane.showMessageDialog(null, "Framework setup complete!", "Completed!", JOptionPane.INFORMATION_MESSAGE);
            } catch(Exception ex) {
                JOptionPane.showMessageDialog(null, ex);
        // Copies src file to dst file.
        // If the dst file does not exist, it is created
        public static void copy(File src, File dst) throws IOException {
            try {
                InputStream in = new FileInputStream(src);
                OutputStream out = new FileOutputStream(dst);
                // Transfer bytes from in to out
                byte[] buf = new byte[1024];
                int len;
                while ((len = in.read(buf)) > 0) {
                    out.write(buf, 0, len);
                in.close();
                out.close();
            } catch (FileNotFoundException ex) {
                JOptionPane.showMessageDialog(null, ex);
    }Here is my exception:
    java.io.FileNotFoundException: /Applications/PasswordDATA

    This looks suspicious:
                File out = new File(PasswordDATA.getPath()+"/PasswordDATA.jar");
                copy(main, PasswordDATA);You probably meant:
                File out = new File(PasswordDATA.getPath()+"/PasswordDATA.jar");
                copy(main, out);

  • Deployment Problem (FileNotFoundException)

    Hi
    I use J2ee 1.2.1 & j2ee document 1.2.1 & Windows200
    I use java examples "examples\Converter"
    I can compile all class file and make new application
    and EJB
    But I can't deployment the Application when deployment
    process.
    It use messagebox tell me below:
    There was a deployment error.java.io.FileNotFoundException:http://<my IP>/ConverterAppClient.jar
    I found the ConverterAppClient.jar file at this path "
    c:\j2ee\reposition\<my computer name>\applications\"
    I want know
    1. how do I name the Clent jar file when Deployment?
    2. What funtion is reposition folder ?
    Thanks a lot
    David

    Is your CLASSPATH variable (in your autoexec.bat script) pointing to the correct location?
    Hi
    I use J2ee 1.2.1 & j2ee document 1.2.1 & Windows200
    I use java examples "examples\Converter"
    I can compile all class file and make new application
    and EJB
    But I can't deployment the Application when
    deployment
    process.
    It use messagebox tell me below:
    There was a deployment
    error.java.io.FileNotFoundException:http://<my
    IP>/ConverterAppClient.jar
    I found the ConverterAppClient.jar file at this path
    c:\j2ee\reposition\<my computer name>\applications\"
    I want know
    1. how do I name the Clent jar file when Deployment?
    2. What funtion is reposition folder ?
    Thanks a lot
    David

  • File and FileInputStream problem

    Hi all
    I have downloaded from developpez.com a sample code to zip files. I modified it a bit to suit with my needs, and when I launched it, there was an exception. So I commented all the lines except for the first executable one; and when it succeeds then I uncomment the next executable line; and so on. When I arrived at the FileInputStream line , the exception raised. When I looked at the code, it seemed normal. So I want help how to solve it. Here is the code with the last executable line uncommented, and the exception stack :
    // Copyright (c) 2001
    package pack_zip;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import oracle.jdeveloper.layout.*;
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    import java.text.*;
    * A Swing-based top level window class.
    * <P>
    * @author a
    public class fzip extends JFrame implements ActionListener{
    JPanel jPanel1 = new JPanel();
    XYLayout xYLayout1 = new XYLayout();
    JTextField szdir = new JTextField();
    JButton btn = new JButton();
    JButton bzip = new JButton();
         * Taille générique du tampon en lecture et écriture
    static final int BUFFER = 2048;
    * Constructs a new instance.
    public fzip() {
    super("Test zip");
    try {
    jbInit();
    catch (Exception e) {
    e.printStackTrace();
    * Initializes the state of this instance.
    private void jbInit() throws Exception {
    this.getContentPane().setLayout(xYLayout1);
         this.setSize(new Dimension(400, 300));
    btn.setText("btn");
    btn.setActionCommand("browse");
    btn.setLabel("Browse ...");
    btn.setFont(new Font("Dialog", 0, 14));
    bzip.setText("bzip");
    bzip.setActionCommand("zipper");
    bzip.setLabel("Zipper");
    bzip.setFont(new Font("Dialog", 0, 14));
    btn.addActionListener(this);
    bzip.addActionListener(this);
    bzip.setEnabled(false);
         this.getContentPane().add(jPanel1, new XYConstraints(0, 0, -1, -1));
    this.getContentPane().add(szdir, new XYConstraints(23, 28, 252, 35));
    this.getContentPane().add(btn, new XYConstraints(279, 28, 103, 38));
    this.getContentPane().add(bzip, new XYConstraints(128, 71, 103, 38));
    public void actionPerformed(ActionEvent e)
    if(e.getActionCommand() == "browse")
    FileDialog fd = new FileDialog(this);
    fd.setVisible(true);
    szdir.setText(fd.getDirectory());
    bzip.setEnabled(true);
    else
              * Compression
         try {
              // création d'un flux d'écriture sur fichier
         FileOutputStream dest = new FileOutputStream("Test_archive.zip");
              // calcul du checksum : Adler32 (plus rapide) ou CRC32
         CheckedOutputStream checksum = new CheckedOutputStream(dest, new Adler32());
              // création d'un buffer d'écriture
         BufferedOutputStream buff = new BufferedOutputStream(checksum);
              // création d'un flux d'écriture Zip
         ZipOutputStream out = new ZipOutputStream(buff);
         // spécification de la méthode de compression
         out.setMethod(ZipOutputStream.DEFLATED);
              // spécifier la qualité de la compression 0..9
         out.setLevel(Deflater.BEST_COMPRESSION);
         // buffer temporaire des données à écriture dans le flux de sortie
         byte data[] = new byte[BUFFER];
              // extraction de la liste des fichiers du répertoire courant
         File f = new File(szdir.getText());
         String files[] = f.list();
              // pour chacun des fichiers de la liste
         for (int i=0; i<files.length; i++) {
                   // en afficher le nom
              System.out.println("Adding: "+files);
    // création d'un flux de lecture
    FileInputStream fi = new FileInputStream(files[i]);
    /* // création d'un tampon de lecture sur ce flux
    BufferedInputStream buffi = new BufferedInputStream(fi, BUFFER);
    // création d'en entrée Zip pour ce fichier
    ZipEntry entry = new ZipEntry(files[i]);
    // ajout de cette entrée dans le flux d'écriture de l'archive Zip
    out.putNextEntry(entry);
    // écriture du fichier par paquet de BUFFER octets
    // dans le flux d'écriture
    int count;
    while((count = buffi.read(data, 0, BUFFER)) != -1) {
              out.write(data, 0, count);
                   // Close the current entry
    out.closeEntry();
    // fermeture du flux de lecture
              buffi.close();*/
    /*     // fermeture du flux d'écriture
         out.close();
         buff.close();
         checksum.close();
         dest.close();
         System.out.println("checksum: " + checksum.getChecksum().getValue());*/
         // traitement de toute exception
    catch(Exception ex) {
              ex.printStackTrace();
    And here is the error stack :
    "D:\jdev32\java1.2\jre\bin\javaw.exe" -mx50m -classpath "D:\jdev32\myclasses;D:\jdev32\lib\jdev-rt.zip;D:\jdev32\jdbc\lib\oracle8.1.7\classes12.zip;D:\jdev32\lib\connectionmanager.zip;D:\jdev32\lib\jbcl2.0.zip;D:\jdev32\lib\jgl3.1.0.jar;D:\jdev32\java1.2\jre\lib\rt.jar" pack_zip.czip
    Adding: accueil188.cfm
    java.io.FileNotFoundException: accueil188.cfm (Le fichier spécifié est introuvable.
         void java.io.FileInputStream.open(java.lang.String)
         void java.io.FileInputStream.<init>(java.lang.String)
         void pack_zip.fzip.actionPerformed(java.awt.event.ActionEvent)
         void javax.swing.AbstractButton.fireActionPerformed(java.awt.event.ActionEvent)
         void javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(java.awt.event.ActionEvent)
         void javax.swing.DefaultButtonModel.fireActionPerformed(java.awt.event.ActionEvent)
         void javax.swing.DefaultButtonModel.setPressed(boolean)
         void javax.swing.plaf.basic.BasicButtonListener.mouseReleased(java.awt.event.MouseEvent)
         void java.awt.Component.processMouseEvent(java.awt.event.MouseEvent)
         void java.awt.Component.processEvent(java.awt.AWTEvent)
         void java.awt.Container.processEvent(java.awt.AWTEvent)
         void java.awt.Component.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
         void java.awt.LightweightDispatcher.retargetMouseEvent(java.awt.Component, int, java.awt.event.MouseEvent)
         boolean java.awt.LightweightDispatcher.processMouseEvent(java.awt.event.MouseEvent)
         boolean java.awt.LightweightDispatcher.dispatchEvent(java.awt.AWTEvent)
         void java.awt.Container.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Window.dispatchEventImpl(java.awt.AWTEvent)
         void java.awt.Component.dispatchEvent(java.awt.AWTEvent)
         void java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent)
         boolean java.awt.EventDispatchThread.pumpOneEvent()
         void java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
         void java.awt.EventDispatchThread.run()
    Thank you very much

    One easy way to send a file through RMI is to read all bytes of a file to a byte array and send this array as a parameter of a remote method. But of course you may have problems with memory when you send large files. The receive is simillary.
    Other way is to split the file and getting slices of the file, sending slices and re-assemble at destination. This assume that the file isn't changed through the full transfering is concluded.
    I hope these could help you.

  • Arraylist.add() problem

    Hi,
    I'm trying to read a CSV text file into an arraylist.
    I can read the text file fine, its just when it gets to the actual arraylist.add() part it just .. .. doesn't work. It can print the values from the CSV file no problem. I'm sure my syntax is fine, everything compiles. I've read it and double checked it and checked it again.
    It just doesn't work .. I don't know why.
    The arraylist I am trying to read into is
    ArrayList<Customer> customers = new ArrayList<Customer>();Within other parts of the program I can read in dummy data, eg
    customers.add(new Customer(01, "Jims Mowing", "16 Long Grass Street", "Thorndale", "123-4567", "[email protected]"));
    but suffice to say, yes, it is kaput.
       * READING THE CUSTOMER TEXT FILE INTO THE ARRAY LIST
      private void custFileToArray ()
        RectangleTUI results = new RectangleTUI(); // create results object
        try   
          BufferedReader inputStream = new BufferedReader(new FileReader(PATHNAME + CUSTFILE));
          System.out.println("Contents of file: " + CUSTFILE); // print heading
          String line = inputStream.readLine(); // read first line
          while (line !=null) // test for end of file (EOF)
            results.loadCustFile(line);       
            line = inputStream.readLine(); // read next line
          // close file
          inputStream.close();
        // catch any file open errors
        catch(FileNotFoundException e)
          System.out.println("Error opening file: " + CUSTFILE);
          System.exit(0);
        catch(NoSuchElementException e)
          System.out.println("ATTENTION: One or more " + CUSTFILE + " records are missing data");
        // catch any file reading errors
        catch(IOException e)
          System.out.println("Error reading from file: " + CUSTFILE);
          System.exit(0);
        System.out.println("File Reading Complete");  
      private void loadCustFile(String textLine)
        String delimiters = ","; // set tokenizer delimiter
        StringTokenizer RecordFields = new StringTokenizer(textLine,delimiters);  
        int cidNum = Integer.parseInt(RecordFields.nextToken()); // Customer ID
        System.out.println(cidNum + " Hello I am a stupid piece of code. I don't like to work properly");
        String cName = RecordFields.nextToken();   // Name
        String cAdd = RecordFields.nextToken();   // Street Address
        String cBurb = RecordFields.nextToken();   // Suburb
        String cPhone = RecordFields.nextToken();   // Phone
        String cEmail = RecordFields.nextToken();   // Email
        customers.add(new Customer(cidNum, cName, cAdd, cBurb, cPhone, cEmail));
      }

    Cowzor wrote:
    Hi,
    Cheers for the replies & the printStackTrace tip.
    The thing is it's not actually throwing up any errors or crashing. It's acting as if everything is AOK - but since it then says there's nothig in the arraylist there must be a problem ... somewhere.
    Sorry if I've mis-understood what you were saying
    Here's the dummy data I'm using just incase it's at all relevant
    200701,Jims Mowing,16 Long Grass Street,Thorndale,123-4567,[email protected]
    200702,Chevy Racers,2 Raceway Drive,Boganville,123-4567,[email protected]
    200703,Renta Dent,82 Airport Oaks Road,Airport Oaks,123-4567,[email protected]
    200704,Discount Taxis,8 Poor Place,Otara,123-4567,[email protected]
    u split contains of CSV file on basis of , (comma) and read it

  • Java Threads Problem

    Hi, I am trying to write a simple java threads program where in one thread reads a file and another thread writes the data into a second file....
    Here is my code, although i think i am correct, my program still runs in a sequential fashion help help help!!!
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    class MyThread extends Thread{
    private int a;
    private int c;
    FileInputStream in;
    FileOutputStream out;
    public MyThread(int a){
    this.a = a;
    public void run(){
    if(this.a==5)
         try {
         in = new FileInputStream("Britney.txt");
    } catch (FileNotFoundException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
    try {
         while((c=in.read())!=-1)
              a = (char) c;
              System.out.println(a);
    catch (IOException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
    if(this.a==10)
         try {
              out = new FileOutputStream("romi.txt");
         } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         for(int i = 0;i<50;i++)
              try {
                   System.out.println(c);
                   out.write(c);
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    class MainMyThread{
    public static void main(String args[]){
    MyThread thr1, thr2;
    thr1 = new MyThread(5);
    thr2 = new MyThread(10);
    thr1.start();
    thr2.start();
    }

    Encephalopathic wrote:
    malcolmmc wrote:
    ... Chances of getting any kind of reply except "me too" can be pretty remote. ....there's actually a better chance of getting a reply on a general forum like this one, ....Can't you just post in both the narrow and the general forum, but include links one to the other in each thread? Or is that against the forum rules/etiquette? Most people here are ok with a crosspost IF those links are included.
    I would also ask that the OP designate one of those threads as the real discussion thread and just direct folks there from the other threads, so that we have one coherent discussion. If he does that, there's no problem with trying to reach out to as broad an audience as possible.
    I would figure that if the poster were upfront about what they are doing, folks wouldn't mind, but I could be wrong.I think that's generally the case. As long as the discussion is confined to one thread (and pointed there from the crossposts) or at the very least all the participants can see all the discussions, I think most people don't have a problem with it. It's when we waste our time answering when he's already got the answer elsewhere that's annoying.

  • Problem with ArrayList

    Hello,
    I am having a problem with a program I am trying to write. The idea of the program is to:
    A) read a list of movies list from a text file
    B) create an object for each movie using the information from the text file
    C) place the objects into an arrayList
    My problem is that when I check my arrayList it seems to only contain multiple copies of the first movie read from the text file. Here is my code
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.io.FileOutputStream;
    import java.io.FileNotFoundException;
    import java.util.ArrayList;
    public class MovieReader
         PrintWriter outputStream = null;
         public void readFile()
              try
                      BufferedReader in = new BufferedReader(new FileReader("movie.txt"));
                      String str;
                      while ((str = in.readLine()) != null)
                           process(str);
                      in.close();
              catch (IOException e)
                  e.printStackTrace();
         ArrayList <ValidMovie> movieList = new ArrayList<ValidMovie>();
         private void process(String line)
              String[] array = line.split("\t");
              int i = 0;
              for ( i = 0; i < array.length; i++)
                   String tempTitle = array[0];
                   String tempYear = array [1];
                   String tempRating = array [2];
                   String tempFormat = array [3];
                   ValidMovie uuj = new ValidMovie(tempTitle, tempYear, tempRating, tempFormat);
                   movieList.add(uuj);
              System.out.println("item at index 1 is:   " + movieList.get(1));
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         private void writeFile(String [] arrayL)
              String [] arrayWrite = arrayL;
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
    //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
         public static void main(String[] args)
              MovieReader mv = new MovieReader();
              mv.readFile();
    //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    }This is the code that creates an object for each movie:
    import java.io.Serializable;
    public class ValidMovie implements Serializable
         private String title;
         private String year;
         private String rating;
         private String format;
         public ValidMovie()
         public ValidMovie(String tTitle, String tYear, String tRating, String tFormat)
              title = tTitle;
              year = tYear;
              rating = tRating;
              format = tFormat;
         //Getters for title, year, rating and format
         public String getTitle ()
              return title;
         public String getYear ()
              return year;
         public String getRating ()
              return rating;
         public String getFormat ()
              return format;
         public String toString ()
              return title + "\t" + year + "\t" + rating + "\t" + format;
    }The following is what I have in the movie.txt file:
    Bamboozled     2000     2     DVD
    What Lies Beneath     2000     1.5     DVD
    Beneath the Planet of the Apes     1970     1     DVD
    You Can Count On Me     2000     3.5     Theater
    And finally this is the result when I run the code:
    item at index 1 is: Bamboozled     2000     2     DVD
    item at index 1 is: Bamboozled     2000     2     DVD
    item at index 1 is: Bamboozled     2000     2     DVD
    item at index 1 is: Bamboozled     2000     2     DVD
    I am sure that it is something simple that I am overlooking but I cannot figure it out. When I change the index in the code:
    System.out.println("item at index 1 is:   " + movieList.get(1));to 0 or 2 or 3 then result is the same, it will just show the first movie in the text file. Any help would be greatly appreciated. Thanks

    Thanks for the reply, it helped but I am now getting 4 of each of the movies after adding you suggestion. This is much better now I just need to figure out why the loop is causing the extra copies. Thanks again :)
    Item 0: Bamboozled     2000     2     DVD
    Item 1: Bamboozled     2000     2     DVD
    Item 2: Bamboozled     2000     2     DVD
    Item 3: Bamboozled     2000     2     DVD
    Item 4: What Lies Beneath     2000     1.5     DVD
    Item 5: What Lies Beneath     2000     1.5     DVD
    Item 6: What Lies Beneath     2000     1.5     DVD
    Item 7: What Lies Beneath     2000     1.5     DVD
    Item 8: Beneath the Planet of the Apes     1970     1     DVD
    Item 9: Beneath the Planet of the Apes     1970     1     DVD
    Item 10: Beneath the Planet of the Apes     1970     1     DVD
    Item 11: Beneath the Planet of the Apes     1970     1     DVD
    Item 12: You Can Count On Me     2000     3.5     Theater
    Item 13: You Can Count On Me     2000     3.5     Theater
    Item 14: You Can Count On Me     2000     3.5     Theater
    Item 15: You Can Count On Me     2000     3.5     Theater

  • Reading into ArrayList problem - what is wrong?

    Hi, I am trying to read a list of strings into an ArrayList and am having some problems. I have created a main() which at the moment does nothing, its just to make sure that the array's content is genuine (meaning consistent with the string in the text file) so I am having it simply printed out to screen. The error I am getting is "cannot resolve symbol, variable array" by my compiler (Jcreator). I will paste the code below:
    import java.io.*;
    import java.util.*;
    public class hostList{
    public hostList()
    try
    File input = new File("hosts.txt");
    BufferedReader in=new BufferedReader(
         new InputStreamReader(new FileInputStream(input)));
         ArrayList list=new ArrayList();
         String line;
         while((line=in.readLine())!=null)
              list.add(line);
         String[] array=new String[list.size()];
         list.toArray(array);
         in.close();
    catch(FileNotFoundException e)
    System.err.println("File not found...");
    catch(IOException e)
    System.err.println("IO Problem");
    }//hostLst()
         public static void main (String [] args){
              System.out.println("Array content:");
              System.out.println("array " + array[0]);
              for (int i=0; array[i] !=null; i++)
                   System.out.println(array);
         }//main
    }//class
    Also, how would I use the array objects in another class, say class B. How can I access the arrays in class B so that i can use its methods? eg. array[i].doSomething(); where doSomething() is a method in class B. What libraries would i need to import (if any) ?
    Help is appreciated, thanks.

    this code wont compile bcas in main method u r not creating the object of this class also the var array is not globally declared hence wont be accesibile outside
    u can try this modified code
    import java.io.*;
    import java.util.*;
    public class hostList{
    String[] array=null;
    public hostList()
    try
    File input = new File("hosts.txt");
    BufferedReader in=new BufferedReader(
    new InputStreamReader(new FileInputStream(input)));
    ArrayList list=new ArrayList();
    String line;
    while((line=in.readLine())!=null)
    list.add(line);
    array=new String[list.size()];
    list.toArray(array);
    in.close();
    catch(FileNotFoundException e)
    System.err.println("File not found...");
    catch(IOException e)
    System.err.println("IO Problem");
    }//hostLst()
    public static void main (String [] args){
    hostList h=new hostList();
    System.out.println("Array content:");
    System.out.println("array " + h.array[0]);
    }//main
    }//class

  • [Solved] Installation problem on HP-UX

    Hi there,
    I try to install Oracle Database 10g Release 2 on an HP-UX system.
    You'll find below the result of uname -a if it can help.
    HP-UX c3750 B.11.11 U9000/785 2015203204 unlimited-user licenseWhen I run "runInstaller" in a terminal, here is what is being displayed.
    Starting Oracle Universal Installer...
    Checking installer requirements...
    Checking operating system version: must be B.11.23 or B.11.11.    Actual B.11.11
                                          Passed
    All installer requirements met.
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-03-22_12-13-41PM. Please wait ...$ Oracle Universal Installer, Version 10.2.0.1.0 Production
    Copyright (C) 1999, 2005, Oracle. All rights reserved.Then, I got a new window appearing asking me where to install Oracle DB and if I want to create a database.
    Of course, I leave the default choice for the installation directory (the oracle $HOME is correctly setup and selected)
    Then, when I press "Next", the window closes and here is what I have in the terminal. ps : The same thing is happening if I decide to create a database or not.
    java.io.FileNotFoundException: /tmp/OraInstall2012-03-22_12-13-41PM/oui/instImages/images.properties (No such file or directory)
            at java.io.FileInputStream.open(Native Method)
            at java.io.FileInputStream.<init>(FileInputStream.java:106)
            at java.io.FileInputStream.<init>(FileInputStream.java:66)
            at oracle.sysman.oii.oiif.oiifm.OiifmSplashScreen.loadProperties(OiifmSplashScreen.java:444)
            at oracle.sysman.oii.oiif.oiifm.OiifmSplashScreen.<clinit>(OiifmSplashScreen.java:93)
            at oracle.sysman.oii.oiif.oiifm.OiifmGraphicInterfaceManager.<init>(OiifmGraphicInterfaceManager.java:259)
            at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.createInterfaceManager(OiicSessionInterfaceManager.java:193)
            at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.getInterfaceManager(OiicSessionInterfaceManager.java:202)
            at oracle.sysman.oii.oiic.OiicInstaller.getInterfaceManager(OiicInstaller.java:436)
            at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:926)
            at oracle.sysman.oio.oioc.OiocOneClickInstaller.runInstaller(OiocOneClickInstaller.java:1957)
            at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:2185)
    Exception java.lang.ExceptionInInitializerError occurred..
    java.lang.ExceptionInInitializerError
            at oracle.sysman.oii.oiif.oiifm.OiifmGraphicInterfaceManager.<init>(OiifmGraphicInterfaceManager.java:259)
            at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.createInterfaceManager(OiicSessionInterfaceManager.java:193)
            at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.getInterfaceManager(OiicSessionInterfaceManager.java:202)
            at oracle.sysman.oii.oiic.OiicInstaller.getInterfaceManager(OiicInstaller.java:436)
            at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:926)
            at oracle.sysman.oio.oioc.OiocOneClickInstaller.runInstaller(OiocOneClickInstaller.java:1957)
            at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:2185)
    Caused by: java.lang.NumberFormatException: null
            at java.lang.Integer.parseInt(Integer.java:436)
            at java.lang.Integer.<init>(Integer.java:609)
            at oracle.sysman.oii.oiif.oiifm.OiifmSplashScreen.<clinit>(OiifmSplashScreen.java:103)
            ... 7 more
    Exception in thread "main" java.lang.NoClassDefFoundError
            at oracle.sysman.oii.oiif.oiifm.OiifmGraphicInterfaceManager.<init>(OiifmGraphicInterfaceManager.java:259)
            at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.createInterfaceManager(OiicSessionInterfaceManager.java:193)
            at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.getInterfaceManager(OiicSessionInterfaceManager.java:202)
            at oracle.sysman.oii.oiif.oiifm.OiifmAlert.<clinit>(OiifmAlert.java:151)
            at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:984)
            at oracle.sysman.oio.oioc.OiocOneClickInstaller.runInstaller(OiocOneClickInstaller.java:1957)
            at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:2185)And that's it, nothing more is happening :(.
    After searching on the internet, some messages said it might be because the dowload is corrupted, so they suggested to download it again. I have done so but the same problem appears again.
    Have you got any idea what is going wrong there.
    Thank you VERY much in advance and sorry for my bad English (this is not my native language).
    Edited by: 916761 on 23 mars 2012 03:36

    Hi;
    You have to login https://support.oracle.com/CSP/ui/flash.html and you have to CSI account.
    This site is oracle site for tech. documents for can rise SR etc.. for more details please check Re: Installing Oracle Database 10.2.0.4
    you need to customer support identifier which is called CSI for can login metalink(https://support.oracle.com/CSP/ui/flash.html)
    If you dont have metalink account there is no legal way to see this doc
    Pretty simple process:
    1) You purchase a perpetual or term license from Oracle;
    2) At the beginning of the period, during the valid term you purchase
    Support for the period (1 year);
    3) Oracle sends you the CSI.
    Easy to do at http://store.oracle.com armed with a credit card.
    Sorry, I'm sure you'll think I'm stupidNo I dont think mate :)
    Regard
    Helios

  • RE: [iPlanet-JATO] Re: Deployment problem

    Chidu,
    I think that you are mired in the very common confusion of the default
    behavior of the ApplicationServletBase.parsePathInfo() which will determine
    the controlling/handling ViewBean via a URL design pattern. Lets take a look
    at the URL
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp
    is decomposed as follows:
    /NASApp -> well, this is long story but is absolutely necessary, welcome to
    iAS
    /MigtoolboxSampleAppWar -> is the web application name, taken as the name of
    the WAR file when there is no EAR file (this allows the Servlet/JSP
    container to deferences the web application root under
    <ias>/APPS/modules/MigtoolboxSampleAppWar) I think this part of the URL is
    called th Context Path
    /MigtoolboxSample -> is the Servlet Path, and will either directly reference
    or match a Servlet Mapping
    for instance
    <servlet-mapping>
    <servlet-name>MigtoolboxSampleServlet</servlet-name>
    <url-pattern>/MigtoolboxSample/*</url-pattern>
    </servlet-mapping>
    tells the Servlet Container that the Servlet Path
    /MigtoolboxSample
    maps to the Module Servlet MigtoolboxSampleServlet
    This is how EVERY request makes its way to the "front controller" pattern in
    JATO. It is fundamental to JATO Applicatioan that every request pass
    through the ModuleServlet.
    every else on the URL past the Servlet Path is the PATH INFO. Based on this
    understanding, you will see why the
    ApplicationServletBase.parsePathInfo()
    is so important. In parsePathInfo() the PATH INFO is compared to the design
    pattern
    /VIEWBEANNAME*
    to determine the handling ViewBean from the first String Token in the path
    info. For instance, the starting URL of the Sample Application is
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage
    The PATH INFO is [IndexPage]
    and IndexPage[ViewBean] is the handling ViewBean. Therefore, any simiarl
    URL like
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.matt
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.mike
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.chidu
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.XXX
    will all result in the same handling View Bean
    IndexPageViewBean
    It is very important to understand that you CANNOT hit the JATO JSPs
    directly. You must hit the "front controller" ModuleServlet which will
    always delegate control to the handling ViewBean (a la, the "service to
    workers" pattern)
    You can attempt to hit the JSP directly but you need the right J2EE URL
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSampleApp/MigtoolboxSample/IndexPag
    e.jsp
    this URL will directly hit the JSP. However, you will recieve an error
    because the JATO framework quickly determines that there is no
    RequestContext in the HttpRequest attributes and assumes that the "front
    controller" was bypassed. Try it. You will get ERROR.
    Lets go back to what you are trying to do, place Models and Viewbeans in
    separate directories. I recommend that you move the Models. Models are
    ONLY referenced by TYPE via the ModelManager, the compiler will ensure that
    your code is correct and matches the packages, file locations, import
    statements, etc. ViewBeans, on the other hand are related to the
    ModuleServlet their are contained in and are loaded via type names according
    to a design pattern.
    if you want to separate models and Viewbean then simply move the Model and
    make sure everything compiles.
    you cannot move the ViewBeans
    if you do want to move the JSP peers of the Viewbeans, then you can put them
    anywhere in the web application doc root. When you do, update the
    DEFAULT_DISPLAY_URL as Mike suggested
    matt
    -----Original Message-----
    From: Mike Frisino [mailto:<a href="/group/SunONE-JATO/post?protectID=174176219122158198138082063148231088239026066196217193234150166091061">Michael.Frisino@S...</a>]
    Sent: Thursday, July 26, 2001 10:48 PM
    Subject: Re: [iPlanet-JATO] Re: Deployment problem
    Chidu,
    Did you have it running fine in the original default configuration, before
    you started changing things around? The URL should not access the .jsp
    directly. The URL should look more like this
    "/NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage", without the
    .jsp.
    Also, please read the "Migration Tech Notes" document that is
    linked to the
    main doc index page. There is some information in there related
    to trying to
    run the sample application under iAS (see Tech Note 4 in
    particular, "Note
    on running the iMT "MigtoolboxSample" in iPlanet Application Server )
    ----- Original Message -----
    From: <<a href="/group/SunONE-JATO/post?protectID=219015020150194233215218164140244063078048234051197">chidusv@y...</a>>
    Sent: Thursday, July 26, 2001 7:27 PM
    Subject: [iPlanet-JATO] Re: Deployment problem
    Hi Mike,
    I tried changing the url in all the viewbeans to reflect the new sub-
    directory for the viewbeans(I have placed the jsps and viewbeans in
    a sub-directory under MigtoolboxSampleApp/MigtoolboxSample). But I'm
    still not able to get access to the jsps. I basically see the
    message "GX Error Socket Error Code missing!!" error on the browser
    thrown by iPlanet, but the log doesn't tell me anything. Does the url
    which I give to access the jsp change accordingly, i.e., should I
    give something other
    than /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp.
    If I try to use any other url other
    than /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp, I
    see the FileNotFoundException in the log.
    I guess I'm still missing something.
    Thanks for your help.
    --Chidu.
    --- In <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166136158139046209">iPlanet-JATO@y...</a>, "Mike Frisino" <<a href="/group/SunONE-JATO/post?protectID=174176219122158198138082063148231088239026066196217130152150">Michael.Frisino@S...</a>> wrote:
    Chidu.
    Did you also adjust the following member in each of the ViewBeans?
    public static final String DEFAULT_DISPLAY_URL=
    "/jatosample/module1/Index.jsp";
    Try adjusting this to be consistent with your new hierarchy.
    Also, if you still have problems, send us the error message thatyou recieve
    when you try to access the page. That would help.
    ----- Original Message -----
    From: <<a href="/group/SunONE-JATO/post?protectID=219015020150194233215218164036129208">chidusv@y...</a>>
    Sent: Thursday, July 26, 2001 4:48 PM
    Subject: [iPlanet-JATO] Deployment problem
    Hi,
    We have a requirement to seperate the models and viewbeans and
    keep
    them in seperate directories. Is it possible to seperate the
    viewbeans and models not be in the same directory?
    I tried seperating the two in the MigtoolboxSampleApp application
    provided by JATO. I changed the package and import statements
    accordingly in the viewbeans, jsps and the models. But when I
    deployed the application, I'm not able to access the Index page or
    any of the jsps. Does the ApplicationServletBase always look forthe
    viewbean in the same path as that of the module servlet?
    Any help will be appreciated.
    Thanks,
    Chidu.
    <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215146166214017110250006230056039126077176105140127082088124241215002153">[email protected]</a>
    <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215146166214017110250006230056039126077176105140127082088124241215002153">[email protected]</a>
    <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215146166214017110250006230056039126077176105140127082088124241215002153">[email protected]</a>

    Hi Mike,
    I tried changing the url in all the viewbeans to reflect the new sub-
    directory for the viewbeans(I have placed the jsps and viewbeans in
    a sub-directory under MigtoolboxSampleApp/MigtoolboxSample). But I'm
    still not able to get access to the jsps. I basically see the
    message "GX Error Socket Error Code missing!!" error on the browser
    thrown by iPlanet, but the log doesn't tell me anything. Does the url
    which I give to access the jsp change accordingly, i.e., should I
    give something other
    than /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp.
    If I try to use any other url other
    than /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp, I
    see the FileNotFoundException in the log.
    I guess I'm still missing something.
    Thanks for your help.
    --Chidu.
    --- In iPlanet-JATO@y..., "Mike Frisino" <Michael.Frisino@S...> wrote:
    >
    Chidu.
    Did you also adjust the following member in each of the ViewBeans?
    public static final String DEFAULT_DISPLAY_URL=
    "/jatosample/module1/Index.jsp";
    Try adjusting this to be consistent with your new hierarchy.
    Also, if you still have problems, send us the error message that you recieve
    when you try to access the page. That would help.
    ----- Original Message -----
    From: <chidusv@y...>
    Sent: Thursday, July 26, 2001 4:48 PM
    Subject: [iPlanet-JATO] Deployment problem
    Hi,
    We have a requirement to seperate the models and viewbeans and
    keep
    them in seperate directories. Is it possible to seperate the
    viewbeans and models not be in the same directory?
    I tried seperating the two in the MigtoolboxSampleApp application
    provided by JATO. I changed the package and import statements
    accordingly in the viewbeans, jsps and the models. But when I
    deployed the application, I'm not able to access the Index page or
    any of the jsps. Does the ApplicationServletBase always look for the
    viewbean in the same path as that of the module servlet?
    Any help will be appreciated.
    Thanks,
    Chidu.
    [email protected]

  • Problem with downloading file from FTP server

    Hello all
    I have uploaded a file from an application i developed and i want to download this file from another application. The code is
    public static void FTPcon() throws FtpException{
       String hostname = "my.ftp.server";
       String username = "myusername";
       String password = "mypass";
       Ftp ftp = new Ftp(hostname,username,password);
       ftp.setHostname(hostname);
            ftp.setUsername(username);
            ftp.setPassword(password);
            ftp.connect();
            ftp.setBinary();
            ftp.download("file.dat");
            ftp.disconnect();
    }The error i receive is java.io.FileNotFoundException: public.dat (The system cannot find the file specified) but the file is on the server.
    Thanks in advance for any help

    Cotton thank you for your reply
    Any other sugestions please?The server disagrees. So...
    - the file does not existThe file exists.I checked it with an FTP client program.
    - the file has a different nameThe file name is correct
    - you are connected to the wrong serverI am connecting to the correct server
    - you are in the wrong ftp directoryThe file is placed in the home directory
    - the ftp library you are using is broken (less
    likely)I am using the library from jscape.I dont think is broken because i can upload the file from the first application.
    >
    FTP isn't somehow broken in Java. I use it all the
    time. The problem is something listed above. I would
    check all of the first four if I were you because
    that's most likely where the problem is.Message was edited by:
    flightcaptain

  • Redeploying an EJB onto OAS 4.0.8.2 from JDev 3.1 - problem

    My previous message should have had in the topic, OAS 4.0.8.2 instead of OAS 4.0.8.3.
    So, I'll explain my problem again:
    I'm trying to redeploy an EJB onto the OAS, and I get the following error:
    java.io.FileNotFoundException: D:\OraHome1\ows\4.0\..\apps\ejb\ChartBean\_client.jar (The requested operation cannot be performed on a file with a user mapped section open)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:62)
    at sun.tools.jar.Main.run(Main.java:96)
    at sun.tools.jar.Main.main(Main.java:760)
    at java.lang.reflect.Method.invoke(Native Method)
    at oracle.oas.tools.util.JarGenerator.createJar(Compiled Code)
    at oracle.oas.tools.util.CreateJars.main(Compiled Code)
    Creation of client jar for D:\\OraHome1\\ows\\upload\\1219ChartBeanSource.jar failed!
    I tried to go delete the client.jar file from the OAS machine, and it won't let me saying it is a sharing violation (File is in use). I deleted the EJB from the OAS, stopped the OAS, and still I cannot delete the client.jar file.
    First, why couldn't I redeploy, and second, how do I delete the _client.jar file?
    Thanks!
    null

    Hi clytle,
    I have problem about EJB,maybe you can
    help me.I use JDeveloper 3.0 to developer EJB
    and deploy it to OAS 4.0.8.1 successful. But
    the error message(show at below) always occur
    when I run the EJB client program eyerytime.
    I have no idea about this.Could you have any
    suggestion or solution about this? Have anyone else can help me?
    james 2000/6/30
    The error message :
    Root exception is org.omg.CORBA.NO_IMPLEMENT: minor code: 0 completed: No]javax.naming.ServiceUnavailableException
    java.lang.Object oracle.oas.jndi.oas.SecCosNamingContext.resolve(javax.naming.Name, java.util.Hashtable)
    java.lang.Object oracle.oas.jndi.oas.BeanContext.lookup(javax.naming.Name, java.util.Hashtable)
    java.lang.Object oracle.oas.jndi.oas.BeanInitialContext.resolve(javax.naming.Name, java.util.Hashtable)
    java.lang.Object oracle.oas.jndi.oas.BeanContext.lookup(javax.naming.Name, java.util.Hashtable)
    java.lang.Object oracle.oas.jndi.oas.BeanInitialContext.lookup(javax.naming.Name, java.util.Hashtable)
    java.lang.Object oracle.oas.jndi.oas.WrapperContext.lookup(javax.naming.Name)
    java.lang.Object oracle.oas.jndi.oas.BeanContext.lookup(java.lang.String)
    java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
    void SimpleEJB.SimpleEJBClient.main(java.lang.String[])
    null

Maybe you are looking for