Java.lang.NoSuchMethodError: main

I am still trying to read a csv file, but getting an error, see subject.
I think I nust go on a course as I just can't believe that it's thar hard just to read a simple csv file in java.
Can anybody recommend a good course that will explain all.
This is my source code, personaly I think it's in a mess....
package CsvReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
public class CsvReader {
     public CsvReader(FileReader fileReader) {
          // TODO Auto-generated constructor stub
     public static void main(String[] args,
          CsvReader CsvReaderthrows) throws FileNotFoundException
          CsvReader reader = new CsvReader(new FileReader("cash 20 feb 2009.csv"));
     String [] nextLine;
     while ((nextLine = reader.readNext()) != null) {
     // nextLine[] is an array of values from the line
     System.out.println(nextLine[0] + nextLine[1] );
     private String[] readNext() {
          // TODO Auto-generated method stub
          return null;
Help will bbe appreciated.
Joo

this should keep you busy for a while.
package forums;
import java.util.Date;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import java.io.Closeable;
import java.io.File;
import java.io.FileReader;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
class ParseException extends RuntimeException {
  private static final long serialVersionUID = 1L;
  ParseException(String message, Throwable cause) { super(message, cause); }
class CashReceipt
  private int receiptNumber;
  private Date dateReceived;
  private String whoFrom;
  private String whatFor;
  private double amount;
  public CashReceipt(int receiptNumber, Date dateReceived, String whoFrom, String whatFor, double amount) {
    this.receiptNumber = receiptNumber;
    this.dateReceived = dateReceived;
    this.whoFrom = whoFrom;
    this.whatFor = whatFor;
    this.amount = amount;
  public int getReceiptNumber() { return this.receiptNumber; }
  public void setReceiptNumber(int receiptNumber) { this.receiptNumber = receiptNumber; }
  public Date getDateReceived() { return this.dateReceived; }
  public void setDateReceived(Date dateReceived) { this.dateReceived = dateReceived; }
  public String getWhoFrom() { return this.whoFrom; }
  public void setWhoFrom(String from) { this.whoFrom = whoFrom; }
  public String getWhatFor() { return this.whatFor; }
  public void setWhatFor(String whatFor) { this.whatFor = whatFor; }
  public double getAmount() { return this.amount; }
  public void setAmount(double amount) { this.amount = amount; }
  @Override
  public String toString() {
    return "CashReceipt: "
      +" receiptNumber=\""+getReceiptNumber()+"\""
      +" dateReceived=\""+getDateReceived()+"\""
      +" whoFrom=\""+getWhoFrom()+"\""
      +" whatFor=\""+getWhatFor()+"\""
      +" amount=\""+getAmount()+"\""
interface LineParser<E> {
  E parse(String line) throws ParseException;
class CashReceiptCsvLineParser implements LineParser<CashReceipt>
  public static String fieldSeperator = "\\s*,\\s*";
  public static String dateFormat = "yyyy-MM-dd";
  private DateFormat dateParser = null;
  public CashReceiptCsvLineParser() {
    dateParser = new SimpleDateFormat(dateFormat);
  public CashReceipt parse(String line) throws ParseException {
    String[] fields = line.split(fieldSeperator);
    try {
      return new CashReceipt(          // We recieved some money:
          Integer.valueOf(fields[0])   // * receipt-number
        , dateParser.parse(fields[1])  // * when
        , fields[2]                    // * who from
        , fields[3]                    // * what for
        , Double.valueOf(fields[4])    // * how much
    } catch (Exception e) {
      throw new ParseException("Unparsable: "+line, e);
interface LineReader<E> extends Closeable {
  public E read() throws IOException;
class GenericLineReader<E> implements LineReader<E>
  private BufferedReader reader = null;
  private LineParser<E> parser = null;
  public GenericLineReader(BufferedReader reader, LineParser<E> parser) {
    this.reader = reader;
    this.parser = parser;
  public E read() throws IOException {
    String line = reader.readLine();
    if(line==null) return null;
    return parser.parse(line);
  public void close() throws IOException {
    if(reader!=null) reader.close();
    reader = null;
}... PTO ...

Similar Messages

  • Exception in thread "main" java.lang.NoSuchMethodError: main -- Help

    I am new to Java programming and I have been working out of a book trying to learn the language. I am working on a Ubuntu system using Eclipse. I get an error when I try to run this app. It is: Exception in thread "main" java.lang.NoSuchMethodError: main. I have Googled it and read different possible solutions, but none have helped. Can someone help me solve this?
    Here is the code for battleshipGameTestDrive.java:_
    import java.util.ArrayList;
    public class battleshipGameTestDrive
         public static void main(String[] args, ArrayList<String> locations)      
              int numOfGuesses = 0;
              boolean isAlive = true;
              GameHelper helper = new GameHelper();
              battleshipGame ship = new battleshipGame();
              for (int ctr = 1; ctr < 4; ctr++)
                   int randomNum = (int) (Math.random() * 5);          
                   locations.add(Integer.toString(randomNum));
                   ship.setLocationCells(locations);
              while (isAlive == true){
                   String userGuess = helper.getUserInput("Enter a number (1-7): ");
                   numOfGuesses++;
                   String result = ship.checkYourself(userGuess);
                   if (result.equals("kill")){
                        isAlive = false;
                        System.out.println("You took " + numOfGuesses + " guesses");
                   } // close result if
              }  //end while loop
         }// end of main
    }// end of battleshipGameTestDrive class
    Here is the code for the battleshipGame class.java:_
    import java.util.ArrayList;
    public class battleshipGame {
         private ArrayList<String> locationCells;
         public void setLocationCells(ArrayList<String> loc){
              locationCells = loc;
         public String checkYourself(String userInput){
              String result = "miss";          
              int index = locationCells.indexOf(userInput);
              if (index >= 0){
                   locationCells.remove(index);
                   if (locationCells.isEmpty()){
                        result = "kill";
                   }else{
                        result = "hit";
                   }// close if
              }// closer outer if
              return result;
         }     //close method
    }     //close class

    Hello,
    I saw your short message youe sent to someone who had a problem : Exception in thread "main" java.lang.NoSuchMethodError :main
    So I was thinking maybe you could help me I struggle with this code fro 3weeks, this is a code I save it later as
    import java.awt.*;
    import java.awt.event.*;
    class Party {
    public void makeInvitation(){
    Frame f = new Frame();
    Label l = new Label("Party at Tom's");
    Button b = new Button("Sure");
    Button c = new Button("Noo...");
    Panel p = new Panel();
    p.add(l);
    I write this code in Notepad++ than I save it as java file with looks like this : Java source file (*.java)
    - than in Command Prompt I write : javac Party.java as usual and it comes with this error below Exception in thread "main" .......
    I have no idea what's wrong with it.Can you help me
    Thank you in advance

  • Java.lang.NoSuchMethodError: main, only when I run project, not file

    When I am running my project to test it I am getting the following error message.
    Exception in thread "main" java.lang.NoSuchMethodError: main
    I have checked all the files are in the corrcet place, and all called what the class is called, which they are, I do not know where else to look. And I have to hjand this in is a week and a half!!!
    Also, the error only happens when I run the PROJECT and not when I run the file on its own. Below is the code. Does anyone have any ideas to help me?
    public class ToolList
         private Tool[] toolArray;
         public ToolList()
              toolArray = new Tool[100];
              for (int i=0;i<toolArray.length;i++)
                   toolArray=null;
         }//end toolList default constructor
         public boolean addTool (Tool toolIn)
              for (int i=0;i<toolArray.length;i++)
                   if (toolArray[i]==null)
                        toolArray[i]=toolIn;
                        return true;
              return false;
         public static void main(String args[])
                   Tool Hammer = new Tool("Hammer","H0001",16.45F);
                   ToolList tl1 = new ToolList();
                   if (tl1.addTool(Hammer) ) System.out.println("Tool added");
    Thanks
    Java Chick :)

    Thanks all!
    "Java has no concept of a 'project' so I assume that you are using an IDE for development. Most IDEs have a 'project' concept and some means of defining the 'main' class for the 'project'. Which IDE are you using?
    I am using JCreator V3 LE. I have many files set up, Tool.java, ToolList.java, Company.java, Customer.java and CustomerList.java.
    At the moment I am just tesing each class as I go and adding Main to the bottom of the classs I am testing.
    but, as this one has an array that refers to other objects I thought I had to create this in a seperate file and run the group of files together.
    "James 91 - Environment Variables"
    When I check the class path I see the following:
    C:\Program Files\Xinox Software\JCreatorV3 LE\MyProjects\Main Project\classes;C:\Program Files\Java\jdk1.5.0\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0\lib\dt.jar;C:\Program Files\Java\jdk1.5.0\lib\tools.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\ext\sunpkcs11.jar
    Should I change this to C\Program Files\Java\jdk1.5.0\lib\tools.jar
    Thanks
    Java Chick.

  • Error watching JMS queues with JMSUtils: java.lang.NoSuchMethodError: main

    Hi. I'm trying to use the command line utility JMSUtils to see if I have configured correctly a new queue in oc4j server but when I try to use execute it following the instructions I have found on the net it doesn't appear to be in the oc4j.jar
    I found that class in oc4jclient.jar but without a main method.
    I use the 10g Release 3 (10.1.3.0.0) for Microsoft Windows
    The instruction I execute is:
    C:\product\10.1.3\OracleAS_1\j2ee\home>java -classpath c:\ora10g\j2ee\home\oc4j.
    jar;c:\ora10g\j2ee\home\lib\jms.jar com.evermind.server.jms.JMSUtils -username admin -password welcome destinations
    Exception in thread "main" java.lang.NoClassDefFoundError: com/evermind/server/j
    ms/JMSUtils
    Mensaje editado por:
    user515269
    Mensaje editado por:
    user515269

    When I try to execute the JMSUtils class that's inside
    oc4j-internal.jar appears the same exception I had
    executing the class that's inside oc4jclient.jar:
    NoSuchMethodError: main
    Anybody knows why this class doesn't have a main method
    or how can I execute it?Jose:
    It seems that the command line utility JMSUtils is removed from oc4j 10.1.3, although the class is still packaged into some oc4j jar. According to the documentation, "In this release, OracleAS JMS Utility functionality is available as attributes and operations on various MBeans, replacing the deprecated command line interface of previous releases.".
    Please see the section "OracleAS JMS Utility" of the book "Oracle® Containers for J2EE
    Services Guide, 10g Release 3 (10.1.3) for Windows or UNIX, B14427-01", which is available on line.
    Hope this helps.

  • Exception in thread "main" java.lang.NoSuchMethodError: main (Error)

    Hello,
    I'm new to learning Java and I'm receiving the following error message whenever I try to run the following program. Can someone help?
    //code
    class Books {
         String title;
         String author;
         class BooksTestDrive {
         public static void main(String [] args)     {
         Books [] myBooks = new Books[3];
         int x = 0;
         myBooks[0] = new Books();
         myBooks[1] = new Books();
         myBooks[2] = new Books();
         myBooks[0].title = "The Grapes of Java";
         myBooks[1].title = "The Java Gatsby";
         myBooks[2].title = "The Java Cookbook";
         myBooks[0].author = "bob";
         myBooks[1].author = "sue";
         myBooks[2].author = "ian";
         while (x < 3) {
         System.out.print(myBooks[x].title);
         System.out.print(" by ");
         System.out.println(myBooks[x].author);
         x = x + 1;
    //end of code
    Thanks,
    H

    1.) Use the code button when posting your code, it makes it more readable.
    2.) You should have posted the error message in the text as well, it's slightly confusing this way.
    NoSuchMethodError means that Java wanted to invoke a method that's not there. In this case it's called "main". So you tried to run a Java class that does not have a main method. How did you try to run your Program (exact command, please)?

  • Exception in thread "main" java.lang.NoSuchMethodError: main

    I know you answered this questions a thousand times, but from all the threads i've read, i understand that it is also a program specific problem. I'm an absolute beginner in Java coding, learning it right now at university... I also undertood from other threads u want me to post in the correct way with the code attached to the message. i hope the form i am posting this thread in is ok... sorry to bother you, but it would be really nice if we could solve this problem somehow:
    I created a java file, which compiled without problems; but when i try to run the program, my terminal gives out the failure message stated above.
    I already set the classpath variable to the directory i am working in, so i don't think that this is the problem...
    anyway, here's the code, hope you can deal with it.
    class Widerstand{
              //Attribute
         float rho;
         float laenge;
         float flaeche;
         public float r;
              //Widerstand aus der Formel
              Widerstand(float rho, float laenge, float flaeche){
                   float r=rho*(laenge/flaeche);
              } //Formel
              //Widerstandswert (direkt �bergeben)
              Widerstand(float r){
                   r=r;
              } //Wert     
                   //Wert zur�ckgeben
                   float sWert(){
                        return r;
    }//class
    class Netzwerk{
    public static void main(String[] args) {
         float rho=Terminal.askFloat("Rho=");
         float laenge=Terminal.askFloat("Leiterlaenge=");
         float flaeche=Terminal.askFloat("Leiterdurchmesser=");
         }//Argumente
    }//class

    The error is telling you that the error is:
    Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
    Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
    Delete the .class files and recompile programs to insure that the .class files are valid.

  • Java.lang.NoSuchMethodError: main                  Exception in thread main

    I am a student currently trying to teach myself java with the aid of sams teach yourself java book, but whilst doing one of the examples I have become stuck.
    I get the message that I have posted as the subject title, the book is designed to use java 2 with netbeans 4.0 java 1.5 I think which I guess the code is written for,
    but at uni they have netbeans 3.6 java 1.4 so we have been advised to use this so there is no problems when working on the same projects and uni and at home,
    anyway can someone please help the code is posted below.
    thanx in advance
    import java.awt.*;
    import javax.swing.*;
    public class MessagePanel extends JPanel {
        GridBagLayout gridbag = new GridBagLayout();
        public MessagePanel() {
            super();
            GridBagConstraints constraints;
            setLayout(gridbag);
            JLabel toLabel = new JLabel("To: ");
            JTextField to = new JTextField();
            JLabel subjectLabel = new JLabel("Subject: ");
            JTextField subject = new JTextField();
            JLabel ccLabel = new JLabel("CC: ");
            JTextField cc = new JTextField();
            JLabel bccLabel = new JLabel("BCC: ");
            JTextField bcc = new JTextField();
            addComponent(toLabel, 0, 0 , 1, 1, 10, 100,
                GridBagConstraints.NONE, GridBagConstraints.EAST);
            addComponent(to, 1, 0, 9, 1, 90, 100,
                GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST);
            addComponent(subjectLabel, 0, 1, 1, 1, 10, 100,
                GridBagConstraints.NONE, GridBagConstraints.EAST);
            addComponent(subject, 1, 1, 9, 1, 90, 100,
                GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST);
         addComponent(ccLabel, 0, 2, 1, 1, 10, 100,
                GridBagConstraints.NONE, GridBagConstraints.EAST);
            addComponent(cc, 1, 2, 4, 1, 40, 100,
                GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST);
            addComponent(bccLabel, 5, 2, 1, 1, 10, 100,
                GridBagConstraints.NONE, GridBagConstraints.EAST);
            addComponent(bcc, 6, 2, 4, 1, 40, 100,
                GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST);
        private void addComponent(Component component, int gridx, int gridy,
            int gridwidth, int gridheight, int weightx, int weighty, int fill,
            int anchor) {
            GridBagConstraints constraints = new GridBagConstraints();
            constraints.gridx = gridx;
            constraints.gridy = gridy;
            constraints.gridwidth = gridwidth;
            constraints.gridheight = gridheight;
            constraints.weightx = weightx;
            constraints.weighty = weighty;
            constraints.fill = fill;
            constraints.anchor = anchor;
            gridbag.setConstraints(component, constraints);
            add(component);
    }I have copied exactly what the book says and downloaded the files from the website and everything is the same but it just won't work?

    My guess is that the main method is in another class. It would probably look something like this:
    public static void main(String[] args)
         JFrame f = new JFrame();
         f.setSize(500, 500);
         f.setLocation(20, 20);
         f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         f.setContentPane(new MessagePanel());
         f.setVisible(true);
    }

  • Java.lang.NoSuchMethodError weird occurence

    Hi..
    I know there are hell a lot Qs on "java.lang.NoSuchMethodError"..But I checked almost every java forum and none of them answer my situation correctly..
    Initialy I had two files
    1)test.java
    public class test{
    public static void main(String a []) {
    System.out.println(";");
    2)javac.java
    public class javac{
    public static void main(String a []) {
    System.out.println(";");
    I compiled both the files.Both were working fine. After some time I recompiled test.java.This time it gives
    "Exception in thread "main" java.lang.NoSuchMethodError: main"..The same file on recompilation...
    But the other file javac stil working fine(I din dare to recompile it since now whatever file I compile has this problem)...
    Im sure this is not a classpath problem or else we might getting NoClassDeffound error. Also there is nothing wrong in the main method declaration.
    Anybody can explain this behaviour?

    paulcw thanks for your replies...
    But I think you misunderstood my issue...
    OKI ..I still have the problem so let me explain it properly..
    Now I have the file test.java with the following content which I already compiled and can execute also...
    import java.io.*;
    public class test{
    public static void main(String a[]){
    String record = "0001 - LE1 - 850 - bytes - JPEG - JAL - 128X96 - 128x96_1k_jpg.jpg";
    String [] spiltvalues = record.split(" - ");
    for( String i: spiltvalues )
    System.out.println( i );
    On execution:
    D:\Data>java test
    0001
    LE1
    850
    bytes
    JPEG
    JAL
    128X96
    128x96_1k_jpg.jpg
    Now I move the source to some other directory(the same file) Im not changing anything.It compiles fine.When I execute I get
    D:\>java test
    Exception in thread "main" java.lang.NoSuchMethodError: main
    Now I copy the test.class of previously complied,sucessfully executed class file to D: and replace the class file which cannot be executed.
    D:\>java test
    0001
    LE1
    850
    bytes
    JPEG
    JAL
    128X96
    128x96_1k_jpg.jpg
    So this cannot be a path issue also. Both cases I haven changed the source even if I have changed please see the source I have posted..I don find any mistakes in the code.
    Im nt sure if something wrong with my javac/java exes...Before I reinstal I want to find the problem..
    Your reply is appreciated..Thanks..

  • Regarding java.lang.NoSuchMethodError

    Hi friends
    I want to run my servlet program....i am using tomcat as server....
    i set my path as follow
    java_home=c\sun\jdk
    path =c:\sun\jdk\bin
    my sevlet program is at the folder D:\jakarta-tomcat-5.0.19\webapps\myapp\WEB-INF\classes\HelloWorld
    I set the class path as D:\jakarta-tomcat-5.0.19\common\lib\servlet-api.jar
    When i run my program i am getting the error of Exception in thread "main" java.lang.NoSuchMethodError: main
    My program is
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Hello World!</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Hello World!</h1>");
    out.println("</body>");
    out.println("</html>");
    Pls anybody help me to solve my problem

    Hello,
    The error is because there is no main function in the program.
    Also like "CeciNEstPasUnProgrammeur" replied servlets cannot be executed as a standalone applciation. . Try running it from the web server..
    Regards,
    Prasanna.

  • Exception in thread "main" java.lang.NoSuchMethodError: com.sun.xml.wss.con

    Hi everyone,
    Just now i tried to run the 'simple' example in an JAXRPC Security part in the JWSDP 1.4 tutorial but got the following error:
    run-sample:
    [echo] Running the simple.TestClient program....
    [java] Service URL=http://localhost:8080/securesimple/Ping
    [java] Exception in thread "main" java.lang.NoSuchMethodError: com.sun.xml.wss.configuration.SecurityConfigurationXmlReader.readJAXRPCSecurityConfigurationString(Ljava/lang/String;Z)Lcom/sun/xml/wss/configuration/JAXRPCSecurityConfiguration;
    [java]      at com.sun.xml.rpc.security.SecurityPluginUtil.<init>(SecurityPluginUtil.java:128)
    [java]      at simple.PingPort_Ping_Stub.<clinit>(PingPort_Ping_Stub.java:40)
    [java]      at simple.PingService_Impl.getPing(PingService_Impl.java:68)
    [java]      at simple.TestClient.main(TestClient.java:27)
    Can anybody give me a clue?

    Vishal, thanks a lot for your reply. I used the App Server 2004Q4 beta and got the problem. When I switch to version 8.0.0_01 the things work well.
    But now I'm trying to understand this example and creating my own simple web app using encryption feature. From the files in the example dicrectory I can figure out the security applied at client by examining client stub files generated by the wscompile in the asant gen-client task. But I wonder when security is added to the server side. Is it when we use wsdeploy with the model part specifiedin jaxrpc-ri.xml? What is the procedure to apply the security to the web service?
    The last thing I want to ask is whether the deploytool bundled inside App Server can do the same things as ant task (eg. wsdeploy with some arguments).

  • "java.lang.NoSuchMethodError: com.sun.tools..apt.Main.process"

    Hi,
    I am a new to Web Services and was following some site for implementing it.
    The link is as below:
    http://www.roseindia.net/webservices/netbeans/Web-Service.shtml
    However while doing the "build and deploy" -- I am getting the following error while doing a ::
    init:
    deps-module-jar:
    deps-ear-jar:
    deps-jar:
    Warning: MANIFEST.MF modified in the future.
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\META-INF
    Warning: META-INF\context.xml modified in the future.
    Warning: WEB-INF\lib\jaxws-tools-2.1.7.jar modified in the future.
    Warning: WEB-INF\sun-jaxws.xml modified in the future.
    Warning: WEB-INF\web.xml modified in the future.
    Warning: index.jsp modified in the future.
    Warning: modified in the future.
    Warning: META-INF modified in the future.
    Copying 5 files to D:\WebServices-NB-Practice\webservice1\build\web
    library-inclusion-in-archive:
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    Copying 1 file to D:\WebServices-NB-Practice\webservice1\build\web\WEB-INF\lib
    library-inclusion-in-manifest:
    Warning: modified in the future.
    wsgen-init-nonJSR109:
    wsgen-MyWebService-nonJSR109:
    *java.lang.NoSuchMethodError: com.sun.tools.apt.Main.process(Lcom/sun/mirror/apt/AnnotationProcessorFactory;[Ljava/lang/String;)I*
    BUILD FAILED (total time: 1 second)
    I am using netbeans version 5.5 for this.
    Although from the initial investigation I understand that this error is related to "jaxws-tools.jar".
    However I could not resolve this error.
    Can Somebody provide me with the steps to resolve this error.
    Regards,
    Avinash

    No, I put the 'main' method just to see if it solved the problem

  • Exception in thread "main" java.lang.NoSuchMethodError?

    This is the exact same error I recieved from running ListGames:
    Exception in thread "main" java.lang.NoSuchMethodError: ListGames.getConnection(Ljava/lang/String;)Ljava/sql/Connection;
    at ListGames.getGames(ListGames.java:21)
    at ListGames.main(ListGames.java:7)
    What's wrong?
    ListGames.java:
    import java.sql.*;
    import java.text.NumberFormat;
    import ...util.MysqlConnection; // purposely incomplete
    public class ListGames {
         static Connection conn = MysqlConnection.openMysqlConnection("ds_games");
         public static void main(String args[]) {
              NumberFormat cf = NumberFormat.getCurrencyInstance();
              ResultSet games = getGames();
              try {
                   while (games.next()) {
                        Game g = getGame(games);
                        String msg = Integer.toString(g.year) + ": " + g.title + " (" + cf.format(g.price) + ")";
                        System.out.println(msg);
              } catch (SQLException e) {
                   e.printStackTrace();
                   conn = MysqlConnection.closeMysqlConnection(conn);
         private static ResultSet getGames() {          
              try {
                   Statement s = conn.createStatement();
                   ResultSet rows = s.executeQuery("select title, year, price from my_ds_games order by year, price, title");
                   return rows;
              } catch (SQLException e) {
                   e.printStackTrace();
                   conn = MysqlConnection.closeMysqlConnection(conn);
              return null;
         private static Game getGame(ResultSet games) {
              try {
                   String title = games.getString("Title");
                   int year = games.getInt("Year");
                   double price = games.getDouble("Price");
                   return new Game(title, year, price);
              } catch (SQLException e) {
                   e.printStackTrace();
                   conn = MysqlConnection.closeMysqlConnection(conn);
              return null;
         private static class Game {
              public String title;
              public int year;
              public double price;
              public Game(String title, int year, double price) {
                   this.title = title;
                   this.year = year;
                   this.price = price;
    MysqlConnection.java:
    package ...util; // purposely incomplete
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public final class MysqlConnection {     
         public static final Connection openMysqlConnection(String database) {
              Connection conn = null;
              try {
                   Class.forName("com.mysql.jdbc.Driver");
                   conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/" + database, user, password); // username and password purposely uninitialized
              } catch(SQLException e) {
                   System.out.println("SQLException: " + e.getMessage());
                   System.out.println("SQLState: " + e.getSQLState());
                   System.out.println("VendorError: " + e.getErrorCode());
              } catch(Exception e) {
                   e.printStackTrace();
              } finally {
                   return conn;
         public static final Connection closeMysqlConnection(Connection conn) {
              try {
                   if (conn != null) {
                        conn.close();
                        if (conn == null) {
                             System.out.println("Conection Closed");
              } catch (SQLException e) {
                   e.printStackTrace();
              } finally {
                   return null;
    }

    Darkstar444 wrote:
    I deleted ListGames.class, ListGames$Games.class, and MysqlConnection.class but still the same thing.Then you didn't delete the version of ListGames.class which is actually being used when you run your application. This suggests that your classpath is pointing to an old version as well as to the version produced currently by the compiler. Or that there's an old version which you put into the Java extensions directory.

  • Javax.naming.NamingException.  Root exception is java.lang.NoSuchMethodError

    I am using WLS5.1 inside visualage environment. I am trying to run
    a Simple EJB which connects to the database and executes two simple
    queries. The client code is as shown below:
    try{
    Context ic = getInitialContext();
    System.out.println("Initial Context created......"); java.lang.Object
    objref = ic.lookup("simpleBean.AtmHome"); System.out.println("objref
    created......");
    AtmHome home = (AtmHome) PortableRemoteObject.narrow(objref, AtmHome.class);
    System.out.println("home created......");
    Atm atm = home.create();
    System.out.println("atm created......");
    atm.transfer(8, 9, 100000);
    catch (NamingException ne)
    ne.printStackTrace(System.out);
    finally {
         try {
              ic.close();
              System.out.println("Closed the connection");
         catch (Exception e) {
              System.out.println("Exception while closing context....." );
    The above code executes fine for the first time but second time
    it throws an exception "javax.naming.NamingException.
    Root exception is java.lang.NoSuchMethodError"
    javax.naming.NamingException. Root exception is java.lang.NoSuchMethodError
         java.lang.Throwable()
         java.lang.Error()
         java.lang.LinkageError()
         java.lang.IncompatibleClassChangeError()
         java.lang.NoSuchMethodError()
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         javax.naming.NameImpl(java.util.Properties)
         javax.naming.CompositeName()
         weblogic.jndi.toolkit.NormalName(java.lang.String, javax.naming.NameParser)
         weblogic.jndi.toolkit.NormalName weblogic.jndi.toolkit.BasicWLContext.normalizeName(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext.lookup(java.lang.String)
         weblogic.rmi.extensions.OutgoingResponse weblogic.jndi.toolkit.BasicWLContext_WLSkel.invoke(weblogic.rmi.extensions.ServerObjectReference,
    int, weblogic.rmi.extensions.IncomingRequest, weblogic.rmi.extensions.OutgoingResponse)
         java.lang.Throwable weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(int,
    weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.extensions.BasicRequestHandler.handleRequest(weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.internal.BasicExecuteRequest.execute(weblogic.kernel.ExecuteThread)
         void weblogic.kernel.ExecuteThread.run()
    --------------- nested within: ------------------
    weblogic.rmi.ServerError: A RemoteException occurred in the server
    method
    - with nested exception:
    [java.lang.NoSuchMethodError:
    Start server side stack trace:
    java.lang.NoSuchMethodError
         java.lang.Throwable()
         java.lang.Error()
         java.lang.LinkageError()
         java.lang.IncompatibleClassChangeError()
         java.lang.NoSuchMethodError()
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         javax.naming.NameImpl(java.util.Properties)
         javax.naming.CompositeName()
         weblogic.jndi.toolkit.NormalName(java.lang.String, javax.naming.NameParser)
         weblogic.jndi.toolkit.NormalName weblogic.jndi.toolkit.BasicWLContext.normalizeName(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext.lookup(java.lang.String)
         weblogic.rmi.extensions.OutgoingResponse weblogic.jndi.toolkit.BasicWLContext_WLSkel.invoke(weblogic.rmi.extensions.ServerObjectReference,
    int, weblogic.rmi.extensions.IncomingRequest, weblogic.rmi.extensions.OutgoingResponse)
         java.lang.Throwable weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(int,
    weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.extensions.BasicRequestHandler.handleRequest(weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.internal.BasicExecuteRequest.execute(weblogic.kernel.ExecuteThread)
         void weblogic.kernel.ExecuteThread.run()
    End  server side stack trace
         weblogic.rmi.extensions.WRMIInputStream weblogic.rmi.extensions.AbstractRequest.sendReceive()
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.WLContextStub.lookup(java.lang.String)
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
         void simpleBean.AtmClient.main(java.lang.String [])
    NamingException is caught....
    I found out that it hangs at lookup function in the above code.
    Please let me know if I am missing any environment settings.
    Thanks
    Shailaja

    This problem is solved after installing service pack 8 for weblogic
    5.1
    -shailaja
    "shailaja" <[email protected]> wrote:
    >
    I am using WLS5.1 inside visualage environment. I am trying
    to run
    a Simple EJB which connects to the database and executes
    two simple
    queries. The client code is as shown below:
    try{
    Context ic = getInitialContext();
    System.out.println("Initial Context created......"); java.lang.Object
    objref = ic.lookup("simpleBean.AtmHome"); System.out.println("objref
    created......");
    AtmHome home = (AtmHome) PortableRemoteObject.narrow(objref,
    AtmHome.class);
    System.out.println("home created......");
    Atm atm = home.create();
    System.out.println("atm created......");
    atm.transfer(8, 9, 100000);
    catch (NamingException ne)
    ne.printStackTrace(System.out);
    finally {
         try {
              ic.close();
              System.out.println("Closed the connection");
         catch (Exception e) {
              System.out.println("Exception while closing context....."
    The above code executes fine for the first time but second
    time
    it throws an exception "javax.naming.NamingException.
    Root exception is java.lang.NoSuchMethodError"
    javax.naming.NamingException. Root exception is java.lang.NoSuchMethodError
         java.lang.Throwable()
         java.lang.Error()
         java.lang.LinkageError()
         java.lang.IncompatibleClassChangeError()
         java.lang.NoSuchMethodError()
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         javax.naming.NameImpl(java.util.Properties)
         javax.naming.CompositeName()
         weblogic.jndi.toolkit.NormalName(java.lang.String, javax.naming.NameParser)
         weblogic.jndi.toolkit.NormalName weblogic.jndi.toolkit.BasicWLContext.normalizeName(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext.lookup(java.lang.String)
         weblogic.rmi.extensions.OutgoingResponse weblogic.jndi.toolkit.BasicWLContext_WLSkel.invoke(weblogic.rmi.extensions.ServerObjectReference,
    int, weblogic.rmi.extensions.IncomingRequest, weblogic.rmi.extensions.OutgoingResponse)
         java.lang.Throwable weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(int,
    weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.extensions.BasicRequestHandler.handleRequest(weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.internal.BasicExecuteRequest.execute(weblogic.kernel.ExecuteThread)
         void weblogic.kernel.ExecuteThread.run()
    --------------- nested within: ------------------
    weblogic.rmi.ServerError: A RemoteException occurred in
    the server
    method
    - with nested exception:
    [java.lang.NoSuchMethodError:
    Start server side stack trace:
    java.lang.NoSuchMethodError
         java.lang.Throwable()
         java.lang.Error()
         java.lang.LinkageError()
         java.lang.IncompatibleClassChangeError()
         java.lang.NoSuchMethodError()
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         void javax.naming.NameImpl.recordNamingConvention(java.util.Properties)
         javax.naming.NameImpl(java.util.Properties)
         javax.naming.CompositeName()
         weblogic.jndi.toolkit.NormalName(java.lang.String, javax.naming.NameParser)
         weblogic.jndi.toolkit.NormalName weblogic.jndi.toolkit.BasicWLContext.normalizeName(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext.lookup(java.lang.String)
         weblogic.rmi.extensions.OutgoingResponse weblogic.jndi.toolkit.BasicWLContext_WLSkel.invoke(weblogic.rmi.extensions.ServerObjectReference,
    int, weblogic.rmi.extensions.IncomingRequest, weblogic.rmi.extensions.OutgoingResponse)
         java.lang.Throwable weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(int,
    weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.extensions.BasicRequestHandler.handleRequest(weblogic.rmi.extensions.IncomingRequest)
         void weblogic.rmi.internal.BasicExecuteRequest.execute(weblogic.kernel.ExecuteThread)
         void weblogic.kernel.ExecuteThread.run()
    End  server side stack trace
         weblogic.rmi.extensions.WRMIInputStream weblogic.rmi.extensions.AbstractRequest.sendReceive()
         java.lang.Object weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(java.lang.String)
         java.lang.Object weblogic.jndi.toolkit.WLContextStub.lookup(java.lang.String)
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
         void simpleBean.AtmClient.main(java.lang.String [])
    NamingException is caught....
    I found out that it hangs at lookup function in the above
    code.
    Please let me know if I am missing any environment settings.
    Thanks
    Shailaja

  • Java.lang.NoSuchMethodError: com.sun.mail.util.SocketFetcher.getSocket

    I am recieving the above error in a FileNet Content Manager environment. The full stack trace is:
    Exception in thread "main" java.lang.NoSuchMethodError: com.sun.mail.util.SocketFetcher.getSocket(Ljava/lang/String;ILjava/util/Properties;Ljava/lang/String;Z)Ljava/net/Socket;
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1195)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:322)
    at javax.mail.Service.connect(Service.java:233)
    at javax.mail.Service.connect(Service.java:134)
    at javax.mail.Service.connect(Service.java:86)
    at javax.mail.Transport.send0(Transport.java:162)
    at javax.mail.Transport.send(Transport.java:80)
    at com.bearingpoint.utilities.EMail.send(EMail.java:171)
    at com.bearingpoint.utilities.EMail.send(EMail.java:31)
    at email.main(email.java:11)
    I have spent many hours, fiddling with classpaths, ensuring that the mail.jar, mailapi.jar, smtp.jar, activation.jar are all from the same generation of JavaMail. With my classpath set correctly I can run a simple program constructed to just test whether the box can send out email from the command line.
    The code for the program is:
    public class email {
         public email() {
         public static void main (String args[]) {
              try {
              EMail.send("10.132.147.62", "[email protected]", "[email protected]", "test", "test");
              catch (Exception e) {
                   System.err.println(e.toString());
    Where EMail.send() is:
    public static void send(
    String mail_server_host,
    String email_from,
    String email_to,
    String subject,
    String message) throws AddressException, MessagingException, IOException {
    send(mail_server_host,
    (Authenticator)null,
    new InternetAddress[] {new InternetAddress(email_from)},
    new InternetAddress[] {new InternetAddress(email_to)},
    (InternetAddress[])null,
    (InternetAddress[])null,
    subject,
    message,
    null,
    null);
    which calls:
    public static void send(
    String mail_server_host,
    Authenticator authenticator,
    InternetAddress[] addresses_from,
    InternetAddress[] addresses_to,
    InternetAddress[] addresses_cc,
    InternetAddress[] addresses_bcc,
    String subject,
    String message,
    InputStream[] attachments,
    MimeType[] attachmentTypes) throws MessagingException,IOException {
    Properties properties = new Properties();
    properties.put("mail.smtp.host", mail_server_host);
    MimeMessage msg = new MimeMessage(
    Session.getInstance(properties, authenticator));
    msg.addFrom(addresses_from);
    msg.setRecipients(Message.RecipientType.TO, addresses_to);
    msg.setRecipients(Message.RecipientType.CC, addresses_cc);
    msg.setRecipients(Message.RecipientType.BCC, addresses_bcc);
    msg.setSubject(subject);
    BodyPart bpBody = new MimeBodyPart();
    bpBody.setText(message);
    Multipart mpMessageBody = new MimeMultipart();
    if (attachments == null && attachmentTypes == null) {
    mpMessageBody.addBodyPart(bpBody);
    msg.setContent(mpMessageBody);
    else if (attachments == null) {
    bpBody.setContent(message, attachmentTypes[0].toString());
    mpMessageBody.addBodyPart(bpBody);
    msg.setContent(mpMessageBody);
    else {
    mpMessageBody.addBodyPart(bpBody);
    for (int i=0; i<attachments.length;i++) {
    bpBody = new MimeBodyPart();
    DataSource dsAttachment = new ByteArrayDataSource(attachments, attachmentTypes[i].toString());
    bpBody.setDataHandler(new DataHandler(dsAttachment));
    bpBody.setFileName("attachment." + new MimeFileExtensions(attachmentTypes[i].getValue()).toString());
    mpMessageBody.addBodyPart(bpBody);
    msg.setContent(mpMessageBody);
    Transport.send(msg);
    As said before all .jar files are of the same generation, yet when I run FileNet and the underlying content engine, and try to send an email, I recieve this exception. I have run out of ideas, and any help would be appreciated.
    Things I've tried (multiple times):
    - Removing any old versions of the jar files and replace them with JavaMail 1.3.3_01
    - Have the content engine specifically import the JavaMail jar files.
    While I realize some of you may not know what FileNet is, perhaps you have come across this exception before. Any new ideas would be more then appreciated.
    Thank you for your time.

    I haven't seen this error before so I need more detail to reproduce it.
    It looks like you daisy chained calls to various static send() methods from various classes. Could you write a static main() for the class with the send() method actually doing the work? In the main() write the test case and compile it, test it and if it still doesnt work post it. Please include the import statements as it is germain to the solution.
    Its much easier for me to help you if I don't have to recreate "FileNet" to reproduce your error.
    As an alternative....
    The following code I got from: http://javaalmanac.com/egs/javax.mail/SendApp.html?l=new
    its simpler than you're code but gets the job done (without attachments).
    I've tested it and it works with:
    javac -classpath .;c:\sun\appserver\lib\j2ee.jar;c:\sun\appserver\lib\mail.jar SendApp.java
    java -classpath .;c:\sun\appserver\lib\j2ee.jar;c:\sun\appserver\lib\mail.jar SendApp
    Ran on Windows XP, Sun J2EE 1.4/Appserver Bundle
        import java.io.*;
        import javax.mail.*;
        import javax.mail.internet.*;
        import javax.activation.*;
        public class SendApp {
            public static void send(String smtpHost, int smtpPort,
                                    String from, String to,
                                    String subject, String content)
                    throws AddressException, MessagingException {
                // Create a mail session
                java.util.Properties props = new java.util.Properties();
                props.put("mail.smtp.host", smtpHost);
                props.put("mail.smtp.port", ""+smtpPort);
                Session session = Session.getDefaultInstance(props, null);
                // Construct the message
                Message msg = new MimeMessage(session);
                msg.setFrom(new InternetAddress(from));
                msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
                msg.setSubject(subject);
                msg.setText(content);
                // Send the message
                Transport.send(msg);
            public static void main(String[] args) throws Exception {
                // Send a test message
                send("10.1.4.105", 25, "[email protected]", "[email protected]",
                     "test", "test message.");
        }

  • Java.lang.NoSuchMethodError using BasicHttpContext

    Hello
    I want to write a simple ChatClient.
    package com.inz.chat.client;
    import java.io.IOException;
    import java.io.InputStream;
    import org.apache.http.HttpEntity;
    import org.apache.http.HttpResponse;
    import org.apache.http.client.ClientProtocolException;
    import org.apache.http.client.HttpClient;
    import org.apache.http.client.methods.HttpGet;
    import org.apache.http.impl.client.DefaultHttpClient;
    public class ChatClient
         private HttpClient httpClient;
         private String servletUrl;
         public ChatClient(String urlPrefix)
              this.servletUrl = urlPrefix + "ChatServlet";
              this.httpClient = new DefaultHttpClient();
              connectWithServer();
         private void connectWithServer()
              System.out.println("connect to " + servletUrl);
              HttpGet httpget = new HttpGet(servletUrl);
              try {
                   HttpResponse response = this.httpClient.execute(httpget);
                   HttpEntity entity = response.getEntity();
                   if (entity != null)
                       InputStream instream = entity.getContent();
              } catch (ClientProtocolException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public static void main(String[] args)
              String prefix = "http://127.0.0.1:8080/InzChat/";
              new ChatClient(prefix);
    }But when i start the program i always get:
    Exception in thread "main" java.lang.NoSuchMethodError: org.apache.http.protocol.BasicHttpContext: method <init>()V not found
         at org.apache.http.impl.client.AbstractHttpClient.createHttpContext(AbstractHttpClient.java:273)
         at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:797)
         at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
         at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
         at com.inz.chat.client.ChatClient.connectWithServer(ChatClient.java:30)
         at com.inz.chat.client.ChatClient.<init>(ChatClient.java:22)
         at com.inz.chat.client.ChatClient.main(ChatClient.java:48)I tried to use httpcore-4.0.jar and httpcore-4.1.jar, but the error is always the same. In other projects I used httpcore-4.1.jar to establish http connections without any problems, but here is something wrong...
    Next to the jre1.6 classes and the tomcat 6 classes I have appframework-1.03.jar, commons-codec-1.4.jar, commons-logging-1.1.1.jar, httpclient-4.1.1.jar, httpclient-cache-4.1.1.jar, httpmime-4.1.1.jar set to the classpath, but there seems to be a problem
    I' m using Eclipse for develpoment and I hope someone knows what to do here...
    Kind regards,
    Chang
    Edited by: Chang on 02.09.2011 04:58

    Hello EJP thanks for your answer.
    I put the jar files in the Project Properties->Java Build Path dialog to the project like i did it many times before. Now i added httpcore-4.0.jar and httpcore-4.1.jar to the classpath, but no difference the error is still the same. I don't know which jar files get used at runtime.
    Alternatively i put the jar files in a lib folder under the WEB-INF folder, but the error leaves the same.
    Can you please explain me the solution a little more detailed.
    Kind regards,
    Chang

Maybe you are looking for

  • Error in creating perfstat user for statspack

    Hi Friends, DB: 11.2.0.2, SE and 64 bit OS: RHEL 5.7 My DB is on SE and hence i cannot use the diagonistic pack so when i am trying to use Statspack for the same, i am facing the following error when i am trying to create Perfstat user. SQL> @?/rdbms

  • Can not print song lists for jewel case with windows

    I have PC with Windows 7 and have downloaded the latest version of I Tunes and still can not print out a list of songs that will fit into a jewel case.  The songs print all over one another in a garbled mess.  Any suggestions on how to fix this?  I h

  • Storage *.vi-drive​r in custom file

    hello, In my project I work with a plugin principle. Each plugin reach to a measurement sensor. The plugin contains all info about the manufacturer, all equations for a m-file that communicates with matlab, and further parameters like visualizations

  • How to escape the space in "Program Files"

    My project is installed in C:\Program Files\JavaProject directory. I have put a resources.xsd file at C:\Program Files\JavaProject\jboss-4.0.2\bin. When am trying to use it at runtime it says >> org.xml.sax.SAXParseException: schema_reference.4: Fail

  • Question about 10g EM w/ 2 databases

    I've got 2 databases on one machine. How is EM supposed to be configured properly to see both of them? Right now I've got 2 directories under $ORACLE_HOME/<hostname>_<SID>, one per SID.