I have an Object of unknown type. How to run it's method?

I have an Object, I dont't know it's type, and I want to run method, the name of which I know.
How can I do this?
Please help.
Thank you!

I have an Object, I dont't know it's type, and I want
to run method, the name of which I know.
How can I do this?
Please help.
Thank you!Checkout reflection package, which just does the magic.
Basically, the codes are like this:
public void invoke(Object obj, String methodName) throws Exception {
  Class cls = obj.getClass();
  java.lang.reflect.Method mth = cls.getMethod(methodName, cls.getClasses());
  mth.invoke(obj, null);  // if the method has no argument, otherwise, you'll have to provide all arguments instead of null.
}quite simple!

Similar Messages

  • Have an object as return type in a method in the WebDynproComponent

    Hello together.
    I've wrote an EJB in which is a method that read out a DB Table XYZ. In this EJB also are methods to search a single entry.
    In my WebDynpro applixcation i have a method in the Component that access the EJB and retrive the single entry for example. In the View implemantation i call the method from the "WEbDynPro component" which have a string as return type.
    Is it possible to have an object as return type?
    public java.lang.String sr( int KVNR )
        //@@begin sr()
        KVNummerDTO kvnrObject = new KVNummerDTO();
        String Kasse = "";
          try
              KVNRSessionLocal kVNummerSessionLocal = kVNRSessionLocalHome.create();
              kvnrObject = kVNummerSessionLocal.getKVNummer(KVNR);
              Kasse = kvnrObject.getKasse();
          catch (Exception e)
               e.printStackTrace();
               wdComponentAPI.getMessageManager().reportException(e.getMessage(), true);
          return Kasse;
        //@@end
    I want to return kvnrObject  and not only a string!

    Hello Micheal,
    While Creating a method in front of the return type click on the browse and select Java Native Type Radio Button and again click on the browse button available there. Type the name of the class in the class in it and you can select the return type. If it is a user made class then first the required Java files under the path Resources>src>packages><create a folder>java file. Then build the project so that the class name is visible in list while selecting the return type.
    Regards,
    Ardhendu

  • How to run WMI class.method?

    How to run Enable()/Disable() methods using Win32_NetworkAdapter class?
    Method link: http://msdn2.microsoft.com/en-us/library/aa390385(VS.85).aspx
    This only part of solution. http://forums.ni.com/ni/board/message?board.id=170&message.id=165837&query.id=73951#M165837
    Thanks.

    You should be able to do this using a .vbs script and labview.
    See this thread for some .vbs examples.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=144519#M144519

  • Need help - how to run this particular method in the main method?

    Hi all,
    I have a problem with methods that involves objects such as:
    public static Animal get(String choice) { ... } How do we return the "Animal" type object? I understand codes that return an int or a String but when it comes to objects, I'm totally lost.
    For example this code:
    import java.util.Scanner;
    interface Animal {
        void soundOff();
    class Elephant implements Animal {
        public void soundOff() {
            System.out.println("Trumpet");
    class Lion implements Animal {
        public void soundOff() {
            System.out.println("Roar");
    class TestAnimal {
        public static void main(String[] args) {
            TestAnimal ta = new TestAnimal();
            ta.get(); // error
            // doing Animal a = new Animal() is horrible... :(                   
        public static Animal get(String choice) {
            Scanner myScanner = new Scanner(System.in);
            choice = myScanner.nextLine();
            if (choice.equalsIgnoreCase("meat eater")) {
                return new Lion();
            } else {
                return new Elephant();
    }Out of desperation, I tried "Animal a = new Animal() ", and it was disastrous because an interface cannot be instantiated. :-S And I have no idea what else to put in my main method to get the code running. Need some help please.
    Thank you.

    Hi paulcw,
    Thank you. I've modified my code but it still doesn't print "roar" or "trumpet". When it returns a Lion or an Elephant, wouldn't the soundOff() method get printed too?
    refactored:
    import java.util.Scanner;
    interface Animal {
        void soundOff();
    class Elephant implements Animal {
        public void soundOff() {
            System.out.println("Trumpet");
    class Lion implements Animal {
        public void soundOff() {
            System.out.println("Roar");
    class TestAnimal {
        public static void main(String[] args) {
            Animal a = get();
        public static Animal get() {
            Scanner myScanner = new Scanner(System.in);
            System.out.println("Meat eater or not?");
            String choice = myScanner.nextLine();
            if (choice.equalsIgnoreCase("meat eater")) {
                return new Lion();
            } else {
                return new Elephant();
    }The soundOff() method should override the soundOff(); method in the interface, right? So I'm thinking, it should print either "roar" or "trumpet" but it doesn't. hmm..

  • How to run native system method?

    This method definition exists in ObjectInputStream.java:
    private static native Object allocateNewObject(Class aclass, Class initclass)
    throws InstantiationException, IllegalAccessException;
    I want to use this same method. I can compile with the above definition in my source with no problem. When I try to run it I get a dll missing error.
    I checked every occurance of loadLibrary in jdk1.3.1 source and found nothing that looks useful.
    How do I call this native system method as ObjectInputStream.java does?

    This is what you need to do:
    Create a policy file such as: (Note you can use different permissions that I have, but this was quick and dirty)
    grant codeBase "file:./bin/"
         permission java.security.AllPermission;
    Save file as "java.policy" (or some other name) in your current dir.
    Create a test class:
    import java.io.ObjectInputStream;
    import java.net.InetAddress;
    public class Test
    public static void main(String[] args)
    try
    Method m = ObjectInputStream.class.getDeclaredMethod("allocateNewObject", new Class[] {Class.class, Class.class});
    System.out.println(m);
    m.setAccessible(true);
    Object result = m.invoke(null, new Object[] {InetAddress.class, Object.class});
    System.out.println(result);
    catch (Throwable t)
    t.printStackTrace();
    Compile and run it:
    javac Test.java
    java -Djava.security.manager -Djava.security.policy=java.policy -classpath . Test
    The output is:
    private static native java.lang.Object java.io.ObjectInputStream.allocateNewObject(java.lang.Class,java.lang.Class) throws java.lang.InstantiationException,java.lang.IllegalAccessException
    0.0.0.0/0.0.0.0
    Any questions, e-mail me.
    Eric B. Martin
    [email protected]

  • OLE Object - Unknown Type

    We modified a customer's Crystal Report to contain an OLE Object (a linked PDF) and it was working fine and updating perfectly. Recently the customer was having problems using the report. Looking at the report, once it opens it tries to update the PDF but we get this error "Some links could not be updated because their sources are presently unavailable". With this message we get a links button and when we look at that the PDF is now an unknown type.
       Also now when we try to create a new report and insert an OLE Object like before, first off PDF is not in the Object Type list. and secondly it inserts it from a file as an icon if/if not the check box is checked.
       Does anyone know what could have changed for OLE PDFs not to work anymore for us? Any help would be greatly appreciated in this.

    Hi Scotty,
    Appears the DDE interpreter to handle PDF's has either been altered or AV software is blocking access now.
    What happens if they simply double click on any PDF file?
    Use ProcessMonitor to see what is happening, try running one of the reports and then look in the log for Access Denied errors.
    Don

  • All cmp-fields that double as cmr-fields must have an object type??

    Greetings,
    I'm deploying an application in weblogic 8.1sp2 that worked fine in
    jboss 3.2. The error is:
    Exception:weblogic.management.ApplicationException: prepare failed for
    ServiceEJB.jar Module: ServiceEJB.jar Error: Exception preparing module:
    EJBModule(ServiceEJB.jar,status=NEW) Unable to deploy EJB:
    ServiceEJB.jar from ServiceEJB.jar: [EJB:011017]Error while reading
    'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was: In relationship
    'primitive_TO_primitive_param', role
    'primitive_param_BELONGS_TO_primitive', a cmp-field used to implement
    this relationship has a primitive type. All cmp-fields that double as
    cmr-fields must have an object type. . at
    weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:255) at
    Does it means that I should cmp field from "int" type to "Integer"
    object??? If true, I really don't know why the requirement since in
    jboss worked just fine. But do you confirm it?
    regards,
    Pedro Salazar

    I believe there is a requirement that any field used as a primary or
    foreign key must be an object and implement hashCode/equals.
    I'd post in weblogic.developer.interest.ejb.cmp if you want more
    information.
    -- Rob
    Pedro Salazar wrote:
    Greetings,
    I'm deploying an application in weblogic 8.1sp2 that worked fine in
    jboss 3.2. The error is:
    Exception:weblogic.management.ApplicationException: prepare failed for
    ServiceEJB.jar Module: ServiceEJB.jar Error: Exception preparing module:
    EJBModule(ServiceEJB.jar,status=NEW) Unable to deploy EJB:
    ServiceEJB.jar from ServiceEJB.jar: [EJB:011017]Error while reading
    'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was: In relationship
    'primitive_TO_primitive_param', role
    'primitive_param_BELONGS_TO_primitive', a cmp-field used to implement
    this relationship has a primitive type. All cmp-fields that double as
    cmr-fields must have an object type. . at
    weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:255) at
    Does it means that I should cmp field from "int" type to "Integer"
    object??? If true, I really don't know why the requirement since in
    jboss worked just fine. But do you confirm it?
    regards,
    Pedro Salazar

  • My youngest erased all content and settings on my iphone 4s (prepaid) and now it says it is not activated.I still have my account and number,but it says phone number unknown now.How do i fix this?.

    My youngest erased all content and settings on my iphone 4s (prepaid) and now it says it is not activated.I still have my account and number,but it says phone number unknown now.How do i fix this?.

    If you haven't already tried, see if you can force it into recovery mode to restore it:
    http://support.apple.com/kb/ht1808.  If that doesn't work, the last thing you can try is to put it in DFU mode to restore it: https://discussions.apple.com/thread/2648467?threadID=2648467&tstart=0.

  • TS3230 I have lost my box to type in webpages and my goggle box on safari so can't search internet or go on websites unless i have recieved mail from them. How can I get this back?

    I have lost my box to type in webpages and my goggle box on safari. I can't use the internet unless I have had E-mail from the webpage. How can i get these boxes back?

    I have now found the answer on another feed and have rectified it thanks

  • While running my app I get the below error  - have different Class objects for the type javax/servlet/http/HttpServletRequest used in the signature

    I am running ATG[10.1.2] app on Jboss [EAP 5.1.0 GA] I am able to open dyn/admin however when I start my app I get the below error
    java.lang.LinkageError: loader constraint violation: when resolving method "atg.servlet.ServletUtil.setSessionConfNumCacheRequest(Ljavax/servlet/http/HttpServletRequest;)Ljavax/servlet/http/HttpServletRequest;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, atg/filter/dspjsp/PageFilter, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, atg/servlet/ServletUtil, have different Class objects for the type javax/servlet/http/HttpServletRequest used in the signature
      at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at atg.servlet.ForwardFilter.doFilter(ForwardFilter.java:263)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at atg.servlet.ErrorFilter.doFilter(ErrorFilter.java:279)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:446)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
      at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
      at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342)
      at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:286)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:680)
    11:22:47,413 ERROR [[localhost]] Exception Processing ErrorPage[errorCode=500, location=/global/errorPage500.jsp]

    The supported JBoss version for 10.1.2 is JBoss EAP 5.1.2 but I don't think that your issue is caused because of this. Your issue is more of an environmental thing as you are probably getting two different versions getting loaded of class javax.servlet.http.HttpServletRequest and so correspondingly two different Class objects as the error shows. One reason for this could be if you include any server-specific libraries (in present case the Servlet API JAR which contains the class javax.servlet.http.HttpServletRequest) of a different version in the /WEB-INF/lib of your web application. Try removing it from there if so and see if that helps.

  • Abap Dump in Solman - Create Data Unknown Type - CX_SY_Create_Data_Error

    Hi Gurus, I have installed Solution Manager EHP1 with Db2 database and windows operating system with all 64 bit. Solution manager have been successfully installed and configured and it's ready to use. But i'm getting an abap dump in the solution manager system. Approximately 30 abap dump a day which is the same error message. I've tried to find the error message in market place but couldnt find a solution. Can anyone help me to solve this problem. Thanks.
    Runtime Errors         CREATE_DATA_UNKNOWN_TYPE
    Exception              CX_SY_CREATE_DATA_ERROR
    Date and Time          15.04.2010 00:31:09
    Short text
         CREATE DATA: The specified type "/BI0/V0SDB_C02M2" is no valid data type.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "CL_SMD_AGGREGATE_MDX==========CP" had to be
          terminated because it has
         come across a statement that unfortunately cannot be executed.

    Hello Ram,
    Is your issue resolved.Currently i am getting the same issue ,After I have upgraded Solution Manager from EHP1SP20 to SP23.I am getting the Short Dumps.
    Runtime Errors         CREATE_DATA_UNKNOWN_TYPE                                                    
    Exception              CX_SY_CREATE_DATA_ERROR                                                     
    Date and Time          08/03/2010 00:30:41                                                                               
    Short text                                                                               
    CREATE DATA: The specified type "/BI0/V0SDB_C02M2" is no valid data type.                     
    What happened?                                                                               
    Error in the ABAP Application Program                                                                               
    The current ABAP program "CL_SMD_AGGREGATE_MDX==========CP" had to be                         
         terminated because it has                                                                    
        come across a statement that unfortunately cannot be executed.                                
    What can you do?                                                                               
    Note down which actions and inputs caused the error.                                                                               
    To process the problem further, contact you SAP system                                        
        administrator.                                                                               
    Using Transaction ST22 for ABAP Dump Analysis, you can look                                   
        at and manage termination messages, and you can also                                          
        keep them for a long time.                                                                    
    Error analysis                                                                               
    An exception occurred that is explained in detail below.                                      
        The exception, which is assigned to class 'CX_SY_CREATE_DATA_ERROR', was not                  
         caught in                                                                               
    procedure "INITIALIZE" "(METHOD)", nor was it propagated by a RAISING clause.                 
        Since the caller of the procedure could not have anticipated that the                         
        exception would occur, the current program is terminated.                                     
        The reason for the exception is:                                                              
        The dynamically specified type "/BI0/V0SDB_C02M2" at CREATE DATA is no valid                  
         data type.                                                                               
    The type is either unknown or an object type.                                                 
    How to correct the error                                                                               
    If the specified type "/BI0/V0SDB_C02M2" is an object type, then new objects of               
         this                                                                               
    type (instances) are not created with CREATE DATA, but with                                   
        CREATE OBJECT.                                                                               
    If the type is unknown, then it must be created in the program or in the                      
         ABAP dictionary.                                                                               
    Probably the only way to eliminate the error is to correct the program.    
    Thank you,
    khanth

  • ArrayStoreException in WLS 8.1SP3: Object and inner type of array differs

    Has anyone seen this? We seem to get them from time to time, am running WLS 8.1 SP3 on JRockit 1.4.2.03. Stack trace follows.
              cheers
              dim
              <BEA-000802> <ExecuteRequest failed
              java.lang.ArrayStoreException: Object and inner type of array differs.
              java.lang.ArrayStoreException: Object and inner type of array differs
              at weblogic.rjvm.BasicOutboundRequest.sendReceive()Lweblogic.rmi.spi.InboundResponse;(BasicOutboundRequest.java:108)
              at weblogic.rmi.internal.BasicRemoteRef.invoke(Ljava.rmi.Remote;Lweblogic.rmi.extensions.server.RuntimeMethodDescriptor;[Ljava.lang.Object;Ljava.lang.reflect.Method;)Ljava.lang.Object;(BasicRemoteRef.java:137)
              at weblogic.cluster.replication.ReplicationManager_813_WLStub.update(Lweblogic.cluster.replication.ROID;ILjava.io.Serializable;)V(Unknown Source)
              at weblogic.cluster.replication.ReplicationManager.updateSecondary(Lweblogic.cluster.replication.ROID;Ljava.io.Serializable;Ljava.lang.String;)Ljava.lang.Object;(ReplicationManager.java:811)
              at weblogic.servlet.internal.session.ReplicatedSessionData.syncSession()V(ReplicatedSessionData.java:490)
              at weblogic.servlet.internal.session.ReplicatedSessionContext.sync(Ljavax.servlet.http.HttpSession;)V(ReplicatedSessionContext.java:184)
              at weblogic.servlet.internal.ServletRequestImpl.syncSession()V(ServletRequestImpl.java:2471)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3679)
              at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2630)
              at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
              at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
              at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
              Caused by: java.lang.ArrayStoreException: Object and inner type of array differs
              at java.io.ObjectInputStream.readObject(Unknown Source)
              at java.util.HashMap.readObject(Unknown Source)
              at java.io.ObjectInputStream.readSerialData(Unknown Source)
              at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
              at java.io.ObjectInputStream.readObject0(Unknown Source)
              at java.io.ObjectInputStream.readSerialData(Unknown Source)
              at java.io.ObjectInputStream.readObject(Unknown Source)
              at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:120)
              at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:117)
              at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(Unknown Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
              at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
              at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
              ... 3 more

    You have to be careful how you define your complex elements, define complex elements outside of the root element or in a seperate file and reference them.
              While the following is syntactically correct, in weblogic you will result in the error you had previously
              <element>
              <complex type>
              </complex type>
              </element>
              Instead do
              <element type="ir:ComEx">
              <complex type name="ComEx"></complex type>
              outside of the root element
              Had this exact same problem today, this is how I fixed it

  • How can I invoke a method on a subclass based on the runtime type?

    Hi all,
    I have defined a base class OrderDetail, and 2 subclasses which extend it: OrderDetailSingleReservation and OrderDetailMonthReservation. Furthermore, I have a method:
        public Order order_generate(OrderDetail orderDetail) {
            if (orderDetail instanceof OrderDetailSingleReservation) {
                return order_generate((OrderDetailSingleReservation) orderDetail);
            }  else if (orderDetail instanceof OrderDetailMonthReservation) {
                return order_generate((OrderDetailMonthReservation) orderDetail);
            } else {
                Misc.alert("orderAndInvoice_Generate(GENERIC): unsupported type.");
                return null;
        }The type of this method's parameter is OrderDetail, as you can see. (This particular method only serves as a kind of dispatcher and is therefore not very interesting in itself, but the same pattern using 'instanceof' occurs in a codebase I am working on several times, and I would like to factor it out if possible.)
    My question: it seems that the invocation of order_generate() from within this method requires an explicit downcast to one of the two subclasses. If not, java invokes the method on the superclass. But at runtime, the JVM knows what type of object it is dealing with, right? So is there no way to do this without the explicit downcast?
    A similar problem occurs when trying to invoke a method on an object whose type is one of the subclasses; the method on superclass is called, instead of the one in the appropriate subclass that overrides it.
    Any help would be greatly appreciated!
    Thanks,
    Erik

    Thanks for your replies! I was editing my post last night to clarify it, but my connection went down and the edit was lost :(
    Anyway, yes, it should be done with polymorphism. I was constructing an example using the famous Animal, Cat and Dog classes to demonstrate my question more clearly, and to my surprise the problem does not occur in my example code.
    LRMK: Invoking a method such as in your example, where the method is inside the class itself, works fine. However for MVC's sake, I have a separate class called Invoicing with methods as below:
    class invoicing
      // the method for the superclass
      public Invoice invoice_create(OrderDetail orderDetail) {
         System.out.println("type: " + orderDetail.getClass());
         return null;
      // the method for one of the subclasses (this method is being not invoked)
      public Invoice invoice_create(OrderDetailSingleReservation orderDetail) {
         return null;
      // ...nor is this one.
      public Invoice invoice_create(OrderDetailMonthReservation od) {
         return null;
    }Now I attempt to invoke these methods:
    // create example objects
    OrderDetailSingleReservation odSingle = new OrderDetailSingleReservation();
    OrderDetailMonthReservation odMonth = new OrderDetailMonthReservation();
    // this call displays "odSingle type: OrderDetailSingleReservation"
    System.out.println("odSingle type: " + odSingle.getClass());
    // this call displays "odMonth type: OrderDetailMonthReservation"
    System.out.println("odMonth type: " + odMonth.getClass());
    // this call invokes Invoicing.invoice_create(OrderDetail)
    // instead of Invoicing.invoice_create(OrderDetailSingleReservation)
    Invoicing.invoice_create(odSingle);
    // this call invokes Invoicing.invoice_create(OrderDetail)
    // instead of Invoicing.invoice_create(OrderDetailMonthReservation)
    Invoicing.invoice_create(odMonth);So these calls will invoke the method for the superclass, i.e. Invoicing.invoice_create(OrderDetail od). That method then then executes the System.out.println() call which displays the class type of its parameter as one of { OrderDetailSingleReservation | OrderDetailMonthReservation }, that is, the expected subclass types!
    So the dynamic dispatch isn't working the way I would expect it to. If I do the explicit if-else checking using instanceof, as described in my first post, the correct methods are called.
    I hope the problem is somewhat clearer now. I am a bit lost as to what might be causing this, or how to monitor what's going on inside the jvm. Any ideas? BTW, the OrderDetail class and its subclasses are JPA entities (though I don't think it should matter).
    Thanks!
    Erik

  • Business objects and event type linkages...

    Hi Experts,
    Im a bit confused with business objects (swo1) and event type linkages(swetypv). Ive learned that business objects are used to trigger events and so how does event type linkages related to business object? Do I need to create business object or should I just search/look for the appropriate object needed?Please kindly explain to me the process or steps in using business object and event type linkages in related with idocs.

    Hi,
    Business objects neednot have to be created if your are fine with the standard method they have used in or the events yre available for you. If you need to cusomize it then you have to copy it to a subtype. Then do your modifications in it. Event type linkages are used to say which event is active for a Workflow. And if you want to trigger a Workflow based on certain conditions then you have to use either this or Start of Condition. The Error handling of workflow is also handled by Event Type Linkage. So whenvever you create a event linkage for a workflow you get an entry in Event Type Linkage.
    Hope this would have thrown some light on you.
    Thanks,
    Prashanth

  • Dependent objects for Message Type

    Hi,
    I have a message type which contains a lot of Data Types. It is a big structure. Now I have to see all Data Types used in this Message Type. How can I generate such a list?
    Thanks.

    Hi,
    To get the List, you have to create a new Namespace, copy that Message Type using [Copy Object and check With All Dependend Objects] to this new Name space. Under data type, you'll get all the data types , just select all of them and copy (ctrl+c) and paste in excel.
    Thanks.
    Ritu

Maybe you are looking for

  • Asking for your help to Connect 4 Servers Toghether!

    Hi. for more than 3 days i'm trying to build multi server's cast Based on the attached model. Everything I've tried have not helped me. can you kindly help me to build the right " vhost " file for each server as described in the attached model ??? I

  • Loop AE pre-comp indefinitely?

    Hi, Would I need to use Flash Pro (and how) if I have an after effect project with two pre-comp, one starting right after the other and I want to create a swf file that would play through both pre-comp then loop indefinitely on the second pre-comp, s

  • Can I use the airport extreme with a random router?

    Can I add an AirPort extreme to an existing network and have a laptop play iTunes music to a stereo? I'd like to not drop 200 bucks on a new router. Thanks for any help!

  • Batch Load Error Logs

    When using the UPSshell.exe to initiate a batch script via command line, one of the fields it lists is: "Log Directory – File path where you want the UPSShell.exe log file written." What exactly is written in this log? From what I can tell, it only c

  • Dropping iphone5 in water

    dropping iphone in water, unable to power on,what can i do??? How to fix it? How much will it take? I buy it in sydney....