Dynamic casting of Method.invoke() return

Can anyone clue me in on how to cast the return of Method.invoke() based on Method.getReturnType() or whatever else might work dynamically....that is without knowing which method until runtime?
Thanks,
Brad

Thanks for helping me get a grip....makes perfect sense, I guess I was just wondering how far you could take the runtime decisions thing.
Can I say that, ( and it seems obvious but... ), programatic flexibility and runtime decision making can only be taken so far - and has to be made in the context of certain presumptions at compike time.
I can see that in implementing the:
<jsp: setParameter name="myBean" property="*" />
Presumptions are made that the values passed to
the bean setter methods will be String objects and that the
values returned from the:getter methods using:
<jsp: getProperty name="myBean" property="whaterver" />
will also be String objects.
Reality check?
Thanks again,
Brad

Similar Messages

  • How to trap null return values from getters when using Method.invoke()?

    Hi,
    I am using Method.invoke() to access getters in an Object. I need to know which getters return a value and which return null. However, irrespective of the actual return value, I am always getting non-null return value when using Method.invoke().
    Unfortunately, the API documentation of Method.invoke() does not specify how it treats null return values.
    Can someone help?
    Thanks

    What do you get as a result?I think I know what the problem is.
    I tested this using following and it worked fine:
    public class TestMethodInvoke {
    public String getName() {
    return null;
    public static void main(String args[]) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
    Object o = new TestMethodInvoke();
    Class cls = o.getClass();
    Method m = cls.getMethod("getName", (Class[]) null);
    Object result = m.invoke(o, (Object[])null);
    if (result == null) {
    System.err.println("OK: Return value was null as expected");
    else {
    System.err.println("FAILED: Return value was NOT null as expected");
    However, when I use the same technique with an EJB 3.0 Entity class, the null return value is not returned. Instead, I get a String() object. Clearly, the problem is the the EJB 3.0 implementation (Glassfish/Toplink) which is manipulating the getters.
    Regards
    Dibyendu

  • Dynamic cast at runtime (Here we go again! )

    Hy folks,
    today I read so many entries about dynamic casting. But no one maps to my problem. For a lot of them individual alternatives were found. And so I hope...
    Ok, what's my problem?
    here simplified:
    I have a HashMap with couples of SwingComponents and StringArray[3].
    The SwingComponents are stored as Objects (they are all JComponents).
    The StringArray comprised "the exact ClassName" (like "JButton" or "JPanel"),
    "the method, who would be called" (like "addItemListener")
    and "the ListenerName" (like "MouseMotionListener" or "ActionListener")
    At compiletime I don't know, what JCommponent gets which Listener.
    So a JPanel could add an ItemListener, another JPanel could add
    a MouseListener and an ActionListener.
    I get the description of the GUI not until runtime.
    The 'instanceof'-resolution is not acceptable, because there are above 50 listener. If I write such a class, I would write weeks for it, and it will be enormous.
    Now, my question
    I get the class of the Listenertype by
    Class c=Class.forName(stringArray[2]);
    and the method I'll call
    java.lang.reflect.Method method=component.getClass().getDeclaredMethod(s[1],classArrayOfTheParameter[]); //the parameter is not important here
    And I have a class, who implements all required ListenerInterfaces: EHP
    Now I wish something like this
    method.invoke((JPanel)jcomponent,(c)EHP);
    Is there anybode, who can give me an alternative resolution
    without instanceof or switch-case ?
    Greatings egosum

    I see, your right. Thanks. This problem is been solved.
    But a second problem is, that jcomponent can be every Swing-Object.
    I get the swing-component as Object from the HashMap . And I know
    what it is exactly by a String.
    What I need here is
    method.invoke(("SwingType")swingcomponentObject,Object[] args);
    I know, that this doesn't exist. Here my next question
    Can I take an other structure than HashMap, where the return value
    is a safety type (and not an Object). Or there are some other hints
    about similar problems and there resolutions?
    I don't like to write 50 (or even more than 50) "instanceOf"-instructions or "equal"-queries. And I'm not really interested in the whole set of java swing elements existing.
    I appreciate all the help I can get.
    With regards egosum

  • Dynamic casting

    hello all (happy new year!),
    i am trying to dynamically cast a class that is only known at runtime from the configuration file that is parsed during startup.
    the code is as follows:
    ArrayList classes = new ArrayList();
    ... (parsing)
    classes = JAFSaxParserInstance.getClasses();
    Iterator it = classes.iterator();
    while (it.hasNext())
      Object next = it.next();
      Class appToLoad = Class.forName(next.toString());
      Method instanceMethod = getInstanceMethod(appToLoad);
      Object frame = instanceMethod.invoke(null,null);
      Component[] components = new Component[MAX];
      components = ((UNKNOWN_CLASS) frame).getContentPane().getComponents();
    }without the ability to discover the class from which i have just called a getInstance() method, i seem unable to retrieve all the components of the JFrame subclass (i get a ClassCastException). for my purposes, all of the UNKNOWN_CLASSes will be subclasses of JFrame, but without explicitly being able to cast it (frame) exactly, i cannot extract the components.
    is there any way to dynamically cast such objects at runtime? by this i mean i cannot use switch statements b/c the classes are unknown prior to runtime.
    thanks!

    point well taken. i've probably designed my application wrong if it's this difficult, but let me try to explain what it is i'm trying to do.
    i had previously created a swing application whose central class (bootstrap initialized by a separate class with a main method) is a subclass of JFrame using the GridBagLayout manager. now, since more related gui applications are to be built, i thought it would be nice to build an application framework into which i could insert each standalone application into a JTabbedPane pane of the framework application.
    the application framework has the same structure as my previous application. a bootstrap main method class initializes the main application frame which builds a contentPane which contains a JTabbedPane. as this application framework frame is initializing, it parses an xml file which contains the data pertaining to each class and my DynamicLoader class attempts to load/initialize and add each class into a separate tab in the main application frame. that's where the problem arises since i don't know the exact class that will be loaded--only the xml file contains that information.
    i've read a few things about implementing interfaces in order to get around the inability to cast types at runtime, but am not too sure of how that might work.
    let me know if seeing some more of the code would help or if there's anything i should clarify.
    thanks!

  • Method.invoke

    Hi,
    I'm trying to dynamically load various classes at runtime but have encountered a problem with the Method.invoke() method.
    Class c = Class.forName( "car" );
    Method m = c.getDeclaredMethod("Execute", new Class [] { String.class } );
    object res = m.invoke( Object obj, Object[] arg); // here is the problemI do not know what parameters to set inside Method.invoke(). Looking for some advice here. All the classes that I want to load implement an interface;
    interface loadplugin
       boolean Execute(String str);
    }Any suggestions?

    Hi,
    You put the parameters the Method needs to the Object [] -
    This is a call you know:
    loadplugin myLoadPlugin = new LoadpluginImplementingClass();
    boolean result = myLoadplugin.Execute("Hallo World");The corrsponding call to the Method object is:
    Boolean result = (Boolean)m.invoke(myLoadpugin, new Object[]{"Hallo World"}); The Method object only can hanlde Object types. For any standard data type (int, boolean, double, etc.) the corresponding Wrappers have to be used. So the return in case of the Method-Object call is Boolean, not boolean.
    I hope this helps,
    Lars.

  • Java.lang.NoSuchMethodException Using Method.invoke(...)

    I try to use Method.invoke() to invoke a method from a class. The method
    has parameters with type JTextArea and JMyFrame, but I got the error
    messages java.lang.NoSuchMethodException . Any ideas???
    If I remove parameter "JFrame mainFrame" in start() method and it is working fine. Not sure why JMyFrame will throw this exception, as JMyFrame is derived from JFrame class
    public class MyFrame extends JFrame
         try
    ClassLoader loader
    = new MyClassLoader(Integer.parseInt("3"));
    Class c = loader.loadClass("NewMenuPackage.NewMenu");
    Class[] params = { JTextArea.class, JMyFrame.class };
         Method m = c.getMethod("start", params);
         Object obj = c.newInstance();
    m.invoke(obj,
         new Object[] {
              textArea,
              JMyFrame.this
    catch (Throwable e)
    JOptionPane.showMessageDialog(this, e);
    package NewMenuPackage;
    import javax.swing.*;
    public class NewMenu
         private static JMenuItem menuItem = new JMenuItem("New Menu");
         public static JMenuItem getJMenuItem()
              return menuItem;
         public static void start(JTextArea textArea, JFrame mainFrame)
              System.out.println("NewMenu->start()...");
    }

    Your "params" Class array has to specify the exact classes of the method, not subclasses. The line that is causing the NoSuchObjectException to be thrown is "c.getMethod("start", params);".
    You have to write your own reflection utility methods to find a method that matches on parameter subclasses.

  • Calling a method that returns an object Array

    Hello.
    During a JNICALL , I wish to call a method which returns an object array.
    ie my java class has a method of the form
    public MyObject[] getSomeObjects(String aString){
    MyObject[] theObjects=new MyObject[10];
    return theObjects
    Is there an equivalent to (env)->CallObjectMethod(...
    which returns a jobjectArray instead of a jobject, and if not could somebody suggest a way around this.
    Thanks,
    Neil

    I believe an array oj jobjects is also a jobject. You can then cast it to another class.

  • Method.invoke hangs?

    I'm trying to send a Class over a network, then invoke a Method inside the class.
                            final Method command = clazz.getDeclaredMethod("exec");
                            try {
                                System.out.println("Invoked0");
                                command.invoke(null);
                                System.out.println("Invoked1");
                            } catch (Exception e) {
                                throw new RuntimeException(e);
                            }Only Invoked0 prints, and there is no Exception. Whats wrong?
        class CommandClassLoader extends ClassLoader {
            public Class<?> defineClass0(String name, byte[] b, int off, int len) {
                return defineClass(name, b, off, len);
        }

    Oops, didn't realize I was throwing there, its printing a NPE.
    java.lang.NullPointerException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at colby.client.Client$1$2.run(Client.java:63)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
            at java.lang.Thread.run(Thread.java:619)That doesn't really make sense though? Why would it be happening there?

  • Web Service Method that returns an ArrayList

    Hi guys,
    I have to create a web service method that returns an ArrayList, but it's not working. My problem is:
    With the "@XmlSeeAlso" annotation, my client prints the result, but the ArryaList is not from java.util, it's from org.me.calculator so I can't use it.
    If I remove this annotation, I get no result, with this error message on Tomcat 6:
    [javax.xml.bind.JAXBException: class java.util.ArrayList nor any of its super class is known to this context.]
    I'm a newbie, and trying to understand web services (I read some posts here, but didn't get the point, from its answers), but this problem I just can't figure out how to solve....
    WEb Service
    package org.me.calculator;
    import java.io.Serializable;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import java.util.*;
    import java.util.ArrayList;
    import javax.xml.bind.annotation.XmlSeeAlso;
    * @author eduardo.domanski
    @WebService()
    @XmlSeeAlso({java.util.ArrayList.class}) // With this, I can see the result on client, but, the ArrayList is an org.me.calculator.ArrayList class.... Strange...
    public class CalculatorWS {
        @WebMethod(operationName = "valores")
        public ArrayList valores(@WebParam(name = "a") int a,
                           @WebParam(name = "b") int b) {
            ArrayList teste = new ArrayList();
            ArrayList a1 = new ArrayList();
            a1.add(a);
            a1.add(b);
            ArrayList a2 = new ArrayList();
            a2.add(a+b);
            a2.add(a-b);
            teste.add(a1);
            teste.add(a2);
            return  teste; 
    }CLient
    package org.me.calculator.client;
    import java.io.*;
    import java.net.*;
    import java.util.ArrayList;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ClientServlet extends HttpServlet {
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet ClientServlet</title>");
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet ClientServlet at " + request.getContextPath() + "</h1>");
            try { // Call Web Service Operation
                org.me.calculator.CalculatorWSService service = new org.me.calculator.CalculatorWSService();
                org.me.calculator.CalculatorWS port = service.getCalculatorWSPort();
                // TODO initialize WS operation arguments here
                int i = 8;
                int j = -6;
                // TODO process result here
                ArrayList result = (ArrayList) port.valores(i, j);
                out.println("Result = " + result);
            } catch (Exception ex) {
                System.out.println(ex);
            // TODO handle custom exceptions here
            out.println("</body>");
            out.println("</html>");
            out.close();
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            processRequest(request, response);
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            processRequest(request, response);
    }THank you all,
    Eduardo
    Edited by: EduardoDomanski on Apr 23, 2008 4:40 AM

    I forgot to say that, when I try to return an ArrayList of an object, for example, ClassA, which is on the package org.me.classes, on my Server App, the ArrayList is returned, but the objects are from type org.me.calculator.ClassA. It should be from org.me.classes.ClassA, right?
    This package also exists on my client App, to use the object, but as the returned type is from another package, I can't even cast it. I tried some annotations @Xml... but it failed.
    Packages
    ServerApp
    org.me.calculator
    CalcWS.java
    org.me.classes
    ClassA.java
    Client App
    org.me.classes
    ClassA.java
    The return from my method should be an ArrayList of org.me.classes.ClassA, but when I print it, on client, it's from org.me.calculator.ClassA.
    Does anybody knows, or had the same problem?
    Thanks,
    Eduardo

  • ADFFaces: returnFromDialog fails to invoke return listener after 5 attempts

    I am having an issue populating a text field using a selection from a pop-up dialog.
    The dialog is launched like the following:
    <af:commandLink action="dialog:search" useWindow="true" returnListener="somelistener"
    i have a returnListener defined in my backing bean and an ActionListener called from the dialog.
    The action listener method calls AdfFaces.getCurrentInstance().returnFromDialog(obj, null);
    This works fine in the beginning but after 5 or 6 attempts, it fails to populate the text field . Using the debugger I found that the return listener is no longer called after 5 attempts. But, it is called in the first few attempts.
    Has anyone else seen this behavior?
    Paul

    Hi Paul,
    I have reported this bug to Oracle (bug#6013033). You'll have to wait for the 11.1 release for the fix or ask for a merge on the 10.1.3.x branch through Metalink although support told me it would be very difficult to do so...
    You can find a workaround I posted here : [SOLVED] Re: ADFFaces: returnFromDialog fails to invoke return listener aft
    Other workarounds given through Metalink :
    Workaround steps
    ~~~~~~~~~~~~~
    1) Use a higher number for oracle.adf.view.faces.CLIENT_STATE_MAX_TOKENS
    In web.xml add the following
    <context-param>
    <param-name>oracle.adf.view.faces.CLIENT_STATE_MAX_TOKENS</param-name>
    <param-value>30</param-value>
    </context-param>
    This will not eliminate the issue. But if the dialog could be designed in such a way that we don't need that many requests (say increase range size), we could tackle the issue.
    2) Don't use token method.
    <context-param>
    <param-name>oracle.adf.view.faces.CLIENT_STATE_METHOD</param-name>
    <param-value>all</param-value>
    </context-param>
    This matches the client-side state saving behavior of JSF 1.1 as explained in the link specified above.
    3) Use server side state management.
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    Seb.

  • Why PageController method invoked multiple times per request

    I have a page with a customized PageController to override the "prepareModel(LifecycleContext)" method to create bindings dynamically for the page.
    I expected the overridden method only invoked once per loading/refresh of the page.
    From debugging, I found the overridden method actually invoked 3 times before the page was loaded.
    When I put some logic so that bindings only created the 1st time the overridden method invoked, then the page failed to show the data properly as if the binding was missing.
    With some debugging, I noticed the PageController invoked multiple times when I added the af:table to the page.
    Any idea why prepareModel() got invoked multiple time per loading of a page with af:table ?
    How do I determine when to create bindings within prepareModel() so that bindings only created once and the page can use the binding to show the data properly?

    <executables>
    <invokeAction id="onpageLoadClearTable" Binds="clearViewObject"
    RefreshCondition="#{adfFacesContext.postback == false}"/> --------added this into your pagedef.
    </executables>
    <bindings>
    <methodAction IterBinding="XXXXXXXXViewIterator" id="clearViewObject"
    MethodName="clearViewObject" RequiresUpdateModel="true"
    Action="999" IsViewObjectMethod="true"
    </bindings>

  • How to use java.lang.Class.getMethod() and java.lang.reflect.Method.invoke(

    I want to call a specified method of one class dynamically. I use the method
    "getMethod()" in package "java.lang.Class" to get method and "invoke()" in
    " java.lang.reflect.Method " to invoke method.
    The problem is as following :
    1. There are two argument in this method "getMethod(String MethodName , Class[] paremterTypes)" in package "Class". I have no idea about the second parameter " Class[] parameterTypes ".what does the argument exactly mean ?
    2. There are two argument in the method "invoke(object obj, object[] obj)" in package "Method".
    I have no idea about the second parameter "object[] obj ".what is mean ?
    I pass " null " value to it and it works.But i pass anothers ,jvm will throw exception.

    I have a generic Method Executer that has a method like
    public Object execute(String className, String methodName, Object args)
        String fullClassName = packageName + className ;
        Class delegateClass = Class.forName(fullClassName);
        BaseDelegate delegate = (BaseDelegate)delegateClass.newInstance();
        Method method = null;
        if (args == null)
            method = delegateClass.getMethod(methodName, new Class[] {});
            obj = method.invoke(delegate,new Object[] {});
        else
            method = delegateClass.getMethod(methodName, new Class[] {args.getClass()});
            obj = method.invoke(delegate, new Object[]{args});
       }This seems to have problems when I call the method from a class like:
    execute("CategoryDelegate", "getCategoryById", new Integer(4144));(I get a NoSuchMethodException)
    The method I am trying to execute in CategoryDelegate looks like:
    public Category getCategoryById(int categoryId) throws DelegateExceptionI think it has to deal with the difference in the way we handle Primitive Wrappers and Objects. Wrapper we have to use Interger.TYPE and with the rest of the Objects we have to use obj.class.
    Am I doing something wrong here? Any suggestions to make it work for primitive wrappers as well as Objects?

  • How to setup Custom method to return id

    Using the OE Schema and Customers table for simplicity. I want a method such as:
    public String getCustomerIdFromCustEmail(String email);
    I want to call this from an Action class in a JDev 10.1.2 ADF BC Struts JSP application. A call such as:
    String idValue = getCustomerIdFromCustEmail("[email protected]");
    (returning a string is not necessary. This could be a long or int value.)
    Questions:
    Where does this method belong? Entity, view or app module?
    What is the best way to code this? In a non J2EE app I would just create a connection object, run a query and return the result. So what is the BEST way in a JDEV J2EE application to perform the same thing?
    If I use a whereclause, I don't want to change the current status of the customers view object, I may be using it, I may not. So how do I keep the data non-messed up.
    Thanks!

    Here is the stack trace (it's BIG). If possible, could someone point out how to go through one of these. What am I looking for. I want to be able to solve these problems myself!
    Exception: JBO-30003: The application pool (apptrack.model.datamodel.ApptrackModuleLocal) failed to checkout an application module due to the following exception:
    06/11/01 14:35:41 JBO-30003: The application pool (apptrack.model.datamodel.ApptrackModuleLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.PCollException, msg=JBO-28010: Error while getting next sequence value for PS_TXN_seq from database
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1772)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1768)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2611)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:230)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.doBeginRequest(WSApplicationModuleImpl.java:2619)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.beginRequest(WSApplicationModuleImpl.java:2607)
         at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1243)
         at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:76)
         at oracle.adf.model.BindingContext.get(BindingContext.java:411)
         at oracle.adf.model.BindingContext.findDataControl(BindingContext.java:283)
         at apptrack.controller.strutsactions.LoginAction.onSubmit(LoginAction.java:95)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleEvent(PageLifecycle.java:544)
         at oracle.adf.controller.struts.actions.StrutsPageLifecycle.handleEvent(StrutsPageLifecycle.java:252)
         at oracle.adf.controller.lifecycle.PageLifecycle.processComponentEvents(PageLifecycle.java:477)
         at oracle.adf.controller.struts.actions.DataAction.processComponentEvents(DataAction.java:235)
         at oracle.adf.controller.struts.actions.DataAction.processComponentEvents(DataAction.java:430)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:126)
         at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:222)
         at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:153)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    oracle.jbo.PCollException: JBO-28010: Error while getting next sequence value for PS_TXN_seq from database
         at oracle.jbo.PCollException.throwException(PCollException.java:39)
         at oracle.jbo.pcoll.OraclePersistManager.queryNextCollectionId(OraclePersistManager.java:1451)
         at oracle.jbo.pcoll.PCollManager.register(PCollManager.java:560)
         at oracle.jbo.pcoll.PCollection.<init>(PCollection.java:102)
         at oracle.jbo.pcoll.PCollManager.createCollection(PCollManager.java:460)
         at oracle.jbo.server.DBSerializer.setup(DBSerializer.java:153)
         at oracle.jbo.server.DBSerializer.reservePassivationId(DBSerializer.java:251)
         at oracle.jbo.server.ApplicationModuleImpl.reserveSnapshotId(ApplicationModuleImpl.java:4981)
         at oracle.jbo.server.ApplicationModuleImpl.reservePassivationId(ApplicationModuleImpl.java:4963)
         at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:7742)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:3923)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:1915)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1739)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1768)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2611)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:230)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.doBeginRequest(WSApplicationModuleImpl.java:2619)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.beginRequest(WSApplicationModuleImpl.java:2607)
         at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1243)
         at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:76)
         at oracle.adf.model.BindingContext.get(BindingContext.java:411)
         at oracle.adf.model.BindingContext.findDataControl(BindingContext.java:283)
         at apptrack.controller.strutsactions.LoginAction.onSubmit(LoginAction.java:95)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleEvent(PageLifecycle.java:544)
         at oracle.adf.controller.struts.actions.StrutsPageLifecycle.handleEvent(StrutsPageLifecycle.java:252)
         at oracle.adf.controller.lifecycle.PageLifecycle.processComponentEvents(PageLifecycle.java:477)
         at oracle.adf.controller.struts.actions.DataAction.processComponentEvents(DataAction.java:235)
         at oracle.adf.controller.struts.actions.DataAction.processComponentEvents(DataAction.java:430)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:126)
         at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:222)
         at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:153)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-02289: sequence does not exist
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:625)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:112)
         at oracle.jdbc.driver.T4CStatement.execute_for_describe(T4CStatement.java:430)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:1003)
         at oracle.jdbc.driver.T4CStatement.execute_maybe_describe(T4CStatement.java:462)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1109)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1270)
         at oracle.jbo.pcoll.OraclePersistManager.queryNextCollectionId(OraclePersistManager.java:1435)
         at oracle.jbo.pcoll.PCollManager.register(PCollManager.java:560)
         at oracle.jbo.pcoll.PCollection.<init>(PCollection.java:102)
         at oracle.jbo.pcoll.PCollManager.createCollection(PCollManager.java:460)
         at oracle.jbo.server.DBSerializer.setup(DBSerializer.java:153)
         at oracle.jbo.server.DBSerializer.reservePassivationId(DBSerializer.java:251)
         at oracle.jbo.server.ApplicationModuleImpl.reserveSnapshotId(ApplicationModuleImpl.java:4981)
         at oracle.jbo.server.ApplicationModuleImpl.reservePassivationId(ApplicationModuleImpl.java:4963)
         at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:7742)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:3923)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:1915)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1739)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1768)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2611)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:441)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:230)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:411)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:406)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.doBeginRequest(WSApplicationModuleImpl.java:2619)
         at oracle.jbo.common.ws.WSApplicationModuleImpl.beginRequest(WSApplicationModuleImpl.java:2607)
         at oracle.adf.model.bc4j.DCJboDataControl.beginRequest(DCJboDataControl.java:1243)
         at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:76)
         at oracle.adf.model.BindingContext.get(BindingContext.java:411)
         at oracle.adf.model.BindingContext.findDataControl(BindingContext.java:283)
         at apptrack.controller.strutsactions.LoginAction.onSubmit(LoginAction.java:95)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleEvent(PageLifecycle.java:544)
         at oracle.adf.controller.struts.actions.StrutsPageLifecycle.handleEvent(StrutsPageLifecycle.java:252)
         at oracle.adf.controller.lifecycle.PageLifecycle.processComponentEvents(PageLifecycle.java:477)
         at oracle.adf.controller.struts.actions.DataAction.processComponentEvents(DataAction.java:235)
         at oracle.adf.controller.struts.actions.DataAction.processComponentEvents(DataAction.java:430)
         at oracle.adf.controller.lifecycle.PageLifecycle.handleLifecycle(PageLifecycle.java:126)
         at oracle.adf.controller.struts.actions.DataAction.handleLifecycle(DataAction.java:222)
         at oracle.adf.controller.struts.actions.DataAction.execute(DataAction.java:153)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)

  • Calling a method that returns values in a map - using JSTL

    Hi I have a method within an object that returns a List for a particular category
    public List<String> getFieldsInCategory(String categoryName){
        return _categoryFieldsMap.get(categoryName); //This is a map that returns a list                                                             
      }Trying to call the above function in jsp, the object is available as "document",
    how do i pass a key to the above function to return a List.
       <c:forEach items="${document.fieldsInCategory('ABSTRACT')}" var="temp">How do i get the list by passing a string key to my method,
    please let me know how to go about this.
    Thanks

    JSTL can not directly call methods that take parameters.
    All it can do is access javabean properties - ie via the revealed get/set methods.
    You can fudge it by having a seperate variable to set:
    Map  _categoryFieldsMap;
    String category = null;
    public void setCategory(String category){
      this.category = category;
    public String getCategory(String category){
      return category;
    public List<String> getFieldsInCategory(){
        return _categoryFieldsMap.get(categoryName); //This is a map that returns a list                          
      }You would then do it like this in your JSP:
    <c:set target="document.category" value="ABSTRACT"/>
    <c:forEach items="${document.fieldsInCategory}" var="temp">
    ...The other alternative is to return the entire map to the page.
    EL accesses maps quite handily.
    so given a method that returns the map:
    public Map getCategoryFieldsMap(){
    return _categoryFieldsMap;
    then the expression: ${document.categoryFieldsMap.ABSTRACT} returns what you are after.
    Hope this helps,
    evnafets

  • How to find out the value a method is returning using JDI

    Is it possible to find out what value (not simply the type) a method returns. I'd have thought there would be some access under MethodExitEvent but I can't find anything.

    Is it possible to find out what value (not simply the
    type) a method returns.There's currently no way to access a method's return value in
    method exit events
    This is Bug Id: 4195445
    Synopsis: JVMDI spec: Add return value to Method Exit Event
    http://developer.java.sun.com/developer/bugParade/bugs/4195445.html
    See also:
    http://developer.java.sun.com/developer/bugParade/bugs/4813046.html
    This will be fixed in the next major release of J2SE (code named 'tiger')

Maybe you are looking for

  • Help needed in funds flow report

    hi anybody worked on funds flow in FI...can you send some sample programs or Specs if possible

  • JS CS3 - PathItem

    Hi all, I'm finding it very difficult understanding the documentation for Illustrator Scripting. Can anybody help me figure out how I could change the properties of a selected pathItem which is actually a simple line? Especially stroke weight? Also a

  • How to unzip ? :(

    Hi . i am trying to unzip a file that i downloaded but i get Stufflt Expander giving me this message:please locate the file named 1eu.rar. ! so please can anyone tell me how to expand those kind of files . thanks and have a good day

  • Audio is often shaky

    In the last six months or so while I'm listening to audio, whether on my web browser or media player, the audio often gets shaky.  It kind of stutters for a few seconds at some point in the middle of the music or talking, then returns to normal after

  • Install oracle on AS 400

    Can't i install oracle on AS 400 machine? can i install only scheduling as a seperate package without going for complete oracle manufacturing implementation? This is a very urgent requirement. Please give me an answer as soon as possible.