SAXParser: method startElement of DefaultHandler is never invoked

Hallo,
I'm trying to parse following file: "<?xml version="1.0"?>
<company>
     <staff>
          <firstname>yong</firstname>
          <lastname>mook kim</lastname>
          <nickname>mkyong</nickname>
          <salary>100000</salary>
     </staff>
     <staff>
          <firstname>low</firstname>
          <lastname>yin fong</lastname>
          <nickname>fong fong</nickname>
          <salary>200000</salary>
     </staff>
</company>"
I'm using class SAXParser. I have extended the class DefaultHandler. The parser runs without errors but the method startElement of handler class is never invoked. The method endElement istead is invoked normally. I'm trying to run an example from url: http://www.mkyong.com/java/how-to-read-xml-file-in-java-sax-parser/. I don't know why is this, no exception is thrown while running.
with regards
Rafal Ziolkowski

The code comes from site: http://www.mkyong.com/java/how-to-read-xml-file-in-java-sax-parser/. An extraction:
     DefaultHandler handler = new DefaultHandler() {
     boolean bfname = false;
     boolean blname = false;
     boolean bnname = false;
     boolean bsalary = false;
     public void startElement(String uri, String localName,String qName,
Attributes attributes) throws SAXException {
          System.out.println("Start Element :" + qName);
          if (qName.equalsIgnoreCase("FIRSTNAME")) {
               bfname = true;
          if (qName.equalsIgnoreCase("LASTNAME")) {
               blname = true;
          if (qName.equalsIgnoreCase("NICKNAME")) {
               bnname = true;
          if (qName.equalsIgnoreCase("SALARY")) {
               bsalary = true;
I set breakpoint on line: System.out.println("Start Element :" + qName);
But program never stops there. The output don't show the result of this line.
Meanwhile I've tried to step into the parser-process and found at the class XMLDocumentFragmentScannerImpl.java following code:
public boolean scanDocument(boolean complete)
throws IOException, XNIException {
// keep dispatching "events"
fEntityManager.setEntityHandler(this);
//System.out.println(" get Document Handler in NSDocumentHandler " + fDocumentHandler );
int event = next();
do {
switch (event) {
case XMLStreamConstants.START_DOCUMENT :
//fDocumentHandler.startDocument(fEntityManager.getEntityScanner(),fEntityManager.getEntityScanner().getVersion(),fNamespaceContext,null);// not able to get*
break;
case XMLStreamConstants.START_ELEMENT :
* //System.out.println(" in scann element");*
* //fDocumentHandler.startElement(getElementQName(),fAttributes,null);*
break;
case XMLStreamConstants.CHARACTERS :
fDocumentHandler.characters(getCharacterData(),null);
break;
the block for handling startElement is commented out!
To get the SAXParser class I use following code:
     SAXParserFactory factory = SAXParserFactory.newInstance();
     SAXParser saxParser = factory.newSAXParser();
perhaps I have to use more specific data for getting the instance of class SAXParser.
Rafal Ziolkowski

Similar Messages

  • Custom Adapter for Inbound Operations never invoked

    Hi,
    I created a custom J2CA Resource Adapter for Inbound operations. I implemented javax.resource.spi.ResourceAdapter interface with all required methods - start(BootstrapContext), endpointActivation(MessageEndpointFactory, ActivationSpec), etc.
    I created the appropriate WSDL file according Adapter Development Cookbook. Below is an excerpt from it:
    <definitions targetNamespace="urn:Adapter" .......>
      <message name="Notification">
        <part name="Notification_Part" element="ns1:Svc"/>
      </message>
      <message name="Header">
        <part name="Header_Part" element="ServiceHeader"/>
      </message>
      <portType name="EventsQueue_ptt">
        <operation name="Dequeue">
          <input message="tns:Notification"/>
        </operation>
      </portType>
      <binding name="NotificationService" type="tns:EventsQueue_ptt">
        <jca:binding/>
        <operation name="Dequeue">
          <jca:operation ActivationSpec="acme.ActivationSpec"/>
          <input>
            <jca:header message="tns:Header" part="Header_Part"/>
          </input>
        </operation>
      </binding>
      <service name="EventsQueue">
        <port name="EventsQueue_pt" binding="tns:NotificationService">
          <jca:address ResourceAdapter="acme.AdapterClass"/>
        </port>
      </service>
    </definitions>I created a BPEL process with a partner link based on this WSDL and linked a Receive activity with it. According Adapter Concepts Guide here is what should happen when the BPEL process is deployed and started:
    - The ResourceAdapter class name and the ActivationSpec parameter are captured in the WSDL extension section of the J2CA inbound interaction WSDL Adapter Integration with BPEL Process Manager Adapter Integration with Oracle Application Server Components 5-7 during design time and made available to BPEL Process Manager and Adapter Framework during run time.
    - An instance of the J2CA 1.5 ResourceAdapter class is created and the Start method of the J2CA ResourceAdapter class is called.
    - Each inbound interaction operation referenced by the BPEL Process Manager processes results in invoking the EndPointActivation method of the J2CA 1.5 ResourceAdapter instance. Adapter Framework creates the ActivationSpec class (Java Bean) based on the ActivationSpec details present in the WSDL extension section of the J2CA inbound interaction and activates the endpoint of the J2CA 1.5 resource adapter.
    The problem is that start(BootstrapContext) and endpointActivation(MessageEndpointFactory, ActivationSpec) seem never to be invoked, the adapter is never initialized and at some point the Receive activity of the BPEL process times-out.
    I put some debug System.out.println statements in these methods, but nothing appeared in the server log.
    I'm using Oracle SOA Suite 10.1.3.1.
    I will be grateful for any suggestions.
    Regards,
    Simeon
    Message was edited by:
    skirov

    user9116351 wrote:
    Hi,
    I have written a custom connector for crud operations to a table in Oracle DB. The custom code class uses oracle.jdbc.OracleDriver which is present in ojdbc14.jar. I have placed this jar in ThirdParty folder of the OIM installation but I am still getting an SQLException while connecting to the DB as my custom code is unable to find the required class. Can someone guide me to some documentation that will help me get over this?
    Thanks,
    SaieshWhich version of OIM you are in? Also you dont need to copy ojdbc14.jar as this exists already in OIM.

  • Javascript never invoked in jsff

    hi,
    the use case is in jsff, in table's row column when user presses ENTER key i need to call some methods afterwards (jdev 11.1.2.3)
    for some reason i can't see javascript code invoked.
    i use af:clientListener, af:serverListener pair.
    actually , the example is depicted by Timo Hahn in his blog
    i try to reapply it in page fragment, which doesn't contain document tag ...
    below is what i tried to do and it never helped me...
    please advise how to call js in page fragment
    i considered Frank's blog as well, but it doesn't work in my case...
    https://blogs.oracle.com/jdevotnharvest/entry/gotcha_when_using_javascript_in
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:f="http://java.sun.com/jsf/core">
    <af:panelGroupLayout id="pgl4">
    <af:panelFormLayout id="pfl1">
    <trh:script id="s2">
         function handleEnterEvent(evt) {
         var _keyCode = evt.getKeyCode();
         //if (_keyCode == AdfKeyStroke.ENTER_KEY ){  
         var comp = evt.getSource();
         AdfCustomEvent.queue(comp, "EnterEvent", {}, false);
         evt.cancel();
    function handleTableDoubleClick(evt){
    var table = evt.getSource();
    AdfCustomEvent.queue(table, "TableDoubleClickEvent",{}, true);
    evt.cancel();
    </trh:script>
    <af:resource type="javascript">
         function handleEnterEvent(evt) {
         var _keyCode = evt.getKeyCode();
         //check for Enter Key
         if (_keyCode == AdfKeyStroke.ENTER_KEY ){  
         var comp = evt.getSource();
         AdfCustomEvent.queue(comp, "EnterEvent", {fvalue:comp.getSubmittedValue()}, false);
         evt.cancel();
    </af:resource>
    </af:panelFormLayout>
    <af:panelBox
    <af:table value="#{bindings.DcaRegisterView1.collectionModel}" var="row" width="1200"
    <af:column sortProperty="#{bindings.DcaRegisterView1.hints.EffectiveUntil.name}" filterable="true"
    <af:inputDate value="#{row.bindings.EffectiveUntil.inputValue}"
    required="#{bindings.DcaRegisterView1.hints.EffectiveUntil.mandatory}"
    columns="#{bindings.DcaRegisterView1.hints.EffectiveUntil.displayWidth}"
    shortDesc="#{bindings.DcaRegisterView1.hints.EffectiveUntil.tooltip}" id="id3">
    <f:validator binding="#{row.bindings.EffectiveUntil.validator}"/>
    <af:convertDateTime pattern="#{bindings.DcaRegisterView1.hints.EffectiveUntil.format}"/>
         <af:clientListener method="handleEnterEvent" type="keyPress"/>
         <af:serverListener type="EnterEvent" method="#{registerBean.handleEnterEvent}"/>
    </af:inputDate>
    </af:column>
    ... page fragment code itself
    </af:panelBox

    The following is working for me:
    The js on the page:
    <af:resource  type="javascript">
            function doSomething(event) {
                alert('Doing something');
    </af:resource>Calling the js from an inputText component inside a table:
    <af:inputText value="#{row.bindings.FirstName.inputValue}"
                            label="#{bindings.EmployeesVOVI.hints.FirstName.label}"
                            required="#{bindings.EmployeesVOVI.hints.FirstName.mandatory}"
                            columns="#{bindings.EmployeesVOVI.hints.FirstName.displayWidth}"
                            maximumLength="#{bindings.EmployeesVOVI.hints.FirstName.precision}"
                            shortDesc="#{bindings.EmployeesVOVI.hints.FirstName.tooltip}" id="it1">
                <f:validator binding="#{row.bindings.FirstName.validator}"/>
                <af:clientListener type="keyPress" method="doSomething"/>
              </af:inputText>Have you checked any js error with - for example - firebug?
    Regards,
    Koen Verhulst

  • Weird thing in SLSB in WLS, never invoke ejbCreate() or setSessionContext()

    I have this piece of code:
    public class CounterBean implements SessionBean {
         private int count;
         public void ejbCreate() {
              count = 0;
         public void ejbPassivate() {}
         public void ejbActivate() {}
         public void ejbRemove() {}
         public void setSessionContext(SessionContext sc) {
              count = 0;
         public int count() {
              return ++count;
    In weblogic-ejb-jar.xml, I have this:
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
    6.0.0 EJB//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>CounterBean
    </ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>2</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    </stateless-session-descriptor>
    <jndi-name>ejb/counter</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    My test client code is like:
    CounterBean bean1 = (CounterBean)beanHome.create();
    System.out.println(bean1.count());
    bean1.remove();
    CounterBean bean2 = (CounterBean)beanHome.create();
    System.out.println(bean2.count());
    bean2.remove();
    I have thought WLS will always invoke setSessionContext() and
    ejbCreate(), if the EJB client invoke create() method on the Home
    interface. But I always get sequentially increased result,
    1-2-3-4-5...
    Can other people verify this? Running on WLS6.1+SP2 on Win2K.
    Stateful deployment works right,
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
    6.0.0 EJB//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>CounterBean
    </ejb-name>
    <stateful-session-descriptor>
         <stateful-session-cache>
    <max-beans-in-cache>1</max-beans-in-cache>
    <idle-timeout-seconds>10</idle-timeout-seconds>
    <cache-type>LRU</cache-type>
    </stateful-session-cache>
    <persistent-store-dir>/weblogic/myserver</persistent-store-dir>
    </stateful-session-descriptor>
    <jndi-name>ejb/counter</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    It will passivate the CounterBean, and new instance, then invoke
    setSessionContext(), ejbCreate().
    Looks like, WLS doing too much caching for SLSB?
    Simon Song

    Your results are correct. The container is pooling instances. I would
    suggest that you re-read the stateless session bean lifecyle section in
    the EJB spec.
    -- Rob
    Simon Song wrote:
    I have this piece of code:
    public class CounterBean implements SessionBean {
    private int count;
    public void ejbCreate() {
    count = 0;
    public void ejbPassivate() {}
    public void ejbActivate() {}
    public void ejbRemove() {}
    public void setSessionContext(SessionContext sc) {
    count = 0;
    public int count() {
    return ++count;
    In weblogic-ejb-jar.xml, I have this:
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
    6.0.0 EJB//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>CounterBean
    </ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>2</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    </stateless-session-descriptor>
    <jndi-name>ejb/counter</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    My test client code is like:
    CounterBean bean1 = (CounterBean)beanHome.create();
    System.out.println(bean1.count());
    bean1.remove();
    CounterBean bean2 = (CounterBean)beanHome.create();
    System.out.println(bean2.count());
    bean2.remove();
    I have thought WLS will always invoke setSessionContext() and
    ejbCreate(), if the EJB client invoke create() method on the Home
    interface. But I always get sequentially increased result,
    1-2-3-4-5...
    Can other people verify this? Running on WLS6.1+SP2 on Win2K.
    Stateful deployment works right,
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
    6.0.0 EJB//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>CounterBean
    </ejb-name>
    <stateful-session-descriptor>
    <stateful-session-cache>
    <max-beans-in-cache>1</max-beans-in-cache>
    <idle-timeout-seconds>10</idle-timeout-seconds>
    <cache-type>LRU</cache-type>
    </stateful-session-cache>
    <persistent-store-dir>/weblogic/myserver</persistent-store-dir>
    </stateful-session-descriptor>
    <jndi-name>ejb/counter</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    It will passivate the CounterBean, and new instance, then invoke
    setSessionContext(), ejbCreate().
    Looks like, WLS doing too much caching for SLSB?
    Simon Song

  • KeyListener never invoked on my editor

    I am trying to make TAB go to the next field in my table. But none of my keylistener methods get invoked on my cell editor. Can anyone help? Here is my code...
    public class MultiLineCellEditor extends DefaultGridCellEditor implements GridCellEditor, KeyListener
    String value_;
    JScrollTextArea textArea_;
    CommonJSmartGrid grid_;
    public MultiLineCellEditor()
    super(new JTextField());
    JTextField jtf = (JTextField) this.getComponent();
    jtf.addKeyListener(this);
    textArea_ = new JScrollTextArea();
    value_ = null;
    setClickCountToStart(2);
    public void keyReleased(KeyEvent e)
    System.out.println("keyReleased...");
    public void keyPressed(KeyEvent e)
    System.out.println("keyPressed...");
    public void keyTyped(KeyEvent e)
    System.out.println("keytype...");
    Thanks in advance,
    Steve

    This info was helpful... however, I still can't get anything to register a keyevent once I am in the editor. The table has focus (I check) when I first open this screen, and loses focus when I double click on the cell containing the multiline cell editor. The thing is... what object then gains focus? I checked the scrollpane and the jTextField. Neither of these ever gets focus so adding a keylistener to them won't do any good. Any other ideas?
    Thanks,
    Steve

  • Public method of javabean not executed when invoked with FBEAN.INVOKE_NUM

    Hi,
    i write a trivial javabean with public method named 'somme' that return int value and take no arguments.
    i my PL/SQL trigger code, i register an instance of the bean and take a call to the public method 'somme' that return a int value that i display in display item of my form.
    the java bean is well registered and i verified that the code in the constructor is well executed. But the call to the public methode dont work.
    thank you for your help.

    Hello,
    it's a mistake for me. when i instanciate the javabean from another java classe in jdev, the execution is well and the process exited with code 0.
    but when i instanciate it from pl/sql the problem occurs.
    i commented all the lines of my code except the line that register the javabean
         FBean.Register_Bean(hBean, 1, 'amar.FbeanExemple');
    and i have the same problem even though the code in the constructor is executed.
    the error occurs after the code in the concstructor is executed.
    i folllow all the information about this error:
    Contenu de la console Java
    JInitiator: Version 1.3.1.18
    Utilisation de la version JRE 1.3.1.18-internal Java HotSpot(TM) Client VM
    Répertoire d'accueil de l'utilisateur = C:\Documents and Settings\amsai1
    Configuration du proxy : aucun proxy
    JAR cache enabled
    Location: C:\Documents and Settings\amsai1\Oracle Jar Cache
    Maximum size: 50 MB
    Compression level: 0
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/banicons.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/bannerui71.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/banspecial.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/banorep71.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/bannerid71.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/f90all_jinit.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/missing.jar from JAR cache proxyHost=null proxyPort=0 connectMode=HTTP, native. La version Forms Applet est : 9.0.4.0
    *** VBean null PropertyManager for id = FOREGROUND
    *** VBean Got FOREGROUND = null
    *** VBean null PropertyManager for id = BACKGROUND
    *** VBean Got BACKGROUND = null *** VBean Setting debugMode to ALL *** VBean Setting beanName to amar.FbeanExemple
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/fbeanexemple.jar from JAR cache
    Instance hhhjhyu du bean est créée op1 = 0 op2 = 0
    *** VBean Failed to instantiate class: amar.FbeanExemple java.lang.ClassCastException: amar.FbeanExemple
    Ma classe Java
    package amar;
    public class FbeanExemple
         private int op1;
         private int op2;
    public FbeanExemple()
    System.out.println("Instance hhhjhyu du bean est créée");
    System.out.println("op1 = " + this.op1);
    System.out.println("op2 = " + this.op2);
    public int additionner()
    return this.op1 + this.op2;
    public int soustraire()
    return this.op1 - this.op2;
    public int sommer(int a, int b)
    return a + b;
    public void faire()
    System.out.println("je suis passe par ici");
    public void setOp1(int a)
    this.op1 = a;
    public void setOp2(int a)
    this.op2 = a;
    public int getOp1()
    return this.op1;
    public int getOp2()
    return this.op2;
    Mon code PL/SQL
    declare
         hBean ITEM := Find_Item('CTL.BEAN_AREA4');
         result INTEGER;
    begin
         FBEAN.SET_LOGGING_MODE(hBean,1,FBEAN.LOG_ALL);
         FBean.Register_Bean(hBean, 1, 'amar.FbeanExemple');
         result := FBean.Invoke_Num(hBean, 1, 'additionner');
         :CTL.R := result;
    end;
    Thank you for your help.

  • Another set of eyes

    I could use a second look. Why is name outputting null rather than "no name yet?"
    import java.util.Scanner;
    public class Exercise5
        public static void main(String[] args)
           //Create the contructors
            Species species1 = new Species();
            Species species2 = new Species();
            Species species3 = new Species();
            //Output the initial values of the three constructors
            System.out.println("==================== Initial Values ====================");
            System.out.println("\nSpecies 1");
            species1.writeOutput( );
            System.out.println("\nSpecies 2");
            species2.writeOutput( );
            System.out.println("\nSpecies 3");
            species3.writeOutput( );
    import java.util.Scanner;
    Class for data on endangered species.
    public class Species
        private String name;
        private int population;
        private double growthRate;
        public void readInput( )
            Scanner keyboard = new Scanner(System.in);
            System.out.println("What is the species' name?");
            name = keyboard.nextLine( );
            System.out.println(
                          "What is the population of the species?");
            population = keyboard.nextInt( );
            while (population < 0)
                System.out.println("Population cannot be negative.");
                System.out.println("Reenter population:");
                population = keyboard.nextInt( );
            System.out.println("Enter growth rate (% increase per year):");
           growthRate = keyboard.nextDouble( );
        public void writeOutput( )
             System.out.println("Name: = " + name);
             System.out.println("Population: = " + population);
             System.out.println("Growth rate: = " + growthRate + "%");
         Precondition: years is a nonnegative number.
         Returns the projected population of the calling object
         after the specified number of years.
        public int predictPopulation(int years)
              int result = 0;
            double populationAmount = population;
            int count = years;
            while ((count > 0) && (populationAmount > 0))
                populationAmount = (populationAmount +
                              (growthRate / 100) * populationAmount);
                count--;
            if (populationAmount > 0)
                result = (int)populationAmount;
            return result;
        public void setSpecies(String newName, int newPopulation,
                               double newGrowthRate)
            name = newName;
            if (newPopulation >= 0)
                population = newPopulation;
            else
                System.out.println("ERROR: using a negative population.");
                System.exit(0);
            growthRate = newGrowthRate;
        public String getName( )
            return name;
        public int getPopulation( )
            return population;
        public double getGrowthRate( )
            return growthRate;
        public boolean equals(Species otherObject)
            return (name.equalsIgnoreCase(otherObject.name)) &&
                   (population == otherObject.population) &&
                   (growthRate == otherObject.growthRate);
        //set the default species constructor
        public void Species ()
              String name = "No name yet";
              int population = 0;
              double growthRate = 0.0;
         //set a constructor using just the initialName
         public void Species(String initialName)
              String name = initialName;
              int population = 0;
              double growthRate = 0.0;
         //set a constructor using initialName and initialPopulation
         public void Species(String initialName, int initialPopulation, double initialGrowthRate)
              String name = initialName;
              int population = initialPopulation;
              double growthRate = initialGrowthRate;
    }

    warnerja wrote:
    public void Species ()And don't forget the other hint: The above is NOT defining a constructor. It is defining a method named "Species", which you never invoke, so even if you just change the code as suggested so far, you'll still have a null.<GRUMBLE>
    ... and in my humble opinion both these "common problems" should result in compiler warning.
    public void Species ()
                        ^
    STYLE_WARNING: The 'public void Species()' method has the same name as the containing class, making it look like a
    constructor. This method name is confusing to other programmers, and is a likely cause of future bugs. This is
    most commonly a mistake. If you meant 'Species()' to be a constructor then remove the return type. If you
    meant this to be a method then you should rename it.
        String name = "No name yet";
        ^
    STYLE_WARNING: The local variable 'name' hides the class attribute of the same name (this.name). This is confusing,
    especially to other programmers, and is a common cause of bugs. Consider renaming the local variable, or
    the attribute.</GRUMBLE>

  • Exceptions from nested includes not thrown to errorPage

    In our application a central dispatcher servlet includes JSPs.
              These JSPs include other JSPs. When an Exception is thrown from one of these
              pages it is not thrown, even when the error page is indicated in the
              included JSP with the page directive and the Exception is explicitly thrown
              from a catch block.
              I apprciate any thoughts.
              Thanks.
              -mc
              

    can u send the code snippet?
    "Abhishek" <[email protected]> wrote in message
    news:[email protected]..
    Hi
    I am having a stateless session bean(SLBean) which uses a singleton
    class(Single1). Both the SLBean and the Single1 are in the same jar
    file. Single1 contains a static method called getInstance() which
    returns the instance of the Single1(if not already existing).
    The probelm is that when I try to do the "Single1.getInstance()" from
    the stateless bean, then some exception( java.rmi.RemoteException:
    EJBException: ;nested Exception is: Java.lang.NullPointerException) is
    thrown.and getInstance() method of Single1 class in never invoked.
    What might be the problem? why am I not able to call my singleton
    class from the staless bean.
    Thanks in advance.
    Abhishek

  • Invoking the main() method of a class within another

    Greetings -
    Can someone tell me what happens when you invoke the main() method of a class from within another class?
    I have a third-party class, designed to be invoked from a command line, that I want to invoke from within a separate class. What appears to be happening is that following the successful execution of the third-party class, the invoking class is terminated as well. That's not the intended behavior I had envisioned. ^_^
    Is there a better way than invoking the main() method? I still need the invoking class to continue executing.
    Thanks!

    Navigate yourself around pitfalls related to the Runtime.exec() method

  • Invoking methods via java.lang.Method.invoke().

    I need to invoke the getter methods that I have defined for a Trade object passed as an argument.
    I am getting the excepion : java.lang.IIlegalArgumentException: wrong number of arguments.
    This is the first time I am invoking methods this way.
    Am I correct to assume that methods on an object can be invoked in this way?
    How can I invoke the getter methods of the trade object.
    Please help.
    public void displayData(Trade trade){
         Method[] m = trade.getClass().getMethods();
         for(int i=0;i<m.length;i++){
              if(m.getName().startsWith("get")){
                        try {
                             m[i].invoke(trade, new Trade[] { trade });
                        } catch (IllegalArgumentException e) {
                             e.printStackTrace();
                        } catch (IllegalAccessException e) {
                             e.printStackTrace();
                        } catch (InvocationTargetException e) {
                             e.printStackTrace();

    bhuru_luthria wrote:
    The getter methods of the trade object require no arguments.
    The three getter methods of the trade object are:
    getTradeId();
    getProductId()
    getReferenceId()Read the Javadoc; use it like this:
    m.invoke(trade);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • URGENT: How to Configure Ruote to Business Service that invokes 2 methods

    Hi,
    I am using ALSB 2.6.
    Currently I am working on a project, in which i have to configure business service and proxy service.
    Now the problem which i am facing is the following :-
    I'm trying to configure my Proxy service to route to 1 Business Service which in turn invokes 2 methods.
    I want to know how can i configure this route to business service that invokes 2 methods.
    Right now, to execute/ invoke any of the method i need to invoke each method by changing manually in the rotuing flow.
    Can any one tell me how can i configure both the methods for the same business service in a single rotuing flow only.
    Presently i am configuring it in this way:
    Route to BUSINESSSERVICE invoking METHOD1.
    At the place of method 1 theres a drop box from where you select the desired method.
    I want to know how to configure both the methods in single rotuing flow so that it invokes the desired method without manually editing it each time.
    What is the best solution to this problem? I would very much appreciate any help on this!
    Regards,
    Samir

    Hi,
    You can create a pipeline pair, add one (or more stages), and inside of the stage, invoke the a service callout to your business service.
    Regards,
    Fabio Douek.
    Regards,
    Fabio Douek

  • Urgent please ! How to invoke java method with diffrent argument types?

    Hi,
    I am new to JNI.
    I had gone through documentation but it is not of much help.
    Can any one help me out how to invoke the below java method,
    // Java class file
    public class JavaClassFile
    public int myJavaMethod(String[] strArray, MyClass[] myClassArray, long time, int[] ids)
    // implementation of method
    return 0;
    // C++ file with Invokation API and invokes the myJavaMethod Java method
    int main()
    jclass cls_str = env->FindClass("java/lang/String");
    jclass cls_MyClass = env->FindClass("MyClass");
    long myLong = 2332323232;
    int intArray[] = {232, 323, 32, 77 };
    jclass cls_JavaClassFile = env->FindClass("JavaClassFile");
    jmethodID mid_myJavaMethod = env->GetMethodID( cls_JavaClassFile, "myJavaMethod", "([Ljava/lang/String;[LMyClass;J[I)I");
    // invoking the java method
    //jint returnValue = env->CallIntMethod( cls_JavaClassFile, mid_myJavaMethod, stringArray, myClassArray, myLong, intArray ); --- (1)
    //jint returnValue = env->CallIntMethodA( cls_JavaClassFile, mid_myJavaMethod, ...........); --- (2)
    //jint returnValue = env->CallIntMethodV( cls_JavaClassFile, mid_myJavaMethod, ...........); --- (3)
    Can any one tell me what is the correct way of invoking the above Java method of (1), (2) and (3) and how ?
    The statement (1) is compilable but throws error at runtime, why ?
    How can I use statements (2) and (3) over here ?
    Thanks for any sort help.
    warm and best regards.

    You are missing some steps.
    When you invoke a java method from C++, the parameters have to be java parameters, no C++ parameters.
    For example, your code appears to me as thogh it is trying to pass a (C++) array of ints into a java method. No can do.
    You have to construct a java in array and fill it in with values.
    Here's a code snippet:
    jintArray intArray = env->NewIntArray(10); // Ten elments
    There are also jni functions for getting and setting array "regions".
    If you are going to really do this stuff, I suggest a resource:
    essential JNI by Rob Gordon
    There is a chapter devoted to arrays and strings.

  • Huge delay after "liveconnect: Invoking JS method: document"

    Hi,
    We're trying to deply an application which uses a Java applet on the (browser) client. All went well in v.1.4.2, but when I switched to v1.5.0_02 I had serious delay on starting the applet.
    Turning on level 5 (output is at the end)in the console shows there is a delay of sometimes more then 60 seconds between "liveconnect: Invoking JS method: document" and "liveconnect: Invoking JS method: URL".
    After "liveconnect: Invoking JS method: document" CPU goes up to about 50-60% for approx. 5 seconds. It then goes up to 100% for about a minute. Once Java continues, everything works fine. However, startup times of more then a minute is just not acceptable to our customers and most will probably close/kill their browser before that.
    Can anyone of you tell me what is exactly going on during "liveconnect: Invoking JS method: document" and why that could take so much CPU and about a minute. It is even before loading the actual JAR file, so I do not suspect the applet itself.
    Environment:
    Sun plugin v1.5.0_02
    MS IE 6.0 on WinXP SP2
    Trace level set to 5: all ... completed.
    basic: Registered modality listener
    liveconnect: Invoking JS method: document
    [ [ [ -o-o-o-o-o-o- here is the huge delay -o-o-o-o-o-o- ] ] ]
    liveconnect: Invoking JS method: URL
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@4204, refcount=1
    network: Connecting http://*****/forms90/java/splash_et.gif with proxy=HTTP @ /194.159.73.69:8080
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    network: Connecting http://*****/forms90/java/f90all.jar with proxy=HTTP @ /194.159.73.69:8080
    basic: Loading http://*****/forms90/java/f90all.jar from cache
    basic: Reading cached JAR file from JRE 1.5 release
    basic: Certificates for http://*****/forms90/java/f90all.jar is read from JAR cache

    Java Plug-in 1.5.0_03
    Using JRE version 1.5.0_03 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\Wilfred
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    Trace level set to 5: all ... completed.
    basic: Registered modality listener
    liveconnect: Invoking JS method: document
    Dump thread stack ...
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_03-b07 mixed mode):
    "Thread-2" prio=5 tid=0x04f43d28 nid=0x704 runnable [0x064ef000..0x064efb68]
         at sun.plugin.com.DispatchClient.nativeInvoke(Native Method)
         at sun.plugin.com.DispatchClient.invoke(Unknown Source)
         at sun.plugin.javascript.ocx.JSObject.invoke(Unknown Source)
         - locked <0x10a19758> (a sun.plugin.javascript.ocx.JSObject)
         at sun.plugin.javascript.ocx.JSObject.getMember(Unknown Source)
         at sun.plugin.AppletViewer.getDocumentBase(Unknown Source)
         - locked <0x10a19778> (a java.lang.Object)
         at sun.plugin.AppletViewer.getCodeBase(Unknown Source)
         - locked <0x10a19908> (a java.lang.Object)
         at sun.plugin.AppletViewer.createClassLoader(Unknown Source)
         at sun.plugin.AppletViewer.appletInit(Unknown Source)
         at sun.plugin.viewer.LifeCycleManager.initAppletPanel(Unknown Source)
         at sun.plugin.viewer.IExplorerPluginObject$Initer.run(Unknown Source)
    "TimerQueue" daemon prio=5 tid=0x04f9d998 nid=0x410 in Object.wait() [0x05b7f000..0x05b7fbe8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x109f3438> (a javax.swing.TimerQueue)
         at javax.swing.TimerQueue.run(Unknown Source)
         - locked <0x109f3438> (a javax.swing.TimerQueue)
         at java.lang.Thread.run(Unknown Source)
    "AWT-EventQueue-0" prio=7 tid=0x04f83e18 nid=0xdc8 in Object.wait() [0x059bf000..0x059bfc68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x1089a910> (a java.awt.EventQueue)
         at java.lang.Object.wait(Unknown Source)
         at java.awt.EventQueue.getNextEvent(Unknown Source)
         - locked <0x1089a910> (a java.awt.EventQueue)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "ConsoleWriterThread" daemon prio=7 tid=0x04f834f0 nid=0xe6c in Object.wait() [0x058bf000..0x058bfce8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x10911098> (a java.lang.Object)
         at java.lang.Object.wait(Unknown Source)
         at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source)
         - locked <0x10911098> (a java.lang.Object)
    "AWT-EventQueue-1" prio=7 tid=0x04f0bc48 nid=0x8e4 runnable [0x057bf000..0x057bfd68]
         at sun.plugin.JavaRunTime.dumpAllStacks(Native Method)
         at sun.plugin.util.PluginConsoleController.dumpAllStacks(Unknown Source)
         at com.sun.deploy.util.ConsoleWindow$1.actionPerformed(Unknown Source)
         at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
         at javax.swing.SwingUtilities.notifyAction(Unknown Source)
         at javax.swing.JComponent.processKeyBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
         at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
         at javax.swing.JComponent.processKeyBindings(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.pumpApprovedKeyEvents(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.SequencedEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "traceMsgQueueThread" daemon prio=5 tid=0x04eecf48 nid=0xb48 in Object.wait() [0x055bf000..0x055bfa68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a59c8> (a java.util.ArrayList)
         at java.lang.Object.wait(Unknown Source)
         at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
         - locked <0x108a59c8> (a java.util.ArrayList)
         at java.lang.Thread.run(Unknown Source)
    "AWT-Windows" daemon prio=7 tid=0x04ee6920 nid=0xd88 runnable [0x053af000..0x053afae8]
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    "AWT-Shutdown" prio=5 tid=0x04ee6538 nid=0x414 in Object.wait() [0x052af000..0x052afb68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a5618> (a java.lang.Object)
         at java.lang.Object.wait(Unknown Source)
         at sun.awt.AWTAutoShutdown.run(Unknown Source)
         - locked <0x108a5618> (a java.lang.Object)
         at java.lang.Thread.run(Unknown Source)
    "Java2D Disposer" daemon prio=10 tid=0x04edf6b0 nid=0xff8 in Object.wait() [0x051af000..0x051afbe8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a56a0> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x108a56a0> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at sun.java2d.Disposer.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    "Low Memory Detector" daemon prio=5 tid=0x01a7c278 nid=0xf44 runnable [0x00000000..0x00000000]
    "CompilerThread0" daemon prio=10 tid=0x01a7aea8 nid=0xecc waiting on condition [0x00000000..0x04c7f6cc]
    "Signal Dispatcher" daemon prio=10 tid=0x01a7a230 nid=0x3bc runnable [0x00000000..0x00000000]
    "Finalizer" daemon prio=9 tid=0x01a71670 nid=0x5f0 in Object.wait() [0x04a7f000..0x04a7fa68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a5848> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x108a5848> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
    "Reference Handler" daemon prio=10 tid=0x01a701e0 nid=0xf54 in Object.wait() [0x0497f000..0x0497fae8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a5550> (a java.lang.ref.Reference$Lock)
         at java.lang.Object.wait(Unknown Source)
         at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
         - locked <0x108a5550> (a java.lang.ref.Reference$Lock)
    "main" prio=5 tid=0x019afd10 nid=0x718 runnable [0x00139000..0x0013da34]
         at sun.awt.windows.WComponentPeer.createPrintedPixels(Native Method)
         at sun.awt.windows.WComponentPeer.print(Unknown Source)
         at sun.awt.windows.WCanvasPeer.print(Unknown Source)
         at sun.awt.windows.WPanelPeer.print(Unknown Source)
         at java.awt.GraphicsCallback$PeerPrintCallback.run(Unknown Source)
         at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
         at java.awt.Component.printAll(Unknown Source)
         at java.awt.GraphicsCallback$PrintAllCallback.run(Unknown Source)
         at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
         at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
         at java.awt.Container.printComponents(Unknown Source)
         at sun.awt.windows.WEmbeddedFrame.print(Unknown Source)
    "VM Thread" prio=10 tid=0x01a6c098 nid=0xf68 runnable
    "VM Periodic Task Thread" prio=10 tid=0x01a7d450 nid=0x2ec waiting on condition
    Done.
    Dump thread stack ...
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_03-b07 mixed mode):
    "Thread-2" prio=5 tid=0x04f43d28 nid=0x704 runnable [0x064ef000..0x064efb68]
         at sun.plugin.com.DispatchClient.nativeInvoke(Native Method)
         at sun.plugin.com.DispatchClient.invoke(Unknown Source)
         at sun.plugin.javascript.ocx.JSObject.invoke(Unknown Source)
         - locked <0x10a18428> (a sun.plugin.javascript.ocx.JSObject)
         at sun.plugin.javascript.ocx.JSObject.getMember(Unknown Source)
         at sun.plugin.AppletViewer.getDocumentBase(Unknown Source)
         - locked <0x10a18448> (a java.lang.Object)
         at sun.plugin.AppletViewer.getCodeBase(Unknown Source)
         - locked <0x10a185d8> (a java.lang.Object)
         at sun.plugin.AppletViewer.createClassLoader(Unknown Source)
         at sun.plugin.AppletViewer.appletInit(Unknown Source)
         at sun.plugin.viewer.LifeCycleManager.initAppletPanel(Unknown Source)
         at sun.plugin.viewer.IExplorerPluginObject$Initer.run(Unknown Source)
    "TimerQueue" daemon prio=5 tid=0x04f9d998 nid=0x410 in Object.wait() [0x05b7f000..0x05b7fbe8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x109f2530> (a javax.swing.TimerQueue)
         at javax.swing.TimerQueue.run(Unknown Source)
         - locked <0x109f2530> (a javax.swing.TimerQueue)
         at java.lang.Thread.run(Unknown Source)
    "AWT-EventQueue-0" prio=7 tid=0x04f83e18 nid=0xdc8 in Object.wait() [0x059bf000..0x059bfc68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x1089a910> (a java.awt.EventQueue)
         at java.lang.Object.wait(Unknown Source)
         at java.awt.EventQueue.getNextEvent(Unknown Source)
         - locked <0x1089a910> (a java.awt.EventQueue)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "ConsoleWriterThread" daemon prio=7 tid=0x04f834f0 nid=0xe6c in Object.wait() [0x058bf000..0x058bfce8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x10910e78> (a java.lang.Object)
         at java.lang.Object.wait(Unknown Source)
         at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source)
         - locked <0x10910e78> (a java.lang.Object)
    "AWT-EventQueue-1" prio=7 tid=0x04f0bc48 nid=0x8e4 runnable [0x057bf000..0x057bfd68]
         at sun.plugin.JavaRunTime.dumpAllStacks(Native Method)
         at sun.plugin.util.PluginConsoleController.dumpAllStacks(Unknown Source)
         at com.sun.deploy.util.ConsoleWindow$1.actionPerformed(Unknown Source)
         at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
         at javax.swing.SwingUtilities.notifyAction(Unknown Source)
         at javax.swing.JComponent.processKeyBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
         at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
         at javax.swing.JComponent.processKeyBindings(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "traceMsgQueueThread" daemon prio=5 tid=0x04eecf48 nid=0xb48 in Object.wait() [0x055bf000..0x055bfa68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a59c8> (a java.util.ArrayList)
         at java.lang.Object.wait(Unknown Source)
         at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
         - locked <0x108a59c8> (a java.util.ArrayList)
         at java.lang.Thread.run(Unknown Source)
    "AWT-Windows" daemon prio=7 tid=0x04ee6920 nid=0xd88 runnable [0x053af000..0x053afae8]
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    "AWT-Shutdown" prio=5 tid=0x04ee6538 nid=0x414 in Object.wait() [0x052af000..0x052afb68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a5618> (a java.lang.Object)
         at java.lang.Object.wait(Unknown Source)
         at sun.awt.AWTAutoShutdown.run(Unknown Source)
         - locked <0x108a5618> (a java.lang.Object)
         at java.lang.Thread.run(Unknown Source)
    "Java2D Disposer" daemon prio=10 tid=0x04edf6b0 nid=0xff8 in Object.wait() [0x051af000..0x051afbe8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a56a0> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x108a56a0> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at sun.java2d.Disposer.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    "Low Memory Detector" daemon prio=5 tid=0x01a7c278 nid=0xf44 runnable [0x00000000..0x00000000]
    "CompilerThread0" daemon prio=10 tid=0x01a7aea8 nid=0xecc waiting on condition [0x00000000..0x04c7f6cc]
    "Signal Dispatcher" daemon prio=10 tid=0x01a7a230 nid=0x3bc runnable [0x00000000..0x00000000]
    "Finalizer" daemon prio=9 tid=0x01a71670 nid=0x5f0 in Object.wait() [0x04a7f000..0x04a7fa68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a5848> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x108a5848> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
    "Reference Handler" daemon prio=10 tid=0x01a701e0 nid=0xf54 in Object.wait() [0x0497f000..0x0497fae8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a5550> (a java.lang.ref.Reference$Lock)
         at java.lang.Object.wait(Unknown Source)
         at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
         - locked <0x108a5550> (a java.lang.ref.Reference$Lock)
    "main" prio=5 tid=0x019afd10 nid=0x718 runnable [0x00139000..0x0013da34]
         at sun.awt.windows.WComponentPeer.createPrintedPixels(Native Method)
         at sun.awt.windows.WComponentPeer.print(Unknown Source)
         at sun.awt.windows.WCanvasPeer.print(Unknown Source)
         at sun.awt.windows.WPanelPeer.print(Unknown Source)
         at java.awt.GraphicsCallback$PeerPrintCallback.run(Unknown Source)
         at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
         at java.awt.Component.printAll(Unknown Source)
         at java.awt.GraphicsCallback$PrintAllCallback.run(Unknown Source)
         at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
         at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
         at java.awt.Container.printComponents(Unknown Source)
         at sun.awt.windows.WEmbeddedFrame.print(Unknown Source)
    "VM Thread" prio=10 tid=0x01a6c098 nid=0xf68 runnable
    "VM Periodic Task Thread" prio=10 tid=0x01a7d450 nid=0x2ec waiting on condition
    Done.
    Dump thread stack ...
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_03-b07 mixed mode):
    "Thread-2" prio=5 tid=0x04f43d28 nid=0x704 runnable [0x064ef000..0x064efb68]
         at sun.plugin.com.DispatchClient.nativeInvoke(Native Method)
         at sun.plugin.com.DispatchClient.invoke(Unknown Source)
         at sun.plugin.javascript.ocx.JSObject.invoke(Unknown Source)
         - locked <0x10a18428> (a sun.plugin.javascript.ocx.JSObject)
         at sun.plugin.javascript.ocx.JSObject.getMember(Unknown Source)
         at sun.plugin.AppletViewer.getDocumentBase(Unknown Source)
         - locked <0x10a18448> (a java.lang.Object)
         at sun.plugin.AppletViewer.getCodeBase(Unknown Source)
         - locked <0x10a185d8> (a java.lang.Object)
         at sun.plugin.AppletViewer.createClassLoader(Unknown Source)
         at sun.plugin.AppletViewer.appletInit(Unknown Source)
         at sun.plugin.viewer.LifeCycleManager.initAppletPanel(Unknown Source)
         at sun.plugin.viewer.IExplorerPluginObject$Initer.run(Unknown Source)
    "TimerQueue" daemon prio=5 tid=0x04f9d998 nid=0x410 in Object.wait() [0x05b7f000..0x05b7fbe8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x109f2530> (a javax.swing.TimerQueue)
         at javax.swing.TimerQueue.run(Unknown Source)
         - locked <0x109f2530> (a javax.swing.TimerQueue)
         at java.lang.Thread.run(Unknown Source)
    "AWT-EventQueue-0" prio=7 tid=0x04f83e18 nid=0xdc8 in Object.wait() [0x059bf000..0x059bfc68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x1089a910> (a java.awt.EventQueue)
         at java.lang.Object.wait(Unknown Source)
         at java.awt.EventQueue.getNextEvent(Unknown Source)
         - locked <0x1089a910> (a java.awt.EventQueue)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "ConsoleWriterThread" daemon prio=7 tid=0x04f834f0 nid=0xe6c in Object.wait() [0x058bf000..0x058bfce8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x10910e78> (a java.lang.Object)
         at java.lang.Object.wait(Unknown Source)
         at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source)
         - locked <0x10910e78> (a java.lang.Object)
    "AWT-EventQueue-1" prio=7 tid=0x04f0bc48 nid=0x8e4 runnable [0x057bf000..0x057bfd68]
         at sun.plugin.JavaRunTime.dumpAllStacks(Native Method)
         at sun.plugin.util.PluginConsoleController.dumpAllStacks(Unknown Source)
         at com.sun.deploy.util.ConsoleWindow$1.actionPerformed(Unknown Source)
         at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
         at javax.swing.SwingUtilities.notifyAction(Unknown Source)
         at javax.swing.JComponent.processKeyBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
         at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
         at javax.swing.JComponent.processKeyBindings(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "traceMsgQueueThread" daemon prio=5 tid=0x04eecf48 nid=0xb48 in Object.wait() [0x055bf000..0x055bfa68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a59c8> (a java.util.ArrayList)
         at java.lang.Object.wait(Unknown Source)
         at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
         - locked <0x108a59c8> (a java.util.ArrayList)
         at java.lang.Thread.run(Unknown Source)
    "AWT-Windows" daemon prio=7 tid=0x04ee6920 nid=0xd88 runnable [0x053af000..0x053afae8]
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    "AWT-Shutdown" prio=5 tid=0x04ee6538 nid=0x414 in Object.wait() [0x052af000..0x052afb68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a5618> (a java.lang.Object)
         at java.lang.Object.wait(Unknown Source)
         at sun.awt.AWTAutoShutdown.run(Unknown Source)
         - locked <0x108a5618> (a java.lang.Object)
         at java.lang.Thread.run(Unknown Source)
    "Java2D Disposer" daemon prio=10 tid=0x04edf6b0 nid=0xff8 in Object.wait() [0x051af000..0x051afbe8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a56a0> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x108a56a0> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at sun.java2d.Disposer.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    "Low Memory Detector" daemon prio=5 tid=0x01a7c278 nid=0xf44 runnable [0x00000000..0x00000000]
    "CompilerThread0" daemon prio=10 tid=0x01a7aea8 nid=0xecc waiting on condition [0x00000000..0x04c7f6cc]
    "Signal Dispatcher" daemon prio=10 tid=0x01a7a230 nid=0x3bc runnable [0x00000000..0x00000000]
    "Finalizer" daemon prio=9 tid=0x01a71670 nid=0x5f0 in Object.wait() [0x04a7f000..0x04a7fa68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a5848> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x108a5848> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
    "Reference Handler" daemon prio=10 tid=0x01a701e0 nid=0xf54 in Object.wait() [0x0497f000..0x0497fae8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a5550> (a java.lang.ref.Reference$Lock)
         at java.lang.Object.wait(Unknown Source)
         at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
         - locked <0x108a5550> (a java.lang.ref.Reference$Lock)
    "main" prio=5 tid=0x019afd10 nid=0x718 runnable [0x00139000..0x0013da34]
         at sun.awt.windows.WComponentPeer.createPrintedPixels(Native Method)
         at sun.awt.windows.WComponentPeer.print(Unknown Source)
         at sun.awt.windows.WCanvasPeer.print(Unknown Source)
         at sun.awt.windows.WPanelPeer.print(Unknown Source)
         at java.awt.GraphicsCallback$PeerPrintCallback.run(Unknown Source)
         at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
         at java.awt.Component.printAll(Unknown Source)
         at java.awt.GraphicsCallback$PrintAllCallback.run(Unknown Source)
         at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
         at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
         at java.awt.Container.printComponents(Unknown Source)
         at sun.awt.windows.WEmbeddedFrame.print(Unknown Source)
    "VM Thread" prio=10 tid=0x01a6c098 nid=0xf68 runnable
    "VM Periodic Task Thread" prio=10 tid=0x01a7d450 nid=0x2ec waiting on condition
    Done.
    Dump thread stack ...
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_03-b07 mixed mode):
    "Thread-2" prio=5 tid=0x04f43d28 nid=0x704 runnable [0x064ef000..0x064efb68]
         at sun.plugin.com.DispatchClient.nativeInvoke(Native Method)
         at sun.plugin.com.DispatchClient.invoke(Unknown Source)
         at sun.plugin.javascript.ocx.JSObject.invoke(Unknown Source)
         - locked <0x10a18428> (a sun.plugin.javascript.ocx.JSObject)
         at sun.plugin.javascript.ocx.JSObject.getMember(Unknown Source)
         at sun.plugin.AppletViewer.getDocumentBase(Unknown Source)
         - locked <0x10a18448> (a java.lang.Object)
         at sun.plugin.AppletViewer.getCodeBase(Unknown Source)
         - locked <0x10a185d8> (a java.lang.Object)
         at sun.plugin.AppletViewer.createClassLoader(Unknown Source)
         at sun.plugin.AppletViewer.appletInit(Unknown Source)
         at sun.plugin.viewer.LifeCycleManager.initAppletPanel(Unknown Source)
         at sun.plugin.viewer.IExplorerPluginObject$Initer.run(Unknown Source)
    "TimerQueue" daemon prio=5 tid=0x04f9d998 nid=0x410 in Object.wait() [0x05b7f000..0x05b7fbe8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x109f2530> (a javax.swing.TimerQueue)
         at javax.swing.TimerQueue.run(Unknown Source)
         - locked <0x109f2530> (a javax.swing.TimerQueue)
         at java.lang.Thread.run(Unknown Source)
    "AWT-EventQueue-0" prio=7 tid=0x04f83e18 nid=0xdc8 in Object.wait() [0x059bf000..0x059bfc68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x1089a910> (a java.awt.EventQueue)
         at java.lang.Object.wait(Unknown Source)
         at java.awt.EventQueue.getNextEvent(Unknown Source)
         - locked <0x1089a910> (a java.awt.EventQueue)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "ConsoleWriterThread" daemon prio=7 tid=0x04f834f0 nid=0xe6c in Object.wait() [0x058bf000..0x058bfce8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x10910e78> (a java.lang.Object)
         at java.lang.Object.wait(Unknown Source)
         at com.sun.deploy.util.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source)
         - locked <0x10910e78> (a java.lang.Object)
    "AWT-EventQueue-1" prio=7 tid=0x04f0bc48 nid=0x8e4 runnable [0x057bf000..0x057bfd68]
         at sun.plugin.JavaRunTime.dumpAllStacks(Native Method)
         at sun.plugin.util.PluginConsoleController.dumpAllStacks(Unknown Source)
         at com.sun.deploy.util.ConsoleWindow$1.actionPerformed(Unknown Source)
         at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
         at javax.swing.SwingUtilities.notifyAction(Unknown Source)
         at javax.swing.JComponent.processKeyBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
         at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
         at javax.swing.JComponent.processKeyBindings(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "traceMsgQueueThread" daemon prio=5 tid=0x04eecf48 nid=0xb48 in Object.wait() [0x055bf000..0x055bfa68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a59c8> (a java.util.ArrayList)
         at java.lang.Object.wait(Unknown Source)
         at com.sun.deploy.util.Trace$TraceMsgQueueChecker.run(Unknown Source)
         - locked <0x108a59c8> (a java.util.ArrayList)
         at java.lang.Thread.run(Unknown Source)
    "AWT-Windows" daemon prio=7 tid=0x04ee6920 nid=0xd88 runnable [0x053af000..0x053afae8]
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    "AWT-Shutdown" prio=5 tid=0x04ee6538 nid=0x414 in Object.wait() [0x052af000..0x052afb68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x108a5618> (a java.lang.Object)
         at java.lang.Object.wait(Unknown Source)
         at sun.awt.AWTAutoShutdown.run(Unknown Source)
         - locked <0x108a5618> (a jav

  • DisclosureListener of af:showDetailItem Invoking Method Twice

    Hi All,
    I am using Jdeveloper Studio Edition Version 11.1.2.1.0.
    I have a af:panelAccordion, generating af:showDetailItem at runtime using af:forEach component from a view. The code snippet is given below:
    <af:panelAccordion id="pa1" partialTriggers="np1" discloseMany="false" discloseNone="false">
         <af:forEach items="#{bindings.VerticalAppMenus.children}" var="globalMenu" varStatus="globalMenuVarStatus">
              <af:showDetailItem text="#{globalMenu.MenuLabel}" id="sdi1" disclosureListener="#{pageFlowScope.globalMenus.refreshLineMenus}">
                               <f:attribute name="currentVerticalMenuId" value="#{globalMenu.MenuId}"/>
                               <af:tree value="#{bindings.LineAppMenus.treeModel}" var="node"
                                            selectionListener="#{bindings.LineAppMenus.treeModel.makeCurrent}"
                                            rowSelection="single" id="t1">
                                            <f:facet name="nodeStamp">
                                                <af:outputText value="#{node}" id="ot1"/>
                                            </f:facet>
                               </af:tree>
              </af:showDetailItem>
         </af:forEach>
    </af:panelAccordion>Every af:showDetailItem is assigned an Id through f:attribute which is passed to method refreshLineMenus pointed by disclosureListener property. Assume af:showDetailItem with Id=2 is currently disclosed and I click on af:showDetailItem with Id=4 to disclose it. The method pointed by disclosureListener is getting invoked twice, initially with value 4 and then 2. Ideally it shall be invoked with a value 4 only as the item which is disclosed has the Id=4.
    Is it the default behaviour for the disclosureListener to invoke the method twice; means once for the disclosed and once for the concealed af:showDetailItem? If yes, then how can I executed a method once on disclosure of showDetailItem in the above code?
    Any help will be highly appreciated.
    Thanks ... Best Regards
    Bilal

    Hi,
    yes there will be 2 invocations...
    one for the older one and one for new one..
    so there will be 2 invocations but no 2 requests, you can easily know the current selected tab by DisclosureEvent.isExpanded()
    which will return whether current item is expanded or not...

  • Invoking methods through reflection

    I need to check a property in the javax.faces.component.html.HtmlInputText.
    If i do it in the following manner,I get things fine:
    if(comp.getClass().getName().equalsIgnoreCase("javax.faces.component.html.HtmlInputText")) {
    String getter=((javax.faces.component.html.HtmlInputText)comp).getOnfocus();
    if(getter!=null) {
    System.out.println(getter);
    But if i invoke it through reflection,I get nothing.
    I am doing the following:
    Class reqClass = Class.forName("javax.faces.component.html.HtmlInputText");
    Method[] methodList = reqClass.getDeclaredMethods();
    int methodIdx = 0;
    for (int i = 0; i < methodList.length; i++) {
    Method reqMethod =methodList;
    if(reqMethod.getName().indexOf("getOn")== 0) //method starts with getOn
    // method accepts parameters, define the types in order here as Class[]
    Class[] classParams = new Class [] {};
    // set the method of the class object
    Method method = reqClass.getMethod( reqMethod.getName(), classParams );
    // pass values to fill parameters of method
    Object[] arguments = new Object [] {};
    // invoke method via reflection.Note that class has default constructor
    Object retobj=method.invoke( reqClass.newInstance() ,
    arguments );
    String getterResult = (String)retobj;
    if(getterResult!=null)
    System.out.println(reqMethod.getName() + " ## " + getterResult);
    What am i doing wrong while invoking the method through reflection.
    I get no exception either.

    It is a simple typo.
    An alternative I tried is the following ,but that does not work either.
    Class reqClass = Class.forName("javax.faces.component.html.HtmlInputText");
    Method[] methodList = reqClass.getDeclaredMethods();
    int methodIdx = 0;
    for (int i = 0; i < methodList.length; i++) {
    Method reqMethod =methodList;
    if(reqMethod.getName().startsWith("getOn")) //method starts with getOn
    System.out.println(reqMethod.getName());
    // pass values to fill parameters of method
    Object[] arguments = new Object [] {};
    // invoke method via reflection
    Object retobj=reqMethod.invoke( reqClass.newInstance(), arguments );
    String getterResult = (String)retobj;
    if(getterResult!=null)
    System.out.println(reqMethod.getName() + " ## " +getterResult);

Maybe you are looking for