Looking up invoking method name

Hi,
first the code:
class Test{
  test1(){
    OtherClass otherObject = new OtherClass();
    otherObject.method()
test2(){
    OtherClass otherObject = new OtherClass();
    otherObject.method()
}the question: is it possible for me to receive the name "test1" or "test2" of the Test class when the "method" method gets invoked?
like:
class OtherClass{
  method(){
    //if the method name is "test1" do this
   //else do that
}It´s not possible for me the provide parameters. Does the jre provide me such information somehow?
Thanks in advance for answers.

No. You could do something like:
Throwable t = new Throwable();
t.fillInStackTrace();
StackTraceElement[] stack = t.getStackTrace();
String invokingClass = stack.length < 2 ? null : stack[1].getClassName();
String invokingMethod = stack.length < 2 ? null : stack[1].getMethodName();- Saish

Similar Messages

  • Invoke a method by getting method name from properties object

    HI ,
    I am storing method names in a properties file . Can any one tell me , how can I invoke those methods ?? Please Urgent.
    Here is the sample program what I am trying to do . Please tell me how to invoke method which is represented by the String "methodTobeInvoked" in the below program.
    public class HelloWorld {
         private String name="meena";
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public static void main(String[] args) {
              try {
                   Properties props=new Properties();
                   props.setProperty("method", "getName()");
              String methodTobeInvoked= props.getProperty("method");
              }catch (Exception ioe) {
                   System.err.println(ioe.getMessage());
    Thanks!!!

    meenaalenoor wrote:
    I am storing method names in a properties file . Can any one tell me , how can I invoke those methods?
    Here is the sample program what I am trying to do.
    Please tell me how to invoke method which is represented by the String "methodTobeInvoked" in the below program.
    public class HelloWorld {
         private String name="meena";
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public static void main(String[] args) {
              try {
                   Properties props=new Properties();
                   props.setProperty("method", "getName()");
              String methodTobeInvoked= props.getProperty("method");
              }catch (Exception ioe) {
                   System.err.println(ioe.getMessage());
    }Have you looked at [java.lang.reflect|http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/package-summary.html] ?

  • Invoking methods by name

    Is it possible (and if so how) to invoke a method using a name stored in a variable?
    private void thisMethod(){
    is normally run by using the method name:
    thisMethod();
    or
    this.thisMethod();
    But if there are a number of methods (method1, method2, method3 say) and the choice of which method to use is derived from some source (in my case as a jsp request parameter), is there some way of saying "run the method whose name is stored in variable methodName"?
    The alternative is of course to use a lot of if ... else if statements, but there are situations where even that does not help very much.
    Clearly what I am asking for is some kind of late binding, which should not be too hard for any language which can implement run time polymorphism, but how?
    Good ideas and information welcome.
    David

    If you know the class then you can use reflection to do the job. You can get the methods names using instance.getClass().getDeclaredMethods(...);
    If the methods have the same interface but differ in implementation then you could create an interface, have a number of classes implement the interface, then scan the classpath for classes that implement the interface.
    there's probably more
    Dave

  • Error -50400 occurred at Invoke Method: FIFO.Read in Host.vi

    Hey there,
    we have sensors on an Engine which are connected to a NI cRIO 9014 board (with a NI9411 6-channel digital input modul) and go from there via network to a host computer.
    cRIO board: the cRIO board collects the data from the engine and stores it in a buffer, this is because the network is to slow for the magnitude of data
    host computer: the host computer reads over the network the buffer on the cRIO board, on the host computer it takes out specific portions of the data to create pressure graphs of the engine
    Error: 
    Error -50400 occurred at Invoke Method: FIFO.Read in Host.vi
    Possible reason(s):
    The transfer did not complete within the timeout period or within the specified number of retries.
    This error occurs in the following scenario:
    - engine is running
    - cRIO is running
    When I press the start button (boolean 3) in the host.VI to start the reading of the data from the board AFTER I pressed the run button of the host VI. 
    The Error would not occur if I pressed the start button (boolean 3) BEFORE I pressed the run button of the host VI.
    We tried to increase the time out, but it still did not work, the error occurs!
    We would be really happy if you could look over it and help us in this case! If you need further informations or if we need to clarify some specific portion, please let us know!
    We included the VI's in the attachement!
    Thanks in advance!
    Solved!
    Go to Solution.
    Attachments:
    Host.vi ‏152 KB
    C_RIO.vi ‏92 KB
    Cyl_Pres.lvproj ‏196 KB

    Chrisse,
    There are a few things wrong in your application, if I may offer some suggestions.
    First, your while loops are not running in parallel.  In fact, they are in while loops with a true constant wired to them. I am not sure if this is by design for debugging, or on accident.  I would put the Polling(read pulling zero elements) outside your main while loop.
    Your second nested while loop (the one polling the # of elements and then pulling them out) is going to run just once, and may pull only a few samples.  I don't think that is what you are looking for here, and there are a couple ways we can go here.  You could continuously poll until you have 0 elements available for x amount of time, then you know you have no more samples available and you can process all the data OR you can put all of your data processing as part of that loop and just always write to file immediately as x samples are pulled.
    Also, your main loop's stop condition is (i <= 3) Therefore, it will run once and then stop.  Maybe you mean >=3?
    Also, you have 'append to file' disabled on your write to spreadsheet, so everytime you write you are overwriting old data.  If you want to continuously write, you will be losing data.  This can be cured by either setting this to true(requiring a new file name or programatically deleting the old spreadsheet every time you run the vi) OR you can collect all of your data in a shift register, and only write to file once you have all your data available.
    The error you are seeing is because you try to close your FPGA reference twice.  You only need to close it once.
    After seeing your overall picture, I think this can all be cured by simply hardwiring your Read to get your 1440X4 elements, but as we have seen, this does not work.  Something is happening in your system....this is what I want you to do...run just the following code...and let me know how many elements remaining it gives you...Once the number has settled(I hope it does and your engine doesn't keep running), hit stop, and all the values will be put on a graph for you.  My broken wires are because I do not have the FPGA VI.
    Message Edited by Robbob on 04-21-2009 01:48 PM
    Rob K
    Measurements Mechanical Engineer (C-Series, USB X-Series)
    National Instruments
    CompactRIO Developers Guide
    CompactRIO Out of the Box Video
    Attachments:
    numelements.jpg ‏39 KB

  • Failed to invoke end componentFailed to invoke method error

    I am getting this error while invoking a web service in weblogic.
    What is root cause of this error...?
    Error Description:-
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="code">
    <code>Server
    </code>
    </part>
    -<part name="summary">
    <summary>Failed to invoke end componentFailed to invoke method
    </summary>
    </part>
    -<part name="detail">
    <detail>
    <detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>java.lang.NullPointerException
         at org.tcs.billingeai.ws.allocateBillCycle.AllocateBillCycle.allocateBillcycle(Unknown Source)
         at org.tcs.billingeai.ws.allocateBillCycle.BillCycleService.invokeAllocateBillCycle(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor496.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at weblogic.wsee.component.pojo.JavaClassComponent.invoke(JavaClassComponent.java:91)
         at weblogic.wsee.ws.dispatch.server.ComponentHandler.handleRequest(ComponentHandler.java:68)
         at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
         at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:84)
         at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:60)
         at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
         at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
         at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:124)
         at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    </detail>
    </detail>
    </part>
    </remoteFault>
    </fault
    Edited by: 911694 on Jun 25, 2012 1:02 PM

    This is a very convinient feature of Weblogic startup service - if your class
    does not implement T3StartupDef it will look for (using introspection)
    public static void main(String[] args) in your startup class, and, if it is
    there it will execute it.
    Ricky Wong <[email protected]> wrote:
    It works, many thanks !
    However I still have one more question out of my head - I found that my
    startup class doesn't need to implement the T3StartupDef and it still
    works, however my shutdown class must implement the T3ShutdownDef
    (otherwise I'll get ClassCastException).
    In article <[email protected]>, [email protected] says...
    Most likely the HubDevicePool does not have a public default constructor.
    Ricky Wong <[email protected]> wrote:
    In what situation I'll get the error "Failed to invoke startup/shutdown
    class" as below :
    java.lang.InstantiationException:
    dsb/eBanking/backOffice/connect/HubDevicePool
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Compiled Code)
    at weblogic.t3.srvr.StartupThread.runStartup
    (StartupThread.java:180)
    at weblogic.t3.srvr.StartupThread.doWork(Compiled Code)
    at weblogic.t3.srvr.PropertyExecuteThread.run
    (PropertyExecuteThread.java:62)
    I'm pretty sure that the class HubDevicePool has been coded (e.g.
    implement T3xxxDef interface, with either the startup() or shutdown()
    method) properly as I've another startup classes which work perfectly.
    The class has been compiled without error, but it just cannot run when I
    put it as either a startup or shutdown class for WebLogic.Dimitri
    Dimitri

  • Java.lang.NoSuchMethodException when invoke method dynamic

    hi!
    i have some trouble when i invoked hibernate PO class method dymaic by parameters, here is a piece of code, can someone help me? thanks in advance! please!
    String fieldname = field.getName().toLowerCase();
    String methodName = "get" + fieldname.replaceFirst(fieldname.substring(0, 1),fieldname.substring(0,1).toUpperCase());
    Method methodFinal;
         try {
         methodFinal = value.getClass().getDeclaredMethod(methodName, new Class[] {PaymentPO.class});
         return methodFinal.invoke(value, null);
         } catch (SecurityException e) {
              e.printStackTrace();
         } catch (NoSuchMethodException e) {
              e.printStackTrace();
         } catch (IllegalArgumentException e) {
              e.printStackTrace();
         } catch (IllegalAccessException e) {
              e.printStackTrace();
         } catch (InvocationTargetException e) {
              e.printStackTrace();
         }

    I don't know what your error is, but here are a few suggestions:
    * print out the method name.
    * print out the methods for the class on which you're trying to invoke the method
    * rather than trying to use this means of invoking a property getter, look into some of the javabeans introspection classes:
    http://java.sun.com/j2se/1.5.0/docs/api/java/beans/Introspector.html
    http://java.sun.com/j2se/1.5.0/docs/api/java/beans/BeanInfo.html
    http://java.sun.com/j2se/1.5.0/docs/api/java/beans/PropertyDescriptor.html

  • Mapping a jmethodid to its method name

    I'm on 1.4 and I'm using the JVMPI. I'm tracing the entry and exit of methods. I'm getting the method_id just fine but I'm looking for a way to turn that into the method name so that I can read which methods are being invoked.

    user582604 wrote:
    I am unable to follow what exactly it states.Join the club. The description is admittedly a bit complicated to follow, but it's unlikely that you're actually experiencing a problem related to this.
    It's just saying (as far as i can tell) either don't do a pk (primary key) update.... or (presumably) if you must do a pk update, do not also try at the same time to map the pk column to the result of some GG function (e.g., a sqlexec). When you have a replicat map "colmap(usedefaults, pk=sqlexec.result)", then the "where" clause constructed to perform the pk update on the target DB will use the new, updated ("after") value of the pk, and not the old, original ("before") value. Therefore the row won't be found on the target, since the pk has not actually been updated yet.
    (To paraphrase, the docs could have just said: "See this? Don't do that.")

  • How invoke methods in order within the class?

    I want to invoke all the methods of a class (except the constructor) in the order in which they appear within the class. I have been able to do this using the following code:
    Method [] methodArray = this.getClass().getDeclaredMethods();
    for (int i = 1; i < methodArray.length; i++)
    methodArray.invoke(this, null);
    However, according to the javadoc for class Class, getDeclaredMethod, the elements of the Method array "are not in any particular order." So although the elements of the array happened to be in the order I wanted them when I ran the code, it seems that I will not be able to consistently RELY on the Method array to be set up in this way.
    My question is, in view of what I see when I execute the code, is it possible that the javadoc is overly-cautious, and that the Method objects in fact WILL ALWAYS be placed in the array in the order in which they appear in the class, in spite of the javadoc disclaimer?
    Maybe there's a better way to do what I'm trying to do. The reason I want the methods to execute in this order is that each method is a test case for a component I am testing, and I want the test cases to run in the order coded, using the Method array, without having to embed a number within each method name so that the array can be sorted into the desired order. In addition, I don't want to have to add a new method call to my class whenever I add a test case to it. Is this asking too much?

    The reason the Javadocs are full of disclaimers like this is to highlight the fact that there is no specific contract for a certain behaviour. Because Java is cross-platform, results must be predictable, at all times. So if the spec doesn't require a certain order to be enforced, the docs highlight this. Maybe no implementation takes advantage of this, maybe some do, the fact is as you rightly pointed out, you can't rely on it. So it looks like you are back to hard-coding some state that will let you sort the method order.
    Of course, if you are just settingup a test rig to automagically test the code you write, you can take a chance and rely on your implementation on your machine. But don't tell anyone I told you this.

  • Method names and transactions

    I'm having several problems with transactions using WLS 6.0
              I believe I have isolated it to the name of the method.
              I have a Session bean method called removePerson() and another one called
              deletePerson()
              My descriptor is below:
              <container-transaction>
              <method>
              <ejb-name>PersonService</ejb-name>
              <method-intf>Remote</method-intf>
              <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
              When I invoke these methods I can see my transaction count increase when I
              invoke the deletePerson method
              However, when I invoke the removePerson method the transaction count does
              nothing. Both method do the nothing except
              immediately return.
              Am I missing something ???
              I have looked for some type of method name restrictions but I have not found
              any for the remote interface that would lead me to
              understand why this occurs.
              

    Thanks Rob,
              I added the parm and re-ran the test
              Here is the weblogic.log file
              "Rob Woollen" <[email protected]> wrote in message
              news:[email protected]...
              > Can you add -Dweblogic.ejb.deployer.debug to the server start-up and post
              the
              > debug messages here?
              >
              > -- Rob
              >
              > Ed Lorenz wrote:
              >
              > > I'm having several problems with transactions using WLS 6.0
              > > I believe I have isolated it to the name of the method.
              > > I have a Session bean method called removePerson() and another one
              called
              > > deletePerson()
              > > My descriptor is below:
              > > <container-transaction>
              > > <method>
              > > <ejb-name>PersonService</ejb-name>
              > > <method-intf>Remote</method-intf>
              > > <method-name>*</method-name>
              > > </method>
              > > <trans-attribute>Required</trans-attribute>
              > > </container-transaction>
              > >
              > > When I invoke these methods I can see my transaction count increase when
              I
              > > invoke the deletePerson method
              > > However, when I invoke the removePerson method the transaction count
              does
              > > nothing. Both method do the nothing except
              > > immediately return.
              > >
              > > Am I missing something ???
              > > I have looked for some type of method name restrictions but I have not
              found
              > > any for the remote interface that would lead me to
              > > understand why this occurs.
              >
              [weblogic.log]
              

  • How to look into a method?

    Hello all:
    I am wondering if there is a way to look into a method simply by its name? As we all know, we can get the detail description of most of the classes in JAVA by browsing online documentation:
    - API & Language Documentation
    - Java 2 Platform API Specification .
    On the page, there is a left frame listing class names in alphebetical order. By clicking on a particular class name, we can get the description of that class on right frame.
    It's very convenient.
    Therefore, I want to know if there is a way to get the description of methods in the same manner as classes. Is there a webpage which lists most of the methods in JAVA language and its descriptions? So that we can check the detail of a method without knowing which class it belongs to. I think it should be very useful. Because there are times we see a new method name and unfortunately we don't know which class it belongs to. Thus, it is a bit difficult to check the detail of that method because we don't know its class name.
    That is why I am looking for a way to check the detail of a method in the same manner as a class.

    Thanks to you all:
    Yes, I find the index and it works. However, I am just not smart enough to find that search link. Mwstein, can you point to me where can I find that search link? Thanks again for your replies.

  • JSR 172: error while invoking methods of same signature

    Hi
    I am facing a peculiar problem which is not making sense to me. This is what I have done:
    1. Written a simple web service that has two methods: sayHello and sayHellToMe. Both these methods have same signatures. They do not take in any parameter and return a string.
    2. Deployed this web service (document/literal) type on Axis 1.2
    3. Generated the stub classes from the wsdl file using Sun Wireless Toolkit's Stub Generator
    4. I have now written a MIDlet that uses this stub class to invoke both the methods one after the other.
    I enabled SOAPMonitor on Axis and saw the SOAP Request and SOAP Response messages. I observed the following:
    1. In the first method: sayHello - everything works fine (with a few tweaks in the Stub class)
    2. However, while invoking the second method sayHelloToMe, the SOAP Body tag in the SOAP Request does not contain any method name. I checked out the Stub class, the qnames and the types are all correct..
    I also realized that this behavior is seen only when I have methods with the same signature in the web service. Any idea why this might be happening? It seems like a very weird problem.
    Any help in this regard will be greatly appreciated.
    Thanks,
    Arati

    The 'numeric or value error' is one we have seen many times. The problem has been identified and fixed. Refer to this thread for more information.
    Issue with DB Adapter - ORABPEL-11811

  • JSR 172: error while invoking methods with the same signature

    Hi
    I am facing a peculiar problem which is not making sense to me. This is what I have done:
    1. Written a simple web service that has two methods: sayHello and sayHellToMe. Both these methods have same signatures. They do not take in any parameter and return a string.
    2. Deployed this web service (document/literal) type on Axis 1.2
    3. Generated the stub classes from the wsdl file using Sun Wireless Toolkit's Stub Generator
    4. I have now written a MIDlet that uses this stub class to invoke both the methods one after the other.
    I enabled SOAPMonitor on Axis and saw the SOAP Request and SOAP Response messages. I observed the following:
    1. In the first method: sayHello - everything works fine (with a few tweaks in the Stub class)
    2. However, while invoking the second method sayHelloToMe, the SOAP Body tag in the SOAP Request does not contain any method name. I checked out the Stub class, the qnames and the types are all correct..
    I also realized that this behavior is seen only when I have methods with the same signature in the web service. Any idea why this might be happening? It seems like a very weird problem.
    Any help in this regard will be greatly appreciated.
    Thanks,
    Arati

    Hi, I'm closing this thread and opening the same in another as the content got pasted in reader un friendly format and i'm unable to change the format.
    Thanks,
    Ravi.

  • RFC - Java Proxy (Synchronous) invoking method

    Hi,
    I have problems to call my inbound java proxy.
    My scenario consist of send RFC -> Java Proxy (Synchronous)
    Proxy this registered
    http://hcp095.intra.csc.es:50100/ProxyServer/register?ns=http://csc.es/xi/rca&interface=Z_RCA_SCS&bean=ZRCASCS_PortTypeBean&method=zRCASCS
    ejb-jar.xml:
    <ejb-jar>
        <description>EJB JAR description</description>
        <display-name>EJB JAR</display-name>
        <enterprise-beans>
            <session>
                <ejb-name>ZRCASCS_PortTypeBean</ejb-name>
                <home>com.sap.aii.proxy.xiruntime.core.AbstractProxyInboundHome4</home>
                <remote>com.sap.aii.proxy.xiruntime.core.AbstractProxyInboundRemote4</remote>
                <local-home>com.sap.aii.proxy.xiruntime.core.AbstractProxyInboundLocalHome4</local-home>
                <local>com.sap.aii.proxy.xiruntime.core.AbstractProxyInboundLocal4</local>
                <ejb-class>es.csc.xi.rca.ZRCASCS_PortTypeBean</ejb-class>
                <session-type>Stateless</session-type>
                <transaction-type>Container</transaction-type>
            </session>
        </enterprise-beans>
    </ejb-jar>
    Class Impl:
    package es.csc.xi.rca;
    public class ZRCASCS_PortTypeImpl extends AbstractProxy implements ZRCASCS_PortType {
    public ZRCASCSResponse_Type zRCASCS(ZRCASCS_Type parameters) throws ZRCASCSException_Message_Exception, SystemFaultException,  ApplicationFaultException{
            //throw new RuntimeException();
            Rca_ws a = new Rca_ws();
            return a.zRCASCS(parameters);
    Error: XI_Monitor 
    <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error invoking method zRCASCS of proxy bean $Proxy305: cannot assign instance of com.sap.guid.GUID to field com.sap.aii.proxy.xiruntime.core.MessageSpecifierImpl.guid of type com.sap.guid.IGUID in instance of com.sap.aii.proxy.xiruntime.core.MessageSpecifierImpl: com.sap.aii.proxy.xiruntime.core.XmlInboundException: Error invoking method zRCASCS of proxy bean $Proxy305: cannot assign instance of com.sap.guid.GUID to field com.sap.aii.proxy.xiruntime.core.MessageSpecifierImpl.guid of type com.sap.guid.IGUID in instance of com.sap.aii.proxy.xiruntime.core.MessageSpecifierImpl</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
    Error: defaultTrace
    #hcp095.intra.csc_XID_19271950#ANGUZMAN#ec20b7f019f611de98340011259e6830#
    SAPEngine_Application_Thread[impl:3]_36##0#0#Error##Plain##
    #com.sap.aii.proxy.xiruntime.core.XmlProxyException: Error invoking method zRCASCS of proxy bean $Proxy366:
    cannot assign instance of com.sap.guid.GUID to field com.sap.aii.proxy.xiruntime.core.MessageSpecifierImpl.guid
    of type com.sap.guid.IGUID in instance of com.sap.aii.proxy.xiruntime.core.MessageSpecifierImpl
         at com.sap.aii.proxy.xiruntime.core.XmlProxyJ2EE.call(XmlProxyJ2EE.java:192)
         at com.sap.aii.proxy.xiruntime.core.XmlProxy$ProxyBeanCaller.call(XmlProxy.java:225)
         at com.sap.aii.proxy.xiruntime.core.XmlProxy.processRequest(XmlProxy.java:194)
         at com.sap.aii.proxy.xiruntime.core.XmlInbound.processRequestMessage(XmlInbound.java:126)
         at com.sap.aii.proxy.xiruntime.core.XmlInbound.processMessage(XmlInbound.java:83)
         at com.sap.aii.proxy.xiruntime.sbeans.JPRBean.onMessage(JPRBean.java:158)
         at com.sap.aii.proxy.xiruntime.sbeans.JPRLocalLocalObjectImpl0_0.onMessage(JPRLocalLocalObjectImpl0_0.java:175)
         at com.sap.aii.af.ra.ms.impl.ServicesImpl.deliver(ServicesImpl.java:276)
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onDeliver(XIEventHandler.java:1049)
         at com.sap.aii.af.ra.ms.impl.core.queue.RequestConsumer.onMessage(RequestConsumer.java:119)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:850)
         at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:180)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    If somebody can help me.
    Thank you very much

    Solved!!!
    to assign library references to the project application-j2eeengine.xml
    com.sap.aii.proxy.xiruntime
    com.sap.aii.messaging.runtime
    com.sap.xi.util.misc
    com.sap.guid

  • Junit : How can I get the method name (say testMyAddress) that failed

    My code is below
              TestSuite masterSuite = new TestSuite(testClass);
              TestResult result = new TestResult();
              masterSuite.run(result);
                   Enumeration errors = result.errors();
                   while (errors.hasMoreElements())
                        TestFailure error = (TestFailure)errors.nextElement();
                        Test test = error.failedTest();
    /*will give me the class name but how can I get the method that threw the exception.
    I can get fName (that contains the method name) field to get the method,but being private I cannot hold of the field.
    Wondering if there is any easy way to get the method name that threw exception,without writing unneccessary code
                        Class c1 = test.getClass();
    thx
    m

    getting all methods is no good!
    My test class looks like this
    MyTestClass{
    testGoodData(){
    asserttrue(.....);
    testBadData(){
    asserttrue(.....);
    testNullData(){
    asserttrue(.....);
    someHelperMethod(){
    thx
    m

  • Dynamically invoke methods of abstract class?

    Hi,
    I am using reflection to write a class (ClassA) to dynamically invoke methods of classes. I have an abstract class (ClassB) that has some of the methods already implemented, and some of the methods that are declared abstract. Is there any way that I can:
    (a) invoke the methods that are already implemented in ClassB;
    (b) I have another class (ClassC) that extends ClassB, some of the methods are declared in both classes. Can I dynamically invoke these methods from ClassB?
    Thanks in advance,
    Matt.

    Ok, the program is quite long, as it does other things as well, so I'll just put in the relevant bits.
    What I have is a JTree that displays classes selected by the user from a JFileChooser, and their methods.
    // I declare a variable called executeMethod
    private static Method executeMethod;
    // objectClass is a class that has been chosen by the user.  I create a new instance of this class to execute the methods.
    Object createdObject = objectClass.newInstance();
    // methodName is the method selected by the user.  objectClassMethods is an array containing all the methods in the chosen class.
    executeMethod = objectClassMethods[j].getDeclaringClass().getMethod(methodName, null);
    Object executeObject = executeMethod.invoke(createdObject, new Object[]{});Ok, here are the test classes:
    public abstract class ClassB{
         private int age;
         private String name;
         public ClassB(){ age = 1; name="Me";}
         public int getAge(){ return age; }
         public String getName(){ return name; }
         public void PrintAge(){System.out.println(age);}
         public void PrintName(){System.out.println(name);}
         public abstract void PrintGreeting();
    public class ClassC extends ClassB{
         public ClassC(){super();}
         public void PrintAge(){
              System.out.println("I am " + getAge() + " years old.");
         public void PrintGreeting(){
           System.out.println("Hello");
    }Now, I can print out the PrintAge method from ClassC (i.e. have it output "Hello" to the command line, how can I, say, get it to output the result of PrintName from ClassB, this method does not appear in ClassC. As you can see at the top, I can create a new instance of a normal method (in this case, ClassC), and have it output to the command line, but I know that I can't create a new instance of an abstract class. And since PrintName is implemented in abstract class ClassB, how do I get it to output to the command line?
    Thanks,
    Matt.

Maybe you are looking for

  • Creating PDFs at run-time

    I am developing an AIR app for Windows desktop and iOS. The app needs to be able to create PDFs from information inputted by the user, and then save the PDF to the device. Ideally, I need to do this 100% client-side, and not rely on a server to creat

  • My Podcasts are not in the iTunes Directory

    I have submitted 4 podcats to iTunes several weeks ago. I recieved email confirming that they had been accepted. When I look for them on the iTunes Directory under the category I submitted them to, they are not anywhere including Browse All... when I

  • While Launching Weblogic 12c installation GUI i am getting the below shared library exception. How i need fix it

    Error Message -> /u2/apps/ramesh/jdk1.7.0_67/bin/java -jar wls_121200.jar Extracting files....... Java HotSpot(TM) Server VM warning: You have loaded library /tmp/orcl7509581188263332744.tmp/Disk1/install/linux/libjni.so which might have disabled sta

  • HREAP VLAN ID CHanges

    Hello, I have noticed on a few different occasions that the VLAN ID under VLAN mappings on our APs is changing for some reason when an AP loses connectivity to its primary controller and then reassociates. For instance, at one particular site we have

  • Update Multiple DataAdapters with one Sql Transaction

    hello, am trying to implement a save routine , common scenario master detail data . However after the first save succeed the second time the save fails with the common message. Concurrency Violation The Update affect....   I have the following functi