Implements the method defined in interface

I defined a interface such as
interface IAuthorizer{
boolean checkPermission(Set<IAttribute> subj, Set<IAttribute> Permission);
In java 5, why does compiler not accept the method checkPermission signature of the following class
class Auth1 implements IAuthorizer{
boolean checkPermission(Set<IAttribute> subj, Set<IAttribute> Permission){
Iclass Auth1 implements IAuthorizer{
boolean checkPermission(Set subj, Set Permission){
nstead, the compiler only accepts

<If you compile the interface and the class in the same time (eg not having the interface in a jar file against which to compile the class), the compiler should accept your code.>
The interface and class is even in the same package. The compiler does not accept method signature as
boolean checkPermission(Set<IAttribute> subj, Set<IAttribute> perms)
<If your interface is part of a library jar file, could it be that
- the library is obfuscated using an obfuscater that doesn't know about generics?
- the class is written against JDK 1.4 API (in which Set is not generic)?
- the class is compiled using java 1.4 compiler?
>
no library is involved in the issue.
class is written in JDK 1.5 API and use JDK 1.5 compiler.

Similar Messages

  • I cannot find the method in this interface!

    Is service an interface and query its method in the following scrips? But I cannot find the method query in this interface. What is the function of new?
    Map map = service.query(new FreeMemAgent(), null);
    Thank you
    Edited by: jetq on Jun 7, 2009 9:05 PM

    Hi Frank,
    service is a reference variable and refers to an instance of a class that implements the query() method that returns a reference to an instance of a class that implements the Map interface. If service happens to refer to an instance of a class that implements the InvocationService interface, you can find the Coherence 3.4.2 documentation of the method at InvocationService. The new keyword is a Java operator that creates an object. Continuing with the assumption that service refers to an instance of a class that implements the InvocationService interface, the FreeMemAgent class must implement the Invocable interface. A reference to a "new" FreeMemAgent object is being passed to the query() method.
    Regards,
    Harv

  • A Bean must implement the java.io.Serializable interface? What makes the di

    Hi, I have took an example from sun notes on JavaBeans (you can find the example here http://java.sun.com/developer/onlineTraining/Beans/beans02/page2.html). The code is like this.....
    import java.awt.*;
    import java.io.Serializable;
    public class SimpleBean extends Canvas
                     implements Serializable {
      private Color color = Color.green;
      //getter method
      public Color getColor() {
         return color;
      //setter method
      public void setColor(Color newColor) {
         color = newColor;
         repaint();
      //override paint method
      public void paint (Graphics g) {
         g.setColor(color);
         g.fillRect(20,5,20,30);
      //Constructor: sets inherited properties
      public SimpleBean() {
         setSize(60,40);
         setBackground(Color.red);
    }I didn't find any difference in executing the program by implementing the Serializable interface and without implementing. On choosing serialize component in the File Menu, I serialized the component after changing its color (property), and saved as .ser file. And created the .Jar file including .ser file. when I load the jar file and place the bean in the beanbox, it is showing the bean that is updated. This can be done by implemeting Serializable interface and without implementing Serializable interface also. And I have a statement that has been given in the notes provided by SUN. That is ' Bean must implement the Serializable interface. Objects that support this interface can save and restore their state from disk '. I couldnot come up with the summation of this statement.
    Anyone who has an idea... please give an explanation.
    Thank you.

    Maybe you should show us your coding how you saved your beans state.
    Are you serious that you save the special object? Or do you save the values of the object into a file and load those values into a new object?

  • Return variable sizes array in methods defined by Interface

    Hi there,
    I'm not really active on this forum and I have a strange question. I have to return an array of values in an interface. But this array can be 2D or 3D... Is there a quick and dirty solution to do so?
    My first test was to typecast... of course, I cannot. We are not using C++ for a reason ;-)
    Then I guess, I should define a class defining this array or defining an 2D array of objects (1D array or value)...
    Is there any other way to do that? As you guess, a quick and dirty solution would be sufficient!! :p
    Thanks for you help, and at least for reading this post.
    PY

    Well done... I didn't go far enough in the hierarchy. I can get back the functionality of arrays even by typecasting as Object.
    Thanks!!

  • Is there a quick fix option for implementing the unimplemented methods for an interface?

    Hi guys,
    It's a useful feature and it seems to exist in raw Eclipse.  I'm aware of the Source -> Override/Implement methods, but this is clunky when you could hover over an interface and hit Ctrl+1 and auto-implement all methods  for that interface (which seems to be pretty much most use cases for me).  At the moment the quick-fix only seems to have renaming options.  Is there something wrong with my configuration?
    If not, is there a way to make feature requests?  :-))
    Thanks!
    Jarrod

    I have safari on my iPone and like it there... thought that I would give it a try. Well, IE just started to slow to a paint drying speed and then wouldn't load anything. Safari was installed but crashed in threee seconds each occuarnce. No reason, no error message.
    I downloaded (eventually) Firefox... loaded it, chose my extentions and have never had a problem with it since. I unloaded 5 times (gave up on) Safari, reset IE, reinstalled the extentions for that and now it is working after cleaning all of the files, passwords, forms autocomplete, temp files, etc.
    Firefox works and all of my freinds and kids use it. That is why it is so good. Remember, if your car worked like your PC you wold junk it right away. Reliability is not in the MS dictionary. It is something that you have to add via tons of fixes, add-ons and program balancing so that conflicts don't occer. I want my MAC, I want my, I want my MAC...

  • Problem : Implementing the TreeModel interface

    I'm trying to implement MYTreeModel interface.
    It's to convert my DOM to a treemodel.
    (i have readed the tutorial about that but i don't use an adapter class. I have ONE class that implements javax.swing.tree.TreeModel and i have implemented the methods)
    All work exept the toString method.
    I suppose that a process is calling the toString method to display the string into the JTree.
    who is calling the toString Method ?
    Where can (must) i overload this method ?
    For the moment, my overloading of the toString method
    don't work !! (-> my tree is correct exept the string)
    Any idea or help is welcome.
    Thanks in advance.
    Here is a part of my code :
    public class DomTree implements javax.swing.tree.TreeModel {
    private Document mDom_O;
    // Constructor - Creates new CDomTree
    public DomTree(Document Dom_O)
    mDom_O=Dom_O;
    public Object getRoot()
         return mDom_O;
    public boolean isLeaf(Object aNode_O)
         org.w3c.dom.Node Node_O=(org.w3c.dom.Node) aNode_O;
              if (ChildCount(Node_O) > 0) return false;
    else                              return true;
    public int getChildCount(Object parent_O)
         org.w3c.dom.Node Node_O=(org.w3c.dom.Node) parent_O;
    return ChildCount(Node_O);
    public Object getChild(Object parent_O, int index_i)
         org.w3c.dom.Node Node_O=(org.w3c.dom.Node) parent_O;
    return Child(Node_O,index_i);
    public int getIndexOfChild(Object parent_O, Object child_O)
         org.w3c.dom.Node PNode_O=(org.w3c.dom.Node) parent_O;
         org.w3c.dom.Node CNode_O=(org.w3c.dom.Node) child_O;
    return index(PNode_O,CNode_O);
    public int ChildCount(org.w3c.dom.Node aNode_O)
    public org.w3c.dom.Node Child(org.w3c.dom.Node aNode_O,int SearchIndex_i)
    public int index(org.w3c.dom.Node aNode_O,org.w3c.dom.Node Child_O)
    public String toString()
    *****************************************************************

    The JTree calls the toString() method of the object in the tree, not the toString() method of the TreeModel. So in your case, that would be the toString() method of the org.w3c.dom.Node object. That is what you would have to subclass.

  • INS-40724 No locally defined network interface matches the SCAN address

    Hi All,
    Getting the above error.
    I verified that:
    Public IP on both nodes is Primary interface
    SCAN IP are on same subnet as Public IP network interface
    SSH connectivity is verified on both nodes.
    thanks

    HI,
    Define a public interface with a subnet matching the one you want to use for the SCAN. None of the locally defined network interfaces has a subnet matching the SCAN subnet.
    More Information please cheek Oracle support id :  Solutions for Typical 11gR2 Grid Infrastructure/RAC Database runInstaller Issues (Doc ID 1056713.1)
    Thank you

  • Method in abstract interface

    Suppose I have an abstract interface which has one method:
    public abstract interface IParent {
      public void setSignal(int signal);
    }And I have a concrete interface inherited from IParent which also have one method:
    public interface IChild extends IParent {
      public void setSpeed(int speed);
    }If I define a class which implements IChild it only asks me to implement setSpeed method.
    public class Test implements IChild {
    }Why it does not ask me to implement setSignal method of IParent interface?

    Suppose I have an abstract interface which has one method:
    Every interface is implicitly abstract.
    public void setSignal(int signal);
    Every method declaration in the body of an interface is implicitly public.
    And I have a concrete interface inherited from IParent which also have one method:
    Every interface is implicitly abstract.
    If I define a class which implements IChild it only asks me to implement setSpeed method.'It' being what?
    Why it does not ask me to implement setSignal method of IParent interface?I have no idea what 'it' you're talking about, but the Test class will not compile.

  • In which case we need a class with all methods defined as abstract ?

    In which case we need : A class with all methods defined as abstract (or should we go for Interface always in this case)

    The concept of interface and abstract class overlaps sometime, but we can have the following thumb rule to use them for our specific need:
    1) Interface: This should be use for code structuring. They standardize your application by providing a specific contract within and outside. If you think abstract class also provide structure, then reconsider as it limits the structure re-usability when there are many super-classes to inherit from. Java allow multiple inheritance by interface and not by Abstract class.
    2) Abstract Class: This should be use for code-reusability. Interface doesn't have any code so can't be used for code-reusability.
    Actually we can use both to provide the best.Taking a refernce to J2EE framework, the "Servlet" is an interface. It laids down the contract/structure for any code to be a servlet.
    But the "GenericServlet" class is an abstract class which provides implementation of some of the methods defined in the "Servlet" interface and leave some method abstract.
    Thus we see that the "Servlet" interface standardise the structure and the "GenericServlet" abstract class gives code re-usability.
    Original Question:
    In which case we need a class with all methods defined as abstract ?To this question, as all methods are abstarct we don't have option for code-reusability. so why not add standard structure concept to your application. So if there is not any restriction on making the field variable(if any) as final, we should go with the interface concept.

  • Method definition in Interfaces

    How we are able to invoke a method of an interface in a class? For example, we are invoking the method next() of the ResultSet interface in JDBC classes. How this is possible since we are not implementing the method anywhere? Please send us your valuable answer as soon as possible Thanks in advance.
    Shanil Kumar

    Actually a featur of Java thats growing on me more and more each day!!
    The idea is the interface and the implementation are two distinct but related features....
    Given that a single interface may be implemented by many classes, for what ever purpose, you can cast any instance of these implementing classes to the interface and work with it, calling methods on it, without actually knowing what implementation is actually being used!!!
    For example I will currently be coding a simple interface for logging. MyLogger just say. it will define basic methods available in any logging tool. The idea is that I can then implement the interface to interact with a particular logging famework or tool, such as JLogger for example. I may use three differnet such Logging tools, which may have completely different ways of working.
    I can now build code using my interface,
    and switch the actual logging utility that is really being used....
    Its a bit difficult to explain, but if you play arround with it youll get to understand it...
    The key point to understand is that your invoking methods on an instance that implements the interface...
    MyLoggeer logger = new JLoggerImplementation();
    here a concrete implementation is asigned to the interface/
    I can now call methods of the interface, or more precisely the implementing instance.....
    Hope this helps.
    J.Prisco

  • Which method of two interface are being overriden

    Hi all,
    I have a query.
    There are two interfaces interface one interface two. and both declare a method void common()
    A class three implements one, two
    and implements the method common()
    void common() {
    System.out.println(" which interface");
    so in this case the common method of which interface is being called there
    Thanks

    Hi,
    I don't understand your question. The implementation
    of a method in a class does not belong to an
    interface. You only say that you fulfill a contract,
    so the method fulfills the contract of both one and
    two.
    One thing you have to be careful of though: The method fulfills both contracts to the extent that the compiler can check. However, the API docs that describe the semantics of the methods may be radically different, and it might be impossible or nonsensical to fulfill both.

  • How I would implement the print mehtod?

    I have this code...
    * SinglyLinkedList.java
    * An implementation of the List interface using a
    * singly linked list.
    * (P) 2000 Laurentiu Cristofor
    * Modified (slightly) for s03 by D. Wortman
    // The class SinglyLinkedList provides an implementation of the List
    // interface using a singly linked list.  This differs from the Java
    // class LinkedList, which employs a doubly linked list and includes
    // additional methods beyond those required by the List interface.
    // Note: Included in this file is (at least) a "stub" method for each of
    // the required methods, as well as an implementation of the Node class.
    // This allows the file to compile without error messages and allows
    // you to implement the "actual" methods incrementally, testing as you go.
    // The List interface include some "optional" methods, some of which are
    // included here (see the List API for the meaning of this).
    // Some of the methods are preceded by comments indicating that you are
    // required to implement the method recursively.  Where there are no
    // such comments, you can provide either an iterative or a recursive
    // implementation, as you prefer.
    // There are some methods that you are asked not to implement at all.
    // Leave these as they are here: they are implemented here to just
    // throw an UnsupportedOperationException when they are called.
    // Hint: Read carefully the comments for the interface List in the
    // online documentation (Java API).  You can also take a look at the
    // implementation of the LinkedList class from the API. It uses a
    // doubly linked list and it is different in many places from what
    // you need to do here. However it may help you figure out how to do
    // some things. You shouldn't copy the code from there, rather you
    // should try to solve the problem by yourself and look into that code
    // only if you get stuck.
    import java.util.*;
    public class SinglyLinkedList implements List
      // an inner class: This is our node class, a singly linked node!
      private class Node
        Object data;
        Node next;
        Node(Object o, Node n)
          data = o;
          next = n;
        Node(Object o)
          this(o, null);
        Node( )
          this(null,null);
      private Node head; // the "dummy" head reference
      private int size;  // the number of items on the list
      public SinglyLinkedList()
        head = new Node(); // dummy header node!
      public void add(int index, Object element)
      public boolean add(Object o)
        return true;
      public boolean addAll(Collection c)
        return true;
      public boolean addAll(int index, Collection c)
        return true;
      public void clear()
      // write a recursive implementation here
      public boolean contains(Object o)
        return true;
      public boolean containsAll(Collection c)
        return true;
      public boolean equals(Object o)
        return true;
      // write a recursive implementation here
      public Object get(int index)
        return null;
      // NOT implemented: we don't cover hash codes
      // and hashing in this course
      public int hashCode()
        throw new UnsupportedOperationException();
      public int indexOf(Object o)
        return -1;
      public boolean isEmpty()
        return true;
      public Iterator iterator()
        return null;
      public int lastIndexOf(Object o)
        return -1;
      // Not implemented: The following two operations are not supported
      // since we are using a singly linked list, which does not allow
      // us to iterate through the elements back and forth easily
      // (going back is the problem)
      public ListIterator listIterator()
        throw new UnsupportedOperationException();
      public ListIterator listIterator(int index)
        throw new UnsupportedOperationException();
      // write a recursive implementation here
      public Object remove(int index)
        return null;
      public boolean remove(Object o)
        return true;
      public boolean removeAll(Collection c)
        return true;
      public boolean retainAll(Collection c)
        return true;
      // write a recursive implementation here
      public Object set(int index, Object element)
        return null;
      public int size()
        return size;
      // NOT implemented: to keep the homework reasonably simple
      public List subList(int fromIndex, int toIndex)
        throw new UnsupportedOperationException();
      public Object[] toArray()
        Object[] array = new Object[size];
        Node n = head;
        for (int i = 0; i < size; i++)
            array[i] = n.data;
            n = n.next;
        return array;
      public Object[] toArray(Object[] a)
           // you'll find this piece of code useful
        // it checks the exact type of the array passed as a parameter
        // in order to create a larger array of the same type.
        if (a.length < size)
          a = (Object[])java.lang.reflect.Array.
         newInstance(a.getClass().getComponentType(), size);
         else if (a.length > size)
          a[size] = null;
        Node n = head;
        for (int i = 0; i < size; i++)
            a[i] = n.data;
            n = n.next;
        return a;
      public static void main(String args[])
           System.out.println("Singly Linked List");
           System.out.println();
           SinglyLinkedList l = new SinglyLinkedList();
           l.add("F");
    }        how should I implement the print method?
    should I use the iterator?
    can someone help me, please.
    Thank You
    Ennio

    actually, you would do the same thing for a toString() method as you would for a print() method. You are just going to return a String instead of using i/o. I would use an iterator to walk over your list of Nodes and then call toString() on each object in your list of Nodes.

  • How do I get the methods to respond to my main program?

    I have created 3 classes,where class Kunde is my base class and class PudsPrAreal and PudsPrTid are derived classes from class Kunde.
    All my classes went through my compiler without error, but my main program is not able to read the methods from my classes.How do I fix that??
    my base class:
    navn = nyNavn;
    adresse = nyAdresse;
    rabat = nyRabat;
    public void readInput()
    System.out.println("Indtast kundens navn:");
    navn = SavitchIn.readLine();
    System.out.println("Indtast kundens adresse:");
    adresse = SavitchIn.readLine();
    System.out.println("Modtager " + navn + " en form for rabat?");
    System.out.println("(j/n):");
    char answer = SavitchIn.readNonwhiteChar();
    if (answer == 'j'||answer == 'J')
    System.out.println("Indtast den procentsats som " + navn + " modtager:");
    rabat = SavitchIn.readLineDouble();
    public void writeOutput()
    System.out.println("Navn: " + navn);
    System.out.println("Adresse: " + adresse);
    if (rabat > 0)
    System.out.println("Rabat: " + rabat);
    public Kunde()
    navn = "no record";
    adresse = "no record";
    rabat = 0;
    public String getNavn()
    return navn;
    public String getAdresse()
    return adresse;
    public double getRabat()
    return rabat;
    derived class # 1:
    public class PudsPrAreal extends Kunde
    private double areal; //i kvadratmeter
    private String kunde;
    private String pudsningsdato;
    private double kvadratmeterPris;
    private double pris;
    public PudsPrAreal()
    super();
    kunde = "no record";
    pudsningsdato = "no record";
    kvadratmeterPris = 0;
    pris = 0;
    areal = 0;
    public PudsPrAreal(String initialKunde, String initialPudsningsdato, double initialAreal,
    String initialNavn, String initialAdresse, double initialRabat)
    super(initialNavn, initialAdresse, initialRabat);
    set(initialKunde, initialPudsningsdato, initialAreal);
    public void set(String nyKunde, String nyPudsningsdato, double nyAreal)
    kunde = nyKunde;
    pudsningsdato = nyPudsningsdato;
    areal = nyAreal;
    public void readInputPrAreal()
    System.out.println("Indtast datoen hvor vinduespudsningen er blevet foretaget:");
    pudsningsdato = SavitchIn.readLine();
    System.out.println("Hvor mange kvadratmeter skal der afregnes for:");
    areal = SavitchIn.readLineDouble();
    public double pris(double areal)
    double pris;
    double kvadratmeterPris;
    if (areal > 100)
    kvadratmeterPris = 7.0;
    else if (areal >= 500)
    kvadratmeterPris = 6.5;
    else
    kvadratmeterPris = 6.0;
    double prisEks = areal * kvadratmeterPris; //pris eksclusiv rabat
    pris = prisEks * ((100 - getRabat())/100); //pris inclusiv rabat
    return pris;
    public void writeOutputPrAreal()
    System.out.println("Dato for vinduespudsning: " + pudsningsdato);
    System.out.println("Navn: " + getNavn());
    System.out.println("Adresse: " + getAdresse());
    System.out.println("Prisberegningsgrundlag: pr kvadratmeter");
    System.out.println("Antal kvadratmeter: " + areal);
    System.out.println("Pris pr kvadratmeter: " + kvadratmeterPris + " kr.");
    if (getRabat() > 0)
    System.out.println("Rabat: " + getRabat());
    System.out.println("Pris for vinduespudsningen: " + pris + "kr.");
    else
    System.out.println("Pris for vinduespudsningen: " + pris + "kr.");
    public String getkunde()
    return kunde;
    public String getPudsningsdato()
    return pudsningsdato;
    public double getAreal()
    return areal;
    derived class # 2:
    public class PudsPrTime extends Kunde
    private int minuter; //tid for vinduespudsningen angives i minuter
    private double tid; //tid for vinduespudsningen i timer
    private String kunde;
    private String pudsningsdato;
    private double pris;
    public PudsPrTime(String initialKunde, String initialPudsningsdato, int initialMinuter,
    String initialNavn, String initialAdresse, double initialRabat)
    super(initialNavn, initialAdresse, initialRabat);
    set(initialKunde, initialPudsningsdato, initialMinuter);
    public void set(String nyKunde, String nyPudsningsdato, int nyMinuter)
    kunde = nyKunde;
    pudsningsdato = nyPudsningsdato;
    minuter = nyMinuter;
    public void readInputPrTime()
    System.out.println("Indtast datoen hvor vinduespudsningen er blevet foretaget:");
    pudsningsdato = SavitchIn.readLine();
    System.out.println("Hvor mange minuter skal der afregnes for:");
    minuter = SavitchIn.readLineInt();
    public double pris(int minuter)
    int kvarter;
    int minuterTilOvers;
    double pris;
    kvarter = minuter / 15;
    minuterTilOvers = minuter % 15;
    if (minuterTilOvers > 0)
    kvarter++;
    tid = kvarter * 0.25;
    double prisEks = tid * 375; //pris eksclusiv rabat
    pris = prisEks * ((100 - getRabat())/100);
    return pris;
    public void writeOutputPrTime()
    System.out.println("Dato for vinduespudsning: " + pudsningsdato);
    System.out.println("Navn: " + getNavn());
    System.out.println("Adresse: " + getAdresse());
    System.out.println("Prisberegningsgrundlag: pr time");
    System.out.println("Antal timer: " + tid);
    System.out.println("Pris pr time: 375 kr.");
    System.out.println("Der afregnes pr p�begyndt 15 minuter.");
    if (getRabat() > 0)
    System.out.println("Rabat: " + getRabat());
    System.out.println("Pris for vinduespudsningen: " + pris + "kr.");
    else
    System.out.println("Pris for vinduespudsningen: " + pris + "kr.");
    public String getKunde()
    return kunde;
    public String getPudsningsdato()
    return pudsningsdato;
    public int getMinuter()
    return minuter;
    my main program:
    public class Glasklart
    public static void main(String[] args)
    Glasklart kunde = new Glasklart();
    System.out.println("Indtast datoen for idag:");
    String dato = SavitchIn.readLine();
    kunde.readInput();
    System.out.println("Hvad er prisberegningsgrundlaget?");
    System.out.println("Skriv 'k' for pr kvadratmeter eller 't' for pr time:");
    char svar = SavitchIn.readNonwhiteChar();
    if (svar == 'k'||svar == 'K')
    kunde.readInputPrAreal();
    System.out.println("Afregningsdato: " + dato);
    kunde.writeOutputPrAreal();
    else if (svar == 't'||svar == 'T')
    kunde.readInputPrTime();
    System.out.println("Afregningsdato: " + dato);
    kunde.writeOutputPrTime();
    else
    System.out.println("Forkert svar. Pr�v igen.");
    System.out.println("Skriv 'k' for pr kvadratmeter eller 't' for pr time:");
    svar = SavitchIn.readNonwhiteChar();
    error message for my main program:
    "Glasklart.java": Error #: 300 : method readInput() not found in class Glasklart at line 10, column 9
    "Glasklart.java": Error #: 300 : method readInputPrAreal() not found in class Glasklart at line 16, column 13
    "Glasklart.java": Error #: 300 : method writeOutputPrAreal() not found in class Glasklart at line 18, column 13
    "Glasklart.java": Error #: 300 : method readInputPrTime() not found in class Glasklart at line 22, column 13
    "Glasklart.java": Error #: 300 : method writeOutputPrTime() not found in class Glasklart at line 24, column 13

    The problem is that your main class isn't even trying to read the methods in your other classes. In your main() method in Glasklart.java, you do this:
    Glasklart kunde = new Glasklart();
    System.out.println("Indtast datoen for idag:");
    String dato = SavitchIn.readLine();
    kunde.readInput();But you didn't define readInput() in Glasklart, you defined it in your "base class" which you didn't quote enough of us to know the name for sure, but I presume is called Kunde.java.
    But I also see that you named the variable "kunde". It looks like maybe you're confusing the names of classes with the names of variables that happen to hold objects instantiated from those classes.
    If I define classes:
    public class Dog {
    public class Cat {
    }and later do this:
      Cat dog = new Cat();The methods defined in Dog cannot be invoked from from "dog", because "dog" is really a Cat. Just because you called it "dog", it doesn't necesarily mean it's an instance of Dog.

  • User message in the method "executeQueryForCollection"

    Hi everyone,
    I pray you excuse my english.
    I am working in jdev 11.1.2.1.
    I have an "adf:inputListOfValues" in a "jsf".
    In the search popup, I would display a message to the user if search criteria are not informed.
    To achieve this, I implemented the method "executeQueryForCollection" of the "VO" to launch a "JboException".
    At run time, the first time I perform a search user, it displays correctly. But, any other action causes an exception of type "nullPointerException".
    In the ADF source code, the method "ViewRowSetImpl::execute" calls to "executeQueryForCollection" method. The method "ViewRowSetImpl::execute" catch exceptions and the object instance "queryCollection" is initialized to "null". This fact throws the exceptions of type "NullPointerException".
        "catch (Exception e)
                setQueryCollection(null);
                if (e instanceof JboException)
                   throw (JboException) e;
                else
                   throw new JboException(e);
    I prefer not to add a message of "FacesMessage" type in the data model.
    Is there any other way to show this message to the user?
    Thank you very much.

    Hi,
    sandip is correct, go to SE11 Table T100.
    I did it this way: Searched for (in my case) SPRSL = DE and TEXT = "Bitte Bankschlüssel eingeben" (that's the said error message). With the upcoming result I got the message ID and message Number, these are:
    ARBGB = 'AR' MSGNR = '195'
    ARBGR = '1J' MSGNR ='510'
    Maintain them for your SPRSL and you should be fine.
    regards, Lukas

  • Getting an error when calling the method of the bean

    Hi,
    I have the following problem:
    From my action class I'm calling a method on EJB through Business Object and getting the following error:
    org.apache.struts.action.RequestProcessor Unhandled Exception thrown: class gov.nyc.fisa.wbas.exceptions.ServerException
    [3/6/08 13:53:44:700 EST] 1acdd938 WebGroup E SRVE0026E: [Servlet Error]-[SERVER EXCEPTION CALLING searchBenefitGroups() METHOD ]: gov.nyc.fisa.wbas.exceptions.ServerException: SERVER EXCEPTION CALLING searchBenefitGroups() METHOD
    The following are parts of my code:
    In Action Class:
    BenefitGroupBO bo = new BenefitGroupBO();
    BenefitGroupsColView cView = new BenefitGroupsColView();
    try{
        cView = bo.searchBenefitGroups(transferObject,true);
    catch (ServerException e){
        throw new ServerException("SERVER EXCEPTION CALLING searchFunds() METHOD ",e);
    In Business Object:
    private BenefitGroupImpl benGrpImpl = null;
        try{
               System.out.println("1. BenefitGroupBO - searchBenefitGroups()");
               collectionView = benGrpImpl.searchBenefitGroups(transferObject, isSearch);
               System.out.println("2. BenefitGroupBO - searchBenefitGroups()");
    catch (RemoteException e){
                throw new ServerException("Remote exception calling BenefitGroupImplBean: searchBenefitGroups()", e);
    .....It never executes the second print statement in the method
    In Remote Interface:
    public BenefitGroupsColView searchBenefitGroups(BenefitGroupVO transferObject, boolean isSearch)
                                                                           throws ServerException, java.rmi.RemoteException;
    In the EJB
    public BenefitGroupsColView searchBenefitGroups(BenefitGroupVO transferObject, boolean isSearch){
                                                                        throws ServerException                
             System.out.println("1. BenefitGroupImplBean - searchBenefitsGroups() method");
             BenefitGroupsColView collectionView = new BenefitGroupsColView();
             System.out.println("2. BenefitGroupImplBean - searchBenefitsGroups() method");
              return collectionView;
    .....It never executes first Print statement in that method and I do not think it ever goes into the actual EJB class.
    Can anyone tell me what am I doing wrong?
    Thank you
    Edited by: SolutionsQuest on Mar 6, 2008 11:14 AM
    Edited by: SolutionsQuest on Mar 6, 2008 11:15 AM

    Hi,
    Refer below threads:
    You are trying to access a page that is no longer active
    You are trying to access a page that is no longer active.
    You are trying to access a page that is no longer active.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • ADF Application on Windows Desktop Client

    Hi, I developed a small ADF Web Application and tested it on Integrated Web logic server. Is there a way by which I can make this program to run stand alone on a client PC with out Web logic server (In the same way as Forms 6i runs on 2 tier mode in

  • Azure SQL database working locally but not when published to Azure

    I have an AngularJS  solution that is connecting to a SQL Azure database.  When I run the solution locally, it's configured to connect up to the SQL Azure database, the solution works fine. However, when I publish the solution to Azure the connection

  • ORACLE error 376 encountered

    10gr2p2 on windows sysaux data file is under recovery mode in my db ..When am trying to export one shcema in my db am getting the below error : EXP-00056: ORACLE error 376 encountered ORA-00376: file 3 cannot be read at this time ORA-01110: data file

  • With t as (select ...) = where to find in documentation?

    Hi there, I recently found a sql command: With t as (select '' x from dual) select count(*) from t where ('' is null and x is null) or (x=''); Where can I find something in the documentation. I already took a look at the sql reference and at Google b

  • How to make this never ending loop stop!

    Somewhere in this code where im printing stars, i have a loop that i cant stop from continuing. The instrucitons say set the line<=30 and that i set line = 5 in the for loop. Im supposed to get a pyramid shape of stars made with 5 lines. IT should be