String cannot be applied to java.lang.String in NetBeans 6 !?!?

Guys,
I have a problem. I am calling some API from jar file. Here is the method prototype in API jar:
public Operator getAdminOperator(String name, String password, int admin);
when I call this method in NetBeans 6 like the following:
admin.getAdminOperator(userName, password, 1);
where userName and password are both string, I get the following error:
getAdminOperator(String, String, int) in common.admin.AdminRemote cannot be applied to (java.lang.String, java.lang.String, int)
WTF?!?! If i try the same code in NetBeans 5 it works, and it works in JavaStudioCreator, but NetBeans 6 does not takes it! And because of this error, I am not able to see the Design view in the JSF! The code compiles just fine and runs if I deploy it in the server though, but i need to see the Design view.
ANY ideas what is going on?

Then this "String" class must be some other class and not java.lang.String. Did you write the API in question? Does it have a "String" class in one of its namespaces? Or perhaps you wrote a class named "String" and didn't put it in a package? If that's not the case, then contact the writer and ask them.

Similar Messages

  • Cannot convert type class java.lang.String to class oracle.jbo.domain.Clob

    Cannot convert type class java.lang.String to class oracle.jbo.domain.ClobDomain.
    Using ADF Business Components I have a JSFF page fragment with an ADF form based on a table with has a column of type CLOB. The data is retrieved from the database and displayed correctly but when any field is changed and submitted the above error occurs. I have just used the drag and drop technique to create the ADF form with a submit button, am I missing a step?
    I am using the production release of Jdeveloper11G

    Reproduced and filed bug# 7487124
    The workaround is to add a custom converter class to your ViewController project like this
    package oow2008.view;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    import javax.faces.convert.ConverterException;
    import oracle.jbo.domain.ClobDomain;
    import oracle.jbo.domain.DataCreationException;
    public class ClobConverter implements Converter {
         public Object getAsObject(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   String string) {
           try {
             return string != null ? new ClobDomain(string) : null;
           } catch (DataCreationException dce) {
             dce.setAppendCodes(false);
             FacesMessage fm =
               new FacesMessage(FacesMessage.SEVERITY_ERROR,
                                "Invalid Clob Value",
                                dce.getMessage());
             throw new ConverterException(fm);
         public String getAsString(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   Object object) {
           return object != null ?
                  object.toString() :
                  null;
    }then to register the converter in faces-config.xml like this
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
      <application>
        <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
      </application>
      <converter>
        <converter-id>clobConverter</converter-id>
        <converter-class>oow2008.view.ClobConverter</converter-class>
      </converter>
    </faces-config>then reference this converter in the field for the ClobDomain value like this
              <af:inputText value="#{bindings.Description.inputValue}"
                            label="#{bindings.Description.hints.label}"
                            required="#{bindings.Description.hints.mandatory}"
                            columns="40"
                            maximumLength="#{bindings.Description.hints.precision}"
                            shortDesc="#{bindings.Description.hints.tooltip}"
                            wrap="soft" rows="10">
                <f:validator binding="#{bindings.Description.validator}"/>
                <f:converter converterId="clobConverter"/>
              </af:inputText>

  • Getting Error:::oracle.jbo.domain.Date cannot be cast to java.lang.String

    Hi Friends,
    I have simple req'.
    i have one date filed in OAF page...if user has change the date filed..means if he incresed by 2 days..then i need to call one procedure..if not no need to call....
    first am picking that date field to by uusing prepared stmt and putting in to one variable..like below
    try {
    ps1 = am.getOADBTransaction().getJdbcConnection().prepareStatement("SELECT -------");
    ResultSet rs2 = ps1.executeQuery();
    while (rs2.next()) {
    schDate = rs2.getString(1);//storing the value
    } catch (Exception e) {
    throw OAException.wrapperException(e);
    Next..am picking the current value like this(user can change the value) like below...
    OAViewObject viewObj = (OAViewObject)am.findViewObject("simpleVO");
    String currSchDate = (String)viewObj.getCurrentRow().getAttribute("iDate");
    java.text.SimpleDateFormat dtFormat = new java.text.SimpleDateFormat ("MM/dd/yyyy");
    StringBuilder date = new StringBuilder(dtFormat.format(currSchDate));
    Then am comparing the values like below..
    if (schDate.equals(date)) {
    String outParamValue = "";
    String secondOutParamValue = "";
    but am geting the below error
    ## Detail 0 ##
    java.lang.ClassCastException: oracle.jbo.domain.Date cannot be cast to java.lang.String
         at xxuss.oracle.apps.abc.webui.xxPGCO15.processFormRequest(xxGCO15.java:594)
    Appriciate any help...its very urgent
    Regards
    Harry

    Instead of :
    String currSchDate = (String)viewObj.getCurrentRow().getAttribute("iDate");Try
    String currSchDate = viewObj.getCurrentRow().getAttribute("iDate").toString();
    -Anand

  • Create(java.io.InputStream) in Scanner cannot be applied to (java.io.File)

    Ahhh!!!
    Ahem, when I try to compile the file below, "PhoneDirectory.java", I get the following compilation error message:
    PhoneDirectory.java:12: create(java.io.InputStream) in Scanner cannot be applied to (java.io.File)
        Scanner fin = Scanner.create(file);After quite a bit of tweaking... I'm right back where I started. I'm a seasoned programmer, as far as concepts are concerned, but rather new to JAVA.
    The error seems to be occuring where a new instance of "Scanner" is supposed to be created. It uses file I/O, and I had only used the Scanner class for the keyboard input in the past.
    Looking at the Scanner class, everything seems to be right to me. I'm probably missing some simple fundamental concept, and I've been pulling my hair out trying to get it... Please help me shed some light on this situation!
    =========
    PhoneDirectory.java
    =========
    import java.io.*;
    // Read a file of names and phone numbers
    // into an array. Sort them into ascending
    // order using bubble sort.
    // Print names and numbers before and after sort.
    public class PhoneDirectory {
      public static void main (String[] args) {
        PhoneEntry[] directory = new PhoneEntry[200];
        File file = new File("c:\\jessica\\phonenum.txt");
        Scanner fin = Scanner.create(file);
        int numberEntries = 0;
        // read array from file
        while (fin.hasNextInt())
          directory[numberEntries++] = new PhoneEntry(fin);
        // print array as read
        for (int i=0; i<numberEntries; i++)
          System.out.println(directory);
    // sort by ordering defined in PhoneEntry,
    // in this case lastName firstName
    bubbleSort(directory, numberEntries);
    // print sorted array
    System.out.println(
    "============================================");
    for (int i=0; i<numberEntries; i++)
    System.out.println(directory[i]);
    static void bubbleSort(PhoneEntry[] a, int size) {
    // bubbleSortr: simple to write, but very inefficient.
    PhoneEntry x;
    for (int i=1; i<size; i++)
    for (int j=0; j<size-i; j++)
    if (a[j].compareToIgnoreCase(a[j+1]) > 0) {
    // swap
    x = a[j]; a[j] = a[j+1]; a[j+1] = x;
    =========
    PhoneEntry.java
    =========
    class PhoneEntry {
    // number, name entry for a line in a Phone Directory
      protected int area;
      protected int prefix;
      protected int number;
      protected String firstName;
      protected String lastName;
      public String toString() {
      // format name and phone number to printable string
        String x = lastName + ", " + firstName;
        x = x +
        " . . . . . . . . . . . . . . .".substring(x.length())
        + "(" + area + ") " + prefix + "-" + number;
        return x;
      public int compareToIgnoreCase(PhoneEntry v) {
      // alphabetically compare names in this to names in v
      // return negative for this < v, 0 for ==,
      //        positive for this > v
        int m = lastName.compareToIgnoreCase(v.lastName);
        if (m == 0) m = firstName.compareToIgnoreCase(v.firstName);
        return m;
      public PhoneEntry(Scanner fin) {
      // input a PhoneDirectory entry. Must be space delimited
      // area prefix suffix lastname firstname
        // number
        area = fin.nextInt();
        prefix = fin.nextInt();
        number = fin.nextInt();
        // read rest of line
        String name = fin.nextLine();
        // split name into lastName firstName
        int p = name.indexOf(' ');
        if (p > 0) {
            lastName = name.substring(0,p);
            firstName = name.substring(p+1);
        else {
            lastName = name;
            firstName = "";
    }=========
    Scanner.java
    =========
        This class does input from the keyboard.  To use it you
        create a Scanner using
        Scanner stdin = Scanner.create(System.in);
         then you can read doubles, ints, or strings as follows:
        double d; int i; string s;
        d = stdin.nextDouble();
        i = stdin.nextInt();
        s = stdin.nextLine();
        An unexpected input character will cause an exception.
        You cannot type a letter when it's expecting a double,
        nor can you type a decimal point when it's expecting an int.
    import java.io.*;
    public class Scanner {
    // Simplifies input by returning
    // the next value read from the
    // keyboard with each call.
      private String s;
      private int start=0, end = 0, next;
      private BufferedReader stdin;
      Scanner(InputStream stream) {
        start = end = 0;
        // set up for keyboard input
        stdin = new BufferedReader(
        new InputStreamReader(stream));
      public static Scanner create(InputStream stream) {
        return new Scanner(stream);
      double nextDouble() {
         if (start >= end)
           try {
            s = stdin.readLine().trim() + " ";
              start = 0;
             end = s.length();
          catch (IOException e) {System.exit(1);}
         next = s.indexOf(' ',start);
         double d = Double.parseDouble(s.substring(start,next));
         start = next+1;
         return d;
      public int nextInt() {
         if (start >= end)
           try {
            s = stdin.readLine().trim() + " ";
              start = 0;
             end = s.length();
          catch (IOException e) {System.exit(1);}
         next = s.indexOf(' ',start);
         int d = Integer.parseInt(s.substring(start,next));
         start = next+1;
         return d;
      public String nextLine() {
         if (start >= end)
           try {
            s = stdin.readLine().trim() + " ";
              start = 0;
             end = s.length();
          catch (IOException e) {System.exit(1);}
         String t = s.substring(start,s.length()-1);
         start = end = 0;
         return t;
    }=========
    phonenum.txt
    =========
    336 746 6915 Rorie Tim
    336 746 6985 Johnson Gary
    336 781 2668 Hoyt James
    606 393 5355 Krass Mike
    606 393 5525 Rust James
    606 746 3635 Smithson Norman
    606 746 3985 Kennedy Amy
    606 746 4235 Behrends Leonard
    606 746 4395 Rueter Clarence
    606 746 4525 Rorie Lonnie

    I don't see a Scanner.create() method in the Scanner class but I do see a constructor with the signature you want. Change
    Scanner fin = Scanner.create(file);
    to
    Scanner fin = new Scanner(file);

  • Cannot be applied to (java.io.PrintWriter) error

    Hi guys I get the following errors when trying to compile my program and I was wondering how to solve it
    printPay() in PaySlip cannot be applied to (java.io.PrintWriter)
    slip.printPay(slipWrite)
    import java.io.*;
    public class PayApp
      public static void main(String[] args)
        boolean end_of_file = false;
        EmpInFile   f1 =  new EmpInFile(); 
        EmpOutFile  f2 =  new EmpOutFile();
        Employee    emp = null;       
        PaySlip     slip = null;           
        Report   sum = null;     
        PrintWriter slipWrite = null;
        PrintWriter sumWrite  = null;
        if (args.length != 4)    // correct number ?
          errExit("Names of Input employee file , output employee file, payslip file \n, and report file required");
         emp = new Employee();
         sum =   new Report();
         slip  = new PaySlip(emp,sum);
       try
           f1.openFile(args[0]);  
           f2.openFile(args[1]);  
           slipWrite = new PrintWriter(new FileWriter(args[2]));
           sumWrite =  new PrintWriter(new FileWriter(args[3]));
          catch(IOException e)
             System.err.println("error opening files" + e.toString());
             System.exit(1);
         while (!end_of_file )
            end_of_file = f1.readRecord(emp);
            if(!end_of_file)
               slip.printPay(slipWrite); 
               f2.addRecord(emp);  
            }// end if ! end
          }// end while
           System.out.println("All employees processed ");
           sum.printTotals(sumWrite);  
           sumWrite.flush();
           sumWrite.close();        
           slipWrite.flush();
           slipWrite.close();
           f1.closeFile();
           f2.closeFile();
      static void  errExit(String message)
       System.err.println(message);
       System.exit(1);
    public class PaySlip
    // declare variables
         private double gross;
         private double tax;
         private double taxcredits;
         private Employee emp;
         private Report rep;
         public PaySlip (Employee e, Report r)
         emp = e;
         rep = r;
         double gross = 0;
         double tax = 0;
         double taxcredits = 0;
         public void setGross(double gr)
         gross = gr;
         public void setTax(double tx)
         tax = tx;
         public void settaxCreds(double taxcreds)
         taxcredits = taxcreds;
         public void printPay()
         emp.calcPay(this);
         double netpay;
         netpay = gross - tax;
         System.out.println("____________________________________________________");
         System.out.println("               Payslip Information                  ");
         System.out.println("Employee Name: \t\t" +emp.getFirst() +" "+ emp.getLast());
         System.out.println("Employee Id: \t\t" +emp.getId());
         System.out.println("Net Pay: \t" +netpay);
         System.out.println("Year To Date Gross: \t" +emp.getYtdGross());
         System.out.println("Year To Date Tax: \t" +emp.getYtdTax());
         System.out.println("____________________________________________________");
         System.out.println("               Department Totals                    ");
         char dcode = emp.getDeptCode();
         rep.addToTotals(gross,tax,dcode);
    }Any help would be greatly appreciated.

    Post the actual error which would in include a line number when noting errors.
    slip.printPay(slipWrite); The method printPay() does not take parameters. So you can't put 'slipWrite" there.

  • Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib

    I am trying to add jdbc to my project and find that jdbc components seem to be missing
    compiles and runs fine in IDE
    but when I try to run outside IDE I get this error
    Exception in thread "main" java.lang.NoClassDefFoundError: org/netbeans/lib/sql/
    DataNavigator

    here is my log file
    Log Session: Sunday, May 22, 2005 10:17:39 PM EDT
    System Info: Product Version = Sun(tm) Java(tm) Studio Enterprise 7 2004Q4 (Build 041123)
    IDE Versioning = IDE/1 spec=4.26.1 impl=041123
    Operating System = Windows XP version 5.1 running on x86
    Java; VM; Vendor = 1.4.2_05; Java HotSpot(TM) Client VM 1.4.2_05-b04; Sun Microsystems Inc.
    Java Home = C:\j2sdk1.4.2_05\jre
    System Locale; Encod. = en_US (f4j_ee); Cp1252
    Home Dir; Current Dir = C:\Documents and Settings\dale; C:\Sun\jstudio_04Q4\Ent_04Q4\bin
    IDE Install; User Dir = C:\Sun\jstudio_04Q4\Ent_04Q4; C:\Documents and Settings\dale\.jstudio\Ent04Q4
    CLASSPATH = C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\boot.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\Describe.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\DescribeIDE.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\jaxen.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\logger.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\msv.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\parser.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\saxpath.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\Tidy.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsgdtj55.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsgetj55.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsglt55.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsgltc55.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsgltjava55.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\ext\tsgmtj55.jar;C:\j2sdk1.4.2_05\lib\dt.jar;C:\j2sdk1.4.2_05\lib\tools.jar;C:\Sun\jstudio_04Q4\AppServer7\pointbase\client_tools\lib\pbclient42RE.jar
    Boot & ext classpath = C:\j2sdk1.4.2_05\jre\lib\rt.jar;C:\j2sdk1.4.2_05\jre\lib\i18n.jar;C:\j2sdk1.4.2_05\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_05\jre\lib\jsse.jar;C:\j2sdk1.4.2_05\jre\lib\jce.jar;C:\j2sdk1.4.2_05\jre\lib\charsets.jar;C:\j2sdk1.4.2_05\jre\classes;C:\j2sdk1.4.2_05\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_05\jre\lib\ext\jai_codec.jar;C:\j2sdk1.4.2_05\jre\lib\ext\jai_core.jar;C:\j2sdk1.4.2_05\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_05\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_05\jre\lib\ext\mlibwrapper_jai.jar;C:\j2sdk1.4.2_05\jre\lib\ext\sunjce_provider.jar
    Dynamic classpath = C:\Sun\jstudio_04Q4\Ent_04Q4\lib\patches\TopLogging.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\core.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\openfile-cli.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\openide-loaders.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\openide.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\locale\core_f4j.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\locale\core_f4j_ee.jar;C:\Sun\jstudio_04Q4\Ent_04Q4\lib\locale\openide_f4j.jar
    Patched TopLogging from crash-reporter.nbm
    [org.netbeans.core.modules #4] Warning - had to upgrade dependencies for module com.sun.xml.registry1_0_01: added = [module org.netbeans.libs.xerces/1 > 1.2] removed = [package org.apache.xerces.parsers[SAXParser], package org.apache.xml.serialize[XMLSerializer]]; details: [Xerces is now available only as an autoload module, not in classpath: http://libs.netbeans.org/#xerces]
    [org.netbeans.core.modules #4] Warning: the extension C:\Sun\jstudio_04Q4\Ent_04Q4\modules\autoload\ext\namespace1_3.jar may be multiply loaded by modules: [C:\Sun\jstudio_04Q4\Ent_04Q4\modules\autoload\jaxr-module-1-3.jar, C:\Sun\jstudio_04Q4\Ent_04Q4\modules\autoload\jax-qname-module.jar]; see: http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/classpath.html#class-path
    Module patch or custom extension: C:\Sun\jstudio_04Q4\Ent_04Q4\modules\patches\org-netbeans-modules-editor\codetemplatesPatches.jar
    [org.netbeans.core.modules #4] Warning - had to upgrade dependencies for module org.netbeans.modules.jarpackager: added = [module org.netbeans.libs.regexp > 1.2] removed = [package org.apache.regexp > 1.2]; details: [Regexp is now available only as an autoload module, not on classpath: http://libs.netbeans.org/#regexp]
    [org.netbeans.core.modules #4] Warning - had to upgrade dependencies for module org.netbeans.modules.refactoring: added = [module org.openide.debugger > 1.0, token org.openide.compiler.CompilationEngine, module org.openide.compiler > 1.0, token org.openide.TopManager, module org.openide.execution > 1.0, token org.openide.windows.IOProvider, module org.openide.deprecated > 1.0, token org.openide.execution.ExecutionEngine] removed = []; details: [API separation phase I (#19443): http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I, API separation phase II (#19443): http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-II, Debugger API separation (#29914): http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-III]
    [org.netbeans.core.modules #4] Warning - had to upgrade dependencies for module org.netbeans.modules.web.tomcat.tomcat40: added = [module org.netbeans.libs.xerces/1 > 1.2] removed = [package [org.apache.xml.serialize.EncodingInfo]]; details: [Xerces is now available only as an autoload module, not in classpath: http://libs.netbeans.org/#xerces]
    [org.netbeans.core.modules #4] Warning - had to add recursive class loader dependencies for module org.netbeans.modules.refactoring on [org.netbeans.modules.classfile]; see http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-indirect-dep-cp
    [org.netbeans.core.modules #4] Warning - had to add recursive class loader dependencies for module com.sun.forte4j.j2ee.debugger on [org.openidex.util, org.netbeans.modules.web.core, org.netbeans.modules.schema2beans, org.netbeans.api.xml, org.netbeans.modules.jarpackager, javax.activation, org.netbeans.modules.vcscore, org.netbeans.libs.jaxp, org.netbeans.libs.xerces, org.netbeans.modules.projects, org.netbeans.modules.logger, org.netbeans.modules.html, com.sun.forte4j.j2ee.lib, org.netbeans.modules.clazz, javax.mail, org.netbeans.modules.image, com.sun.forte4j.modules.depclass, org.netbeans.libs.regexp]; see http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-indirect-dep-cp
    [org.netbeans.core.modules #6] Warning: the module org.netbeans.modules.jarpackager uses org.netbeans.libs.regexp which is deprecated: JDK 1.4 includes regular expression support which should be used instead: http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.6-jre-regexp
    [org.netbeans.core.modules #6] Warning: the module org.netbeans.modules.projects uses org.openide.deprecated which is deprecated: Clients of obsoleted Open APIs are encouraged to remove this dependency. See http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I
    [org.netbeans.core.modules #6] Warning: the module org.netbeans.modules.refactoring uses org.openide.deprecated which is deprecated: Clients of obsoleted Open APIs are encouraged to remove this dependency. See http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I
    [org.netbeans.core.modules #6] Warning: the module com.embarcadero.netbeans uses org.openide.deprecated which is deprecated: Clients of obsoleted Open APIs are encouraged to remove this dependency. See http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I
    [org.netbeans.core.modules #6] Warning: the module com.sun.forte4j.j2ee.debugger uses org.openide.deprecated which is deprecated: Clients of obsoleted Open APIs are encouraged to remove this dependency. See http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-I
    Type Groups Level Module Name
    err * 255 * (Default)
    Type Groups Level Module Name
    err * 255 * (Default)
    cfg 9 255 com.sun.forte4j.webdesigner
    Last execution suffered an abnormal exit at Sunday, May 22, 2005 10:15:18 PM EDT
    Log file not specified
    Turning on modules:
         org.openide/1 [4.26.1 041123]
         org.openide.loaders [4.11.1 041123]
         org.netbeans.core/1 [1.21.1 041123]
         org.openide.io [1.1.1 041123]
         org.netbeans.lib.terminalemulator [1.1.1 041123]
         org.netbeans.core.output/1 [1.1.1 041123]
         com.sun.tools.ide.collab/1 [7.0.0 041123]
         com.sun.im [7.0.0 041123]
         org.openide.src [1.1.1 041123]
         org.openide.execution [1.1.1 041123]
         org.openide.compiler [1.2.1 041123]
         org.netbeans.core.compiler/1 [1.4.1 041123]
         org.openide.debugger [1.1.1 041123]
         org.netbeans.modules.editor/1 [1.14.1 041123]
         org.netbeans.libs.xalan/1 [1.4.1 2.5.2]
         org.netbeans.libs.jaxp/1 [1.2.1 1.1.2]
         org.netbeans.api.xml/1 [1.3.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.xml.core/2 [1.1.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.xml.text/2 [1.1.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.classfile/1 [1.8 041123]
         org.netbeans.core.execution/1 [1.3.1 041123]
         org.netbeans.modules.clazz/1 [1.13.1 041123]
         org.netbeans.modules.javahelp/1 [2.1.1 041123]
         org.netbeans.modules.db/1 [1.8.2 041123]
         com.sun.forte4j.modules.dbmodel.jdbcimpl/1 [7.0.0 041123]
         org.openide.deprecated [1.3.1 041123]
         org.netbeans.core.deprecated [1.3.1 041123]
         org.netbeans.modules.debugger.core/3 [2.10.1 041123]
         org.netbeans.modules.debugger.jpda/1 [1.17.1 041123]
         org.netbeans.modules.j2eeserver/2 [1.7.3 041123]
         org.apache.xalan [2.2.2 Xalan 2.2.0 release]
         org.netbeans.modules.image/1 [1.11.1 041123]
         javax.activation/1 [1.0.2 1.0.2]
         javax.mail/1 [1.1.4 1.1.4]
         org.netbeans.modules.logger/1 [1.5 041123]
         com.sun.forte4j.modules.depclass/1 [2.4 041123]
         org.openidex.util/2 [2.7.1 041123]
         org.netbeans.modules.vcscore/1 [1.9.1 041123]
         org.netbeans.libs.regexp [1.2.1 1.2]
         org.netbeans.modules.jarpackager/2 [1.13.3 041123]
         org.netbeans.modules.schema2beans/1 [1.4.3 041123]
         org.netbeans.api.java/1 [1.3.1 041123]
         org.netbeans.libs.xerces/1 [1.4.1 2.6.0]
         org.netbeans.modules.java/1 [1.16.1 041123]
         com.sun.ffj.modules.licensemgr/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.lib/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.ejb/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.ejbmodule/1 [7.0.0 041123]
         org.netbeans.modules.projects/1 [1.14.1 041123]
         org.netbeans.modules.html/1 [1.12.1 041123]
         org.netbeans.modules.web.core/1 [1.16.3 041123]
         com.sun.forte4j.j2ee.appasm/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.appclient/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.j2eeconn/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.importear/1 [7.0.0 041123]
         org.netbeans.modules.diff/1 [1.7.1 041123]
         org.netbeans.modules.vcs.advanced/1 [1.9.1 041123]
         org.netbeans.modules.vcs.profiles.clearcase/1 [1.2 041123]
         org.netbeans.modules.xml.catalog/2 [1.1.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.properties/1 [1.11.1 041123]
         org.netbeans.modules.i18n/1 [1.14.1 041123]
         org.netbeans.modules.javadoc/1 [1.11.1 041123]
         javax.xml.namespace/1 [1.0 1.0]
         com.sun.xml.messaging1_3/1 [1.0 1.0]
         com.sun.xml.registry1_3/1 [1.0 1.0]
         com.sun.tools.jaxrpc_cmn/1 [1.1 1.1]
         com.sun.xml.rpc1_3/1 [1.0 1.0]
         com.sun.forte4j.j2ee.wsdl/1 [7.0.0 041123]
         org.netbeans.modules.servletapi23/1 [1.3.2 041123]
         org.netbeans.modules.web.jspparser/1 [1.5.2 041123]
         org.netbeans.modules.web.tomcat.tomcat40/1 [1.8.3 041123]
         com.sun.forte4j.genericgenerator4/1 [1.1.1 020327]
         org.netbeans.modules.web.ie/1 [1.15.3 041123]
         com.sun.forte4j.webdesigner.xmlservice/1 [7.0.0 041123]
         com.sun.tools.ide.j2eeant/1 [7.0.0 041123]
         org.netbeans.modules.xml.schema/1 [1.1.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.filecopy/1 [1.11 041123]
         org.netbeans.modules.group/1 [1.0.1 041123]
         org.netbeans.modules.settings/1 [1.4.1 041123]
         org.netbeans.tasklistapi/1 [1.7.1.2 2 041123]
         org.netbeans.modules.tasklist.core/2 [1.22.1.26 6 041123]
         org.netbeans.modules.suggestions_framework/2 [1.2.1.265 5 041123]
         org.netbeans.modules.tasklist.docscan/2 [1.13.1.2653 3 041123]
         com.sun.forte4j.codetemplates/1 [7.0.0 @BUILD_NUMBER_SUBST@]
         com.sun.tools.vcsscc/1 [7.0.0 041123]
         com.sun.tools.vcsscc.profiles.vss/1 [7.0.0 041123]
         com.sun.forte4j.modules.pointbase/1 [7.0.0 041123]
         org.netbeans.core.windows/2 [2.0.1 041123]
         org.netbeans.core.ui/1 [1.3.1 041123]
         org.netbeans.modules.utilities/1 [1.15.1 041123]
         org.netbeans.modules.autoupdate/1 [2.8.1 041123]
         org.netbeans.modules.welcome/1 [1.5.1 041123]
         org.apache.soap [2.2.1 SOAP 2.2 release]
         org.netbeans.lib.cvsclient/1 [1.8.1 041123]
         org.netbeans.modules.vcs.profiles.cvsprofiles/1 [1.3.1 041123]
         org.netbeans.modules.applet/1 [1.14.1 041123]
         org.netbeans.modules.web.debug/1 [1.8.2 041123]
         org.netbeans.modules.web.core.syntax/1 [1.12.3 041123]
         com.sun.jato.tools.sunone.ee/1 [2.1.4 20041123.213634]
         org.netbeans.modules.usersguide/1 [1.13.1 041123]
         com.sun.forte4j.ee_examples/1 [7.0.0 041123]
         org.netbeans.modules.css/2 [1.1.1.3.6.0 3.6.0 041123]
         com.sun.tools.j2mews/1 [7.0.0 041123]
         org.ksoap/1 [1.0.1 kSOAP release 1.0]
         org.netbeans.modules.vcs.cmdline.compat/1 [1.3.1 041123]
         org.netbeans.modules.form/2 [1.13.1 041123]
         com.sun.tools.ide.collab.channel.mdc/1 [7.0.0 041123]
         org.netbeans.modules.servletapi/1 [1.3.1 041123]
         org.netbeans.modules.web.taglibed/1 [1.11.3 041123]
         com.sun.tools.dbdrivers/1 [7.0.0 041123]
         org.netbeans.modules.refactoring/1 [7.0.0 041123]
         org.netbeans.modules.web.assemblee/1 [1.2.1 041123]
         com.sun.tools.ide.portal.portlet/1 [1.0 041123]
         com.sun.tools.crashreporter [7.0.0 041123]
         org.netbeans.modules.text/1 [1.12.1 041123]
         com.embarcadero.netbeans/2 [1.0 041123]
         com.sun.tools.modules.cvsdisabler/1 [7.0.0 041123]
         com.sun.tools.vcsscc.profiles.pvcs/1 [7.0.0 041123]
         com.sun.tools.ide.collab.channel.chat/1 [7.0.0 041123]
         org.netbeans.modules.i18n.form/2 [1.12 041123]
         org.netbeans.modules.properties.syntax/1 [1.11 041123]
         org.netbeans.modules.cvsclient/1 [2.0.1 041123]
         com.sun.tools.ide.collab.channel.filesharing/1 [7.0.0 041123]
         com.sun.forte4j.j2ee.ejbtest/1 [7.0.0 041123]
         org.netbeans.modules.httpserver/1 [1.13.1 041123]
         org.netbeans.modules.jdbc/1 [7.0.0 041123]
         com.sun.jdo.modules.persistence.mapping.core/1 [7.0.0 041123]
         com.sun.jdo.modules.persistence.mapping.ejb/1 [7.0.0 041123]
         org.netbeans.modules.web.tomcat.tomcat40.autocompile/1 [7.0.0 041123]
         org.netbeans.modules.junit/2 [2.11.1 041123]
         com.sun.ffj.modules.registration/1 [7.0.0 041123]
         org.netbeans.modules.xsl/1 [1.1.1.3.6.0 3.6.0 041123]
         com.sun.forte4j.webdesigner.jwsdp/1 [7.0.0 041123]
         org.netbeans.modules.extbrowser/1 [1.3.1 041123]
         com.sun.forte4j.j2ee.debugger/1 [7.0.0 041123]
         com.sun.xml.messaging1_0_01/1 [1.0 1.0]
         com.sun.xml.rpc1_0_01/1 [1.0 1.0]
         org.netbeans.modules.web.monitor/1 [1.8.3 041123]
         org.netbeans.core.ide/1 [1.3.1 041123]
         org.apache.tools.ant.module/3 [3.6.1 041123]
         javax.portlet/1 [1.0 041123]
         org.netbeans.modules.autoupdateffj/1 [7.0.0 041123 ]
         com.sun.tools.profiler.monitor [7.2.4 041123]
         org.netbeans.modules.beans/1 [1.11.1 041123]
         com.sun.enterprise.webserver.tools/1 [7.0.0 PLUGINVERSION]
         com.sun.portal.devtool/1 [1.0 041123]
         com.sun.tools.ide.collab.ui/1 [7.0.0 041123]
         org.netbeans.modules.xml.tax/2 [1.1.1.3.6.0 3.6.0 041123]
         org.netbeans.modules.xml.tools/2 [1.1.1.3.6.0 3.6.0 041123]
         com.sun.appserv.tools.forte/1 [7.0.0 041123]
         org.netbeans.modules.web.dd.editors/1 [1.1.2 041123]
    QuantumAutoupdateModule 1116814706515 starting check
    Warning - org.netbeans.modules.projects.SetMainClassCookieAction should override CallableSystemAction.asynchronous() to return false
    Warning - org.netbeans.modules.debugger.delegator.DefaultDebuggerType should have overridden startDebugger(DataObject,boolean); falling back on deprecated ExecInfo usage; see: http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.5i-sep-II-ExecInfo

  • HELP ON java.lang.String,int

    Im very new to java.please help!!!
    im having this error after compiling this:-
    public boolean setBookname(String newName)
              if (newName >0)
                   BookName = newName;
              else
                   return false;
    A:\Book.java:30: operator > cannot be applied to java.lang.String,int
              if (newName >0)
    ^
    1 error
    Process completed.
    thank u!

    The OP should read about IllegalArgumentException.Indeed. And a few other things as well...
    http://java.sun.com/docs/books/tutorial/
    http://java.sun.com/learning/new2java/index.html
    http://javaalmanac.com
    http://www.jguru.com
    http://www.javaranch.com
    Bruce Eckel's Thinking in Java
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java

  • 2 errors: static context & java.lang.String

    I get the following 2 errors when I try and compile my code. What do I need to do in order to fix this problem?
    Any help appreciated.
    C:\>javac DraftD.java
    DraftD.java:54: non-static variable MAXIMUM cannot be referenced from a static context
    if(temp <= MAXIMUM)
    ^
    DraftD.java:54: operator <= cannot be applied to java.lang.String,int
    if(temp <= MAXIMUM)
    ^
    2 errors
    import java.io.*;
    import java.util.*;
    public class DraftD
    final int MAXIMUM = 20;
    public static void main(String[] args) throws IOException
    try
    Runtime program = Runtime.getRuntime();
    Process proc = program.exec("cmd.exe /c C:/ntpq.exe -p >C:/answer.txt");
    try{
    proc.waitFor();
    catch (InterruptedException e){}
    catch(IOException e1)
    int i = 0;
    BufferedReader br = new BufferedReader(new FileReader("C:/answer.txt"));
    String line = "";
    while ((line = br.readLine()) != null)
    i++;
    if(i==3) break;
    br.close();
    if(i==3)
    StringTokenizer st = new StringTokenizer(line," ");
         int k=1;
    while(st.hasMoreTokens())
         String temp = st.nextToken();
    if(k==2){
              String secondToken = temp;
    if(temp <= MAXIMUM)
              {System.out.println("less than Max");}
         k++;
    else System.out.println("less than 3 lines in file");
    System.exit(0);
    }

    You should use Integer.parseInt(temp); to convert temp to an int
    Because MAXIMUM is not static, every DraftD object will have one, that's the way properties work.
    main() however is static, and so there is only one between all the DraftD objects.
    It is a bit harder to explain with main(), but suppose we did this:public class ABC
      public int x;
      public static int getX()
        return x;
    ABC a = new ABC();
    ABC b = new ABC();
    a.x = 1;
    b.x = 2;
    int result = ABC.getX();should result be 1 or 2? it doesn't know which x to get, so the compiler complains.
    if MAXIMUM is a constant, you should make it public static final

  • Java.lang.InstantiatiCould not read mime-mappings config file: ./mime.types

    I am about to had enough of this moronic container call OC4J that's compatible to to itself.
    I did a
    1. clean unzip and installation.
    2. setup admin account.
    3. config the autodeploy in server.xml (Who in their right phreakin mind design a container with no hot deploy nowaday).
    4. configure the data source.
    5. test data source using a webapp with one page jsp do a JSF jdbc connection.
    When try and deploy the error-free webapp (tested in tomcat) using both frontend and autodeploy,a cryptic error occur: could not read mime.types.
    I have never see this error before in my life. its in oracle.oc4j.admin.internal.ApplicationDeployer.addApplication
    This error happened after I configure my webapp to do phreakin orion-application.xml disable toplink, orion-webapp xml prefer local class file. If I don't get this resolve within couple days, I'll put my career on the line with full force and request we do not use OC4J anywhere in this group.
    A M$FT .NET project looks very promising and efficient compare this deployment hell they call OC4J
    2007-06-20 13:22:50.500 NOTIFICATION Application Deployer for norm STARTS.
    2007-06-20 13:22:50.546 NOTIFICATION Copy the archive to C:\oc4j101320_SA\j2ee\home\applications\norm.ear
    2007-06-20 13:22:50.890 NOTIFICATION Initialize C:\oc4j101320_SA\j2ee\home\applications\norm.ear begins...
    2007-06-20 13:22:50.890 NOTIFICATION Auto-unpacking C:\oc4j101320_SA\j2ee\home\applications\norm.ear...
    2007-06-20 13:22:50.890 NOTIFICATION Unpacking norm.ear
    2007-06-20 13:22:50.890 NOTIFICATION Unjar C:\oc4j101320_SA\j2ee\home\applications\norm.ear in C:\oc4j101320_SA\j2ee\home\applications\norm
    2007-06-20 13:22:53.625 NOTIFICATION Done unpacking norm.ear
    2007-06-20 13:22:53.625 NOTIFICATION Finished auto-unpacking C:\oc4j101320_SA\j2ee\home\applications\norm.ear
    2007-06-20 13:22:53.640 NOTIFICATION Auto-unpacking C:\oc4j101320_SA\j2ee\home\applications\norm\norm.war...
    2007-06-20 13:22:53.640 NOTIFICATION Unpacking norm.war
    2007-06-20 13:22:53.640 NOTIFICATION Unjar C:\oc4j101320_SA\j2ee\home\applications\norm\norm.war in C:\oc4j101320_SA\j2ee\home\applications\norm\norm
    2007-06-20 13:22:59.828 NOTIFICATION Done unpacking norm.war
    2007-06-20 13:22:59.828 NOTIFICATION Finished auto-unpacking C:\oc4j101320_SA\j2ee\home\applications\norm\norm.war
    2007-06-20 13:22:59.906 NOTIFICATION Initialize C:\oc4j101320_SA\j2ee\home\applications\norm.ear ends...
    2007-06-20 13:22:59.906 NOTIFICATION Starting application : norm
    2007-06-20 13:22:59.906 NOTIFICATION Initializing ClassLoader(s)
    2007-06-20 13:22:59.906 NOTIFICATION Initializing EJB container
    2007-06-20 13:22:59.906 NOTIFICATION Loading connector(s)
    2007-06-20 13:23:00.062 NOTIFICATION Starting up resource adapters
    2007-06-20 13:23:00.078 NOTIFICATION Initializing EJB sessions
    2007-06-20 13:23:00.078 NOTIFICATION Committing ClassLoader(s)
    2007-06-20 13:23:00.078 NOTIFICATION Initialize norm begins...
    2007-06-20 13:23:00.187 NOTIFICATION application : norm is in failed state
    07/06/20 13:23:00 WARNING: Application.setConfig Application: norm is in failed state as initialization failed.
    java.lang.InstantiationException: Error loading web-app 'norm' at C:\oc4j101320_SA\j2ee\home\applications\norm\norm: Could not read mime-mappings config file: ./mime.types
    07/06/20 13:23:00 oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException: Application: norm is in failed state as initialization failed
    07/06/20 13:23:00 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:515)
    07/06/20 13:23:00 at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:196)
    07/06/20 13:23:00 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    07/06/20 13:23:00 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    07/06/20 13:23:00 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    07/06/20 13:23:00 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    07/06/20 13:23:00 at java.lang.Thread.run(Thread.java:595)
    07/06/20 13:23:00 Caused by: java.lang.InstantiationException: Application: norm is in failed state as initialization failed
    07/06/20 13:23:00 at com.evermind.server.Application.setConfig(Application.java:497)
    07/06/20 13:23:00 at com.evermind.server.Application.setConfig(Application.java:340)
    07/06/20 13:23:00 at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1879)
    07/06/20 13:23:00 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:512)
    07/06/20 13:23:00 ... 6 more
    07/06/20 13:23:00 Caused by: java.lang.InstantiationException: Error loading web-app 'norm' at C:\oc4j101320_SA\j2ee\home\applications\norm\norm: Could not read mime-mappings config file: ./mime.types
    07/06/20 13:23:00 at com.evermind.server.http.XMLHttpApplicationConfigContext.getConfiguration(XMLHttpApplicationConfigContext.java:155)
    07/06/20 13:23:00 at com.evermind.server.Application.getHttpApplicationConfig(Application.java:593)
    07/06/20 13:23:00 at com.evermind.server.Application.initHttp(Application.java:1345)
    07/06/20 13:23:00 at com.evermind.server.Application.setConfig(Application.java:451)
    07/06/20 13:23:00 ... 9 more
    2007-06-20 13:23:00.218 NOTIFICATION Application Deployer for norm FAILED.
    2007-06-20 13:23:00.218 NOTIFICATION Application UnDeployer for norm STARTS.
    2007-06-20 13:23:00.281 NOTIFICATION Removing all web binding(s) for application norm from all web site(s)
    07/06/20 13:23:00 SEVERE: ProgressObjectImpl.reportError java.lang.InstantiationException: Application: norm is in failed state as initialization failedoracle.oc4j.admin.jmx.shared.exceptions.InternalException: java.lang.InstantiationException: Application: norm is in failed state as initialization failed
    at oracle.oc4j.admin.jmx.shared.deploy.NotificationUserData.<init>(NotificationUserData.java:107)
    at oracle.oc4j.admin.internal.Notifier.reportError(Notifier.java:429)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:123)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.oc4j.admin.internal.DeployerException: java.lang.InstantiationException: Application: norm is in failed state as initialization failed
    at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:515)
    at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:196)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    ... 4 more
    Caused by: java.lang.InstantiationException: Application: norm is in failed state as initialization failed
    at com.evermind.server.Application.setConfig(Application.java:497)
    at com.evermind.server.Application.setConfig(Application.java:340)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1879)
    at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:512)
    ... 6 more
    Caused by: java.lang.InstantiationException: Error loading web-app 'norm' at C:\oc4j101320_SA\j2ee\home\applications\norm\norm: Could not read mime-mappings config file: ./mime.types
    at com.evermind.server.http.XMLHttpApplicationConfigContext.getConfiguration(XMLHttpApplicationConfigContext.java:155)
    at com.evermind.server.Application.getHttpApplicationConfig(Application.java:593)
    at com.evermind.server.Application.initHttp(Application.java:1345)
    at com.evermind.server.Application.setConfig(Application.java:451)
    ... 9 more

    Thank you Steve for your help. I really do appreciate ppl taking the time to answer questions from n00b like me.
    I tried and disable global.libraries and global.tag.libraries when deploy, and at one point the login page (its Spring 1.2.8 + hibernate 3.1.3 + Myface 1.1.4 + acegi 1.0.1 ) came out, but cannot login and without exceptions, so I was guessing acegi poblem. But the spring and hibernate is working, I can see the conn and other activities. And after a couple tries, cannot even get the login page display now in MyFace, with exceptions:
    include(java.lang.String) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.String,boolean)
    And then after some googling found out there will be code change for this webapp as well.
    - change webapp.listener for double instantiation in OC4J (Code Change)
    - create new class OrionSessionListener implements HttpSessionListener for session invalidation (Code Change) NEW JAVA CLASS
    - acegi j_security_check URL reference change (Code Change, but minor)
    I think the container has great performance, but I just wish they can look more to the compatabilities/common practices issues
    full stacktrace:
    2007-06-22 14:12:04.437 NOTIFICATION J2EE JSP-0008 Unable to dispatch JSP Page : oracle.jsp.provider.JspCompileException: Errors compiling:C:\oc4j101320_SA\j2ee\home\application-deployments\norm\norm\persistence\_pages\\_login.java
    [jsp src:line #:13] include(java.lang.String) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.String,boolean)
    pageContext.include( __url,false);
         at oracle.jsp.app.JspJavacCompiler.compile(JspJavacCompiler.java:304)
         at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:731)
         at oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:456)
         at oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:413)
         at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:705)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:694)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:597)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:521)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
         at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:375)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)

  • Weblogic.servlet.jsp.StaleChecker cannot be applied

    Hi,
    I am getting the following error when i try to access the web application deployed
    on the weblogic 8.1 sp2 application server. The same works fine on weblogic 7.1.
    Please let me know if any of you came across this problem.
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_rttm_rttm\jsp_servlet\__login.java:49:
    isResourceStale(java.lang.String,long,java.lang.String) in weblogic.servlet.jsp.StaleChecker
    cannot be applied to (java.lang.String,long,java.lang.String,java.lang.String)
    (No more information available, probably caused by another error.
    Thanks in advance
    -Nagaraju

    May be the weglogic.jar used in your web application is differ with the current
    bea home's.
    "Nagaraju" <[email protected]> wrote:
    >
    Hi,
    I am getting the following error when i try to access the web application
    deployed
    on the weblogic 8.1 sp2 application server. The same works fine on weblogic
    7.1.
    Please let me know if any of you came across this problem.
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_rttm_rttm\jsp_servlet\__login.java:49:
    isResourceStale(java.lang.String,long,java.lang.String) in weblogic.servlet.jsp.StaleChecker
    cannot be applied to (java.lang.String,long,java.lang.String,java.lang.String)
    (No more information available, probably caused by another error.
    Thanks in advance
    -Nagaraju

  • Java.lang.Float

    Is the function "public int compareTo(java.lang.Float)" defined in java.lang.Float overloaded with
    "public int compareTo(java.lang.Object)"?
    A javap of java.lang.Float shows that it is so,while the compiler has a different answer.With java version "1.4.2_08",the compareTo function accepts Object as an argument, but with java version "1.5.0_06" it throws the following warning:
    LangTest.java:5: compareTo(java.lang.String) in java.lang.String cannot be applied to (java.lang.Object)This problem seems to exist for the compareTo function in all wrapper classes..

    Is the function "public int
    compareTo(java.lang.Float)" defined in
    java.lang.Float overloaded with
    "public int compareTo(java.lang.Object)"?
    A javap of java.lang.Float shows that it is so,while
    the compiler has a different answer.With java version
    "1.4.2_08",the compareTo function accepts Object as
    an argument, but with java version "1.5.0_06" it
    throws the following warning:
    LangTest.java:5: compareTo(java.lang.String) in
    java.lang.String cannot be applied to
    (java.lang.Object)This problem seems to exist for the compareTo
    function in all wrapper classes..that's because Comparable has been made generic
    so a String is not "just" a Comparable anymore, now it's a Comparable<String>

  • CompareTo(Comparable) cannot be applied to...

    When I try to compile my set of files, while trying to create a priority queue, I get the following errors:
    Lijst.java:53: compareTo(Comparable) in Comparable cannot be applied to (java.lang.Object)
        if (lst == null || x.compareTo (lst.wrd) <= 0 ) {
                            ^
    Lijst.java:58: compareTo(Comparable) in Comparable cannot be applied to (java.lang.Object)
        while (h.succ != null && x.compareTo (h.succ.wrd) > 0) {
                                  ^
    Lijst.java:69: compareTo(Comparable) in Comparable cannot be applied to (java.lang.Object)
        if (lst == null || x.compareTo (lst.wrd) < 0 ) {
                            ^
    Lijst.java:74: compareTo(Comparable) in Comparable cannot be applied to (java.lang.Object)
        while (h.succ != null && x.compareTo (h.succ.wrd) > 0) {
                                  ^
    Lijst.java:78: compareTo(Comparable) in Comparable cannot be applied to (java.lang.Object)
        if (h.succ == null || x.compareTo (h.succ.wrd) < 0) {But x was typecasted to a Comparable in Lijst.java:
      void voegIn (Object y) {
        Comparable x = (Comparable) y;
        if (lst == null || x.compareTo (lst.wrd) <= 0 ) {
          zetVoor (x);
          return;
      }Why does Java forget that typecast???

    But that's why I've tried to typecast it to a
    Comparable. Because the argument of the compareTo
    function will be of type Toestand which implements
    Comparable.
    What's the alternative for this, if this is all
    wrong??Looks like you'll need to cast both the reference to
    the object whose method you're invoking and the
    reference to the argument. Comparable foo = (Comparable)bar;
    bar.compareTo((Comparable)lst.wrd); Or something like that.And of course this only works if lst.wrd points to an object that actually does implement Comparable.

  • Runtime Error: java.lang.ClassCastException

    My project is to creat a postfix with boolean. I finished my code, it compiled great, than I got an java.lang.ClassCastException. So obviously I have a casting problem. Any help or hints in the right direction would be greatly appreciated.
         import java.util.*;    
    import javax.swing.*;
    public class KimbelPostfix
        public static void main(String[] args)
         String expression;
         String token;
         String operator;
         String myString = "true";
         StringTokenizer tokens;
         Boolean operand1, operand2, result = true;
         //create empty stack of pending boolean operands
         Stack operandStack = new Stack(); 
         expression = JOptionPane.showInputDialog( "Enter postfix expression" );
         tokens = new StringTokenizer(expression);
         while (tokens.hasMoreTokens())
             token = tokens.nextToken();
             if (!isOperator(token))   //operand
                 new Boolean(myString);
                 myString = token;
                 operandStack.push(token); 
             //  printStack(operandStack);   //display stack at each step. Debugging
             else
             {   //token is an operator
                 //pop two booleans off stack.
                 //convert popped Object to boolean, extract boolean
                 operand2 = ((Boolean)operandStack.pop()).booleanValue();
                 operand1 = ((Boolean)operandStack.pop()).booleanValue();  //"first" one
              if (token.equals("!"))
                  operandStack.push(token);
                  result = operand1 && !operand2;
              else if (token.equals("&&"))
                  result = operand1 && operand2;
              else if (token.equals("||"))
                  result = operand1 || operand2;
              operandStack.push(new Boolean(result)); 
         //only object in stack is the answer
         result =  ((Boolean)operandStack.pop()).booleanValue();
         JOptionPane.showMessageDialog(null,expression+" = "+result);
         System.exit(0);
        static boolean isOperator(String t) {
             if (t.equals("!") || t.equals("&&") || t.equals("||"))
                 return true;
             else
                 return false;
        static void printStack( Stack s)
         System.out.print("Stack is: ");
            Iterator items = s.iterator();
            while (items.hasNext())
            System.out.print(items.next()+"  ");
            System.out.println();
         

    When I run the program and enter "false false ||" I get the slightly more useful error message:
    Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean\\     at KimbelPostfix.main(KimbelPostfix.java:38)Now line 38 is the one in the else part of the while loop, that says:operand2 = ((Boolean)operandStack.pop()).booleanValue();Evidently what you were casting to a Boolean - operandStack.pop() - is a String. And you can't cast Strings to Booleans like that. So the questions are "what were you expecting to be on the stack?" and "what was actually on the stack?".
    You already have a method that will help answer the second question. As regards the first, if you were expecting a Boolean on the stack you had better go back to whereever you push things onto the stack and see why it's a String not a Boolean.
    Edited by: pbrockway2 on Dec 17, 2007 2:05 PM
    I've just read the edit of your last post, and I agree with petes1234. No-one here is going to write the code for you. That's not trying to be discouraging or dismissive: just saying how things are.
    There are signs of dispair in the myString variable, and the way you (attempt to) handle the unary ! operator. If you're tired and "fiddling around" to no productive effect your best bet would be to step away from the computer and do something else for a few hours.

  • Custom ClassLoader - fails to load java/lang/Object

    I have created a custom class loader based substantially on Jim Farley's code in "Java Distributed Computing" pp 39-44.
    The code does get a URL connection, download the class file, but fails when it tries to load (re-load) java/lang/Object. My understanding is that the same (custom) class loader is also used to load dependent classes (needed by the class your are originally loading). I had assumed that this would be handled by the call to findSystemClass() I had assumed.
    Any help or direction is appreciated,
    Jeff.
    Here is the output:
    File=/tasks/Person.class
    Host=n01
    Trying to load:/tasks/Person
    Check system :/tasks/Person
    Not found in System:/tasks/Person
    Check stream:/tasks/Person
    Class file is 815 bytes.
    Available = 815
    RemoteClassLoader: Reading class from stream...
    RemoteClassLoader: Defining class...
    java.lang.ClassNotFoundException: Cannot find class definition:
    java.lang.NoClassDefFoundError: java/lang/Object
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
         at RemoteClassLoader.readClass(RemoteClassLoader.java:83)
         at RemoteClassLoader.loadClass(RemoteClassLoader.java:139)
         at TestRemoteClassLoader.main(TestRemoteClassLoader.java:18)
    Class was not loaded.Here is the code:
    import java.lang.*;
    import java.net.*;
    import java.io.*;
    import java.util.Hashtable;
    public class RemoteClassLoader extends ClassLoader {
       URL classURL = null;
       InputStream classStream = null;
       java.lang.Object o = null;
       Hashtable classCache = new Hashtable();
       InputStream source = null;
       // Constructor
       public RemoteClassLoader()
       // Parse a class name from a class locator (URL, filename, etc.)
       protected String parseClassName(String classLoc)
          throws ClassNotFoundException
             String className = null;
             try { classURL = new URL(classLoc); }
             catch (MalformedURLException malex) {
                throw new ClassNotFoundException("Bad URL \"" + classLoc + "\"given: " + malex);
             System.out.println("File=" + classURL.getFile());
             System.out.println("Host=" + classURL.getHost());
             String filename = classURL.getFile();
             // Make sure this is a class file
             if (!filename.endsWith(".class"))
                throw new ClassNotFoundException("Non-class URL given.");
             else
                className = filename.substring(0,filename.lastIndexOf(".class"));
             return className;
       // Initialize the input stream from a class locator
       protected void initStream(String classLoc)
          throws IOException
             classStream = classURL.openStream();
       // Read a class from the input stream
       protected Class readClass(String classLoc, String className)
          throws IOException, ClassNotFoundException
             //See how large the class file is.
             URLConnection conn = classURL.openConnection();
             int classSize = conn.getContentLength();
             System.out.println("Class file is " + classSize + " bytes.");
             // Read the class bytecodes from the stream
             DataInputStream dataIn = new DataInputStream(classStream);
             int avail = dataIn.available();
             System.out.println("Available = " + avail);
             System.out.println("RemoteClassLoader: Reading class from stream...");
             byte[] classData = new byte[classSize];
             dataIn.readFully(classData);
             // Parse the class definition from the bytecodes
             Class c = null;
             System.out.println("RemoteClassLoader: Defining class...");
             try{ c = defineClass(null, classData, 0, classData.length); }
             catch (ClassFormatError cfex) {
                throw new ClassNotFoundException("Format error found in class data.");
             catch (NoClassDefFoundError clsdeferr) {
                clsdeferr.printStackTrace();           
                throw new ClassNotFoundException("Cannot find class definition:\n" + clsdeferr);
             return c;
       // load the class
       public Class loadClass(String classLoc, boolean resolve)
          throws ClassNotFoundException
             String className = parseClassName(classLoc);
             Class c;
             System.out.println("Trying to load:" + className);
             //maybe already loaded
             c = findLoadedClass(className);
             if (c!=null) {
                System.out.println("Already loaded.");
                return c;
             c = (Class) classCache.get(className);
             if (c!=null) {
                System.out.println("Class was loaded from cache...");
                return c;
             System.out.println("Check system :" + className);
             // Not in cache, try the system class...
             try {
                c = findSystemClass(className);
                if (c!=null) {
                   System.out.println("System class found...");
                   classCache.put(className, c);
                   return c;
             catch (ClassNotFoundException cnfex) {
                System.out.println("Not found in System:" + className);
                ; // keep looking
             System.out.println("Check stream:" + className);
             // Not in system either, so try to get from tthe stream
             try {initStream(classLoc); }
             catch (IOException ioe) {
                throw new ClassNotFoundException("Failed opening stream to URL.");
             // Read the class from the input stream
             try {c = readClass(classLoc, className); }
             catch (IOException ioe) {
                   throw new ClassNotFoundException("Failed reading class from stream: " + ioe);
             // Add the new class to the cache for the next reference.
             classCache.put(className, c);
             // Resovle the class, if requested
             if (resolve)
                resolveClass(c);
             return c;

    Never mind - I've figure it out.
    The problem is that the ClassLoader calls RemoteClassLoader.loadClass() to load in java.lang.Object, which is fine. But, my code tries to first create a URL from this, which fails, eventually throwing a NoClassDefFoundError.
    I have fixed it by delaying the call to parseName() until after checking loaded classes and system classes.

  • Re: cannot be applied to (double,java.lang.String)

    It's telling you what the problem is -- you're trying to pass a String in where a double is required. Java is a strongly typed language, which means that you can't expect types to change automatically into other types as needed.
    You could, I suppose, parse the string, assuming that it holds a representation of a double. But if you look at the method in question, you'll see that it doesn't even use its second (double) argument.
    So you should ask yourself:
    1) should that method really take two arguments?
    2) what is the second argument for, if I did use it?
    3) what is the best type to represent the second argument?
    (hint: with a name like "customerType", then an enum seems likely)
    [add]
    Too slow again.
    Though I'll also add: please wrap any code you post in [code][/code] tags. It makes your code much easier to read.
    Message was edited by:
    paulcw

    >  String n ;
    n = JOptionPane.showInputDialog(null, "Enter Month No.:");
    pow(double,double) in java.lang.Math cannot be
    applied to (double,java.lang.String)Read the error diagnostic carefully: the compiler found a pow() method
    in the Math class, but it takes two doubles as its arguments. You,
    however, supplied a double and a String as the parameter types.
    The method found by the compiler cannot be applied to your parameters.
    hint: you have to convert that String to a double,
    kind regards,
    Jos

Maybe you are looking for

  • New player freezes with Linux+Firefox+Firebug.

    Any page (or tab) playing a flash video (youtube for example) freezes firefox when closed when firebug is loaded as a module. This only applies to flash video's being played and intermittently fails to crash. This message is cross posted to the bug r

  • Ipod classic not showing up as a device

    my pc is not recognizing my ipod classic as a device...it shows up sometimes as a device and when I click on it, it disappers and then locks up my pc.....please help

  • Select Query and Recordset on same page

    I have been workig with Coldfusion for a while now.  Where I work there is a need for web pages to extract data from data sources.  I have been successful at doing this.  Typically I use a form that selects multiple criteria, which when submitted loa

  • Using Provide statement in HR programming

    Hi, Im using the code below; PROVIDE FROM p2001 BETWEEN pn-begda AND pn-endda    WHERE p2001-subty = '0101'. ENDPROVIDE. But the subty = 0101 doesnt seem to be working. When i look at the p2001 table after i execute the code, it does limit within the

  • Getting the certificate has an invalid signature error on one of my company's intranet sites.

    Immediately after upgrading to FF35, I've lost the ability to access key parts of our intranet. I understand from other related forum questions that FF reps don't believe that typical users will encounter the problem of needing to access self-signed