Find the stack of calling classes

Hi all,
How can I find the stack of calling classes?
I cannot use getDeclaringclass because I cannot pass (this) in the new class...
any idea? urls or documentation?
thanks
andrew

You can do something like:
StackTraceElement stack[] = new Throwable().getStackTrace();

Similar Messages

  • How to find the number simultaneous call at a given moment on UCCX ?

    Hello,
    I would to know how to find the number simultaneous call at a given moment on UCCX ?
    it's on UCCX or UCCX RTMT, I don't know thanks a lot for your help.
    Aubert

    Hi Gergely,
    I should made a report on the number simultaneous call at a given moment on UCC on the server (all calls on the server)..

  • Where can I find the original code for class in Java API

    I am learning Java programming and wanted to see how professionals handel all cases. Can anyone tell me where I can find the original implementation code for classes in Java API? It would be a great help for me.

    the basic source is where you installed java in a file called java.src, its either in the main dir of one of the sub dirs ( mmm ), contains all the source code for all the classes in the api.

  • How to find the name of calling procedure or package?

    Hi all..
    Is it possible to find the name of the calling procedure or package?
    I mean..if proc_1 is calling proc_2 How can i find in proc_2 that proc_1 is calling?
    Proc_2 is being called from different procedures? I need to write to small code which needs to fire depends on the Proc it is calling?
    Please help me to solve this.
    Thanks

    Not sure, if this is what you're looking for
    SQL> create or replace procedure p0 as
      2  begin
      3    dbms_output.put_line(dbms_utility.format_call_stack);
      4  end;
      5  /
    Procedure created.
    SQL> create or replace procedure p1 as
      2  begin
      3    p0;
      4  end;
      5  /
    Procedure created.
    SQL> create or replace procedure p2 as
      2  begin
      3    p1;
      4  end;
      5  /
    Procedure created.
    SQL> set serveroutput on
    SQL> begin
      2    p2;
      3  end;
      4  /
    ----- PL/SQL Call Stack -----
      object      line  object
      handle    number  name
    3a7f2d618         3  procedure INV_ADM.P0
    39abfeef0         3  procedure INV_ADM.P1
    39c5ae7a0         3  procedure INV_ADM.P2
    3a0f3a538         2  anonymous block
    PL/SQL procedure successfully completed.
    SQL>

  • How to find the location of java class files at runtime?

    Does anyonw have an idea how to get the file name of a java class given the binary name?
    I mean how can I get the file name for my class myPackage.myClass?
    I am looking for a function which takes "myPackage.myClass" as input and returns
    "c:\\javaprojects\\myPackage\\myClass.class".
    I tried to do it with the LassLoader class but it did not work. Does anyone have an idea if the Java core API already has a function which does that?
    Thanks, Bernhard

    Hi ,
    It is a simple SAMPLE code , you think and build a logics to handle all classes.
    Try this sample, It doesn't handle the inner classes you put logic to handle the logics for inner classes.
    The inner class format is it contains the character $ in the File location but inside the code you put "." instedad of "$" you to find out or put trials.
    package pkg1;
    import java.io.* ;
    import java.util.* ;
    import java.util.zip.* ;
    public class ClsB {
         private static Vector clsPaths ;
         public static Vector getPaths() {
              if( clsPaths == null ) {
                   String paths = System.getProperty( "java.class.path" ) ;
                   // In linux or solarise use the following
                   // StringTokenizer st = new StringTokenizer( paths , ":\n" ) ;
                   StringTokenizer st = new StringTokenizer( paths , ";\n" ) ;
                   clsPaths = new Vector() ;
                   while( st.hasMoreTokens() ) {
                        String path = st.nextToken() ;
                        File f = new File( path ) ;
                        if( f.exists() ) {
                             try {
                                  f = f.getCanonicalFile() ;
                                  clsPaths.add( f ) ;
                             }catch( IOException ioe ) { }
              return clsPaths ;
         public static String findClassPath( String fullClassName ) {
              Vector v = getPaths() ;
              for( int i = 0 ; i < v.size() ; i++ ) {
                   File f = ( File ) v.get( i ) ;
                   String path = findIn( f , fullClassName ) ;
                   if( path != null )
                        return path ;
              return null ;
         static boolean isJar( File jar ) {
              if( jar.isDirectory() )
                   return false ;
              try {
                   ZipFile zf = new ZipFile( jar ) ;
                   return true ;
              } catch ( ZipException ze ) {
                   // It is not a jar file
                   // you handle this
              } catch ( IOException ioe ) {
                   ioe.printStackTrace() ;
              return false ;
         static String findIn( File dirOrJar , String clsName ) {
              if( isJar( dirOrJar ) ) {
                   // It is something different because the class inside the jar file
                   // Simply I return the jar file location and the entry name ,
                   // but you put action what you want
                   if( isInsideJar( dirOrJar , clsName ) ) {
                        // All archieve file using the path separator is '/'
                        return dirOrJar.getPath() + "!" + clsName.replace( '.' , '/' ) + ".class" ;
              } else {
                   File f = new File( dirOrJar , clsName.replace( '.' , File.separatorChar ) + ".class" ) ;
                   if( f.exists() ) {
                        return f.getPath() ;
              return null ;
         static boolean isInsideJar( File jar , String clsName ) {
              try {
                   ZipFile zf = new ZipFile( jar ) ;
                   // All archieve file using the path separator is '/'
                   ZipEntry ze = zf.getEntry( clsName.replace( '.' , '/' ) + ".class" );
                   return ( ze != null ) ;
              } catch ( ZipException ze ) {
                   ze.printStackTrace() ;
              } catch ( IOException ioe ) {
                   ioe.printStackTrace() ;
              return false ;
         public static void main(String[] args) {
              System.out.println( findClassPath( "pkg1.ClsB" ) );
              System.out.println( findClassPath( "pkg1.pkg2.ClsA" ) );
    }

  • Does any one know where to find the specificaction of IASRealm class?

    Hi:
    I am looking up information to customize the realm for Application Server 7. Where can I find the specification of the ISARealm. Is there javadoc format of the class documentation posted on sun's web site? Thanks. Have a nice day

    DrClap wrote:
    BigDaddyLoveHandles wrote:
    Don't get me started on piros versus v�r�s (http://en.wikipedia.org/wiki/Hungarian_language)This other Wikipedia page claims that v�r�s means "blood red":
    http://en.wikipedia.org/wiki/Voros_McCracken
    Would be nice if we had a Color.BLOOD_RED constant. And I tried to find out what was the difference between "rojo" and "colorado" but there didn't seem to be any consensus:
    http://forum.wordreference.com/showthread.php?t=118250
    I can never remember if the colour "pistachio" is supposed to be the green of the nut meat or the red they sometimes dye the shell...

  • How to find the user exits called at the time of posting the IDOC?

    Hi,
        Could anyone please how to find the user exits while posting a idoc?

    Hi,
    One way to ahive this is by, be ready with IDOC postiong,
    then go to ST05 transaction and activate the trace after checking Table Buffer Trace.
    Now post the IDOC then deactivate the trace.
    Now come back to ST05 and display trace and search for calls starts with EXIT_.
    Regards,
    Manoj Kumar P

  • How to find the location of controller class file on the server

    Hi OAF Experts,
    We have a extended controller in which we are making some changes. We have compiled the java file.
    Now we want to deploy the .class file on the server. When we search on the server where we need to deploy the class file, we find two to three paths. Is there a way from which we can decide which path is actually referred ?
    Is there a front end page available from where we will be gettng these details??
    Regards
    Samarth

    Hi,
    You can get the complete path from front end.
    On 'About this Page', there is a section for 'Business Components'. When you expand that, you can see all the controllers used with complete path.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to find the form that calls report

    Hi experts,
    After converting the fmb file into a text file, we need to search for something specifically to know whether that particular form is calling a report or not.
    Does anyone know the keyword that we look in the text file?

    Look for RUN_REPORT_OBJECT and/or RUN_PRODUCT.

  • Finding the number of connected components in a graph

    I don't know haow many people have seen this problem posted on c.d.o.m, but here is the essence
    given an equivalence relation, e.g.
    x y
    1 1
    2 2
    2 1
    1 2
    3 3
    find the number of equivalence classes. In this example equivalence classes are {1,2} and {3}.

    The idea: Label all the graph nodes with distinct primes. Find all simple paths in the graph weighted with product of nodes. Find the skyline of all maximal products. Count them.
    Implementation (swithced to boolean vectors instead of primes)
    create table input as (
    select 1 x, 2 y from dual
    union
    select 2, 3 from dual
    union
    select 2, 4 from dual
    union
    select 6, 7 from dual
    union
    select 8, 9 from dual);
    with TC as (
    select connect_by_root(x) x, y
    from (
    select x,y from input
    union
    select y,x from input
    ) connect by nocycle x = prior y
    ), weightedNodes as (
    select node, power(2,rownum-1) code
    from (select x node from input
    union select y node from input )
    select count(distinct code) from (
    select x,y,sum(code) code from (
    select distinct pre.x, pre.y mid, post.y from TC pre, TC post
    where pre.y=post.x
    ), weightedNodes
    where node = mid
    group by x,y
    drop table input;

  • How to find the sum of a column

    I need to find the sum of a column and use it in a different column. The following is the example.
    Column names: Feedback(Good, Avg, Poor), Count(no of good, no of avg, no of poor) and %age(Feedback/sum(feedback))
    I want to find the sum in Java class and also calculate the last column in java class.
    Please tell me some way to do it.

    oh.. ok ..thanks for letting me know.. i will formulate the question in a proper way:
    This is what my UI should look like:
    Rating Count Percent
    Excellent 2 20
    Good 6 60
    Poor 1 10
    Bad 1 10
    Now i have the following columns in the data base:
    Meaning and feedback_rating.
    So the following SQL Query:
    SELECT hrl.meaning rating,
    sum(decode(bcpi.feedback_rating, null, 0, 1)) counted
    from cmp_cwb_person_info bcpi ,
    hr_lookups hrl
    group by hrl.meaning
    will give me the result as
    rating counted
    Excellent 2
    Good 6
    Poor 1
    Bad 1
    Now I want a third column as percentage : Earlier we were doing this calculation in the sql query itself, so the query was like
    SELECT hrl.meaning rating,
    sum(decode(bcpi.feedback_rating, null, 0, 1)) counted,
    sum(decode(bcpi.feedback_rating, null, 0, 1))/(max (select count (*) from cmp_cwb_person_info bcpi ,
    hr_lookups hrl )) percent
    from cmp_cwb_person_info bcpi ,
    hr_lookups hrl
    group by hrl.meaning
    Hence the third column (percent) was calculated in the sql query itself.
    But now i feel that the performance of the query could be improved if we get the first two columns from the database and the calculate the third column programatically in the java code.
    So this is what I want to know. How can i do that?

  • Why i couldnt find the FM:IDOC_OUTPUT_DELVRY in RSNAST00 program?

    It was said that excute RSNAST00 to call the 'EDI_Processing' and 'ALE_processing'...Then corresponding FM will be invoked...
    But why i couldnt find the FM: IDOC_OUTPUT_DELVRY within the FORM EDI_processing????
    Where could find the statement like: CALL Function: IDOC_OUTPUT_DELVRY ??
    Thanks!!!

    Hi Hoo Laa,
    IDOC_OUTPUT_DELVRY  FM will interlink with Process code,when you create delivery ,automatically output type will trigger,let me say one example.
    You are sending the delivery from SAP R/3 to Middleware.
    You create delivery in VL01N Transaction,so output type ( LD00 Standard output type for Delivery ) will trigger.
    This output type will interlink with process code ,message type at Partner profile transaction ( WE20).
    Process code (WE42,WE41) contains FM ,this fm will create IDOC.
    When you maintain output type in SPRO Transaction,here you mention the medium,program name ..
    Program name is RSNAST00 -> this will call FM Internally.
    If you want to see exactly then you need to debug the rsnast00 ( I am not aware of this one internally).
    Thanks
    Seshu

  • HT204370 Hello everyone! I'm having difficulty finding the TV series " THE BORGIAS " !!!!

    Hello Folks!
    Is there anyone has a broader knowledge on how to find the TV series called "THE BORGIAS " ?
    I have been trying to look for it and so I can download the whole series but it seems unavailable yet in iTunes or is it not really available at all ? Thanks :) xxx
    Many thanks!

    The series is available in the US, so if you have a US iTunes account with you should see it in the US store
    Series 1
    Series 2
    Series 3
    It doesn't appear to be available here in the UK store, so you won't be able to buy it here in the UK

  • Find the right package

    Hello there.
    I run an office at Greece and I need to find the proper Skype package for me.
    Firstly, I need a Skype number (in Greek format - +*edited for privacy* so customers can call, I need a platform in order to have a voice welcome message and a forwarder in order when press 1 for example to forward the call to another phone number or Skype contact. Also, I need this: I want with this account or by creating accounts in the same subscription to give the functionality to 2-3 of my partners to make or receive calls at the same time from the same IP or different ip's. I don't know if I have to buy more phone numbers or not.
    I have found a subscription for unlimited landline calls for Greece at around 60 euros per year. Is all these functionality I need included in this package? If not, please suggest the proper package for me and also the annual cost
    Thank you in advance

    What's brute force about using java.util.Manifest?
    Steffen
    Stefan Baramov wrote:
    > Hello PDE Team:
    > I have tried to find the right API calls to modify the Export-Package
    > header of the MANIFEST.MF through the IModel API of the PDE. No luck
    > so far. The only thing I found was the
    > org.eclipse.pde.internal.core.ibundle.IBundle interface which happen
    > to be internal.
    > How can my plug-in modify the MANIFEST.MF and in particular
    > Export-Package through the nice IModel interface without using brute
    > force such as modifying the file itself .
    >
    > I would appreciate any hints or pointers.
    >
    > Thanks
    > Stefan

  • How to find the initializing class (ie the one whose main was called)

    I am wanting to find out, within a class instance, which class caused it to be initialized. ie the one whose main was called.
    NOTE
    I do not nessasarily mean the class which initialised it, but the class whose main was called, which started the ball rolling and somwhere along the line this class was initialized.
    I am normally a Swing man and my initial class has always been a Frame, and it is easy to find the Frame, within a subsequent Component, using
    Component component = this;
    while((component != null) && !(component instanceof java.awt.Frame))
    component = component.getParent();
    Frame myFrame = (Frame)component;
    I just can't see a way to do this for classes

    Another way that you might be able to do it is to throw an exception and catch it put the stack trace in a string so that you can search it for a <classname>.main for example below the class SnippetRunner47882's main was called.
    Example StackTrace:
    java.lang.NullPointerException: just a test
         at SnippetRunner47882.runSnippet(SnippetRunner47882.java:8)
         at SnippetRunner47882.main(SnippetRunner47882.java:18)
         at java.lang.reflect.Method.invoke(Native Method)
         at SnippetRunner.compileAndRun(SnippetRunner.java:120)
         at SnippetRunner.runSnippet(SnippetRunner.java:87)
         at SnippetRunner.actionPerformed(SnippetRunner.java:69)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Hope this helps

Maybe you are looking for

  • 2lis_11_VAITM not inserting all data in ODS

    Hello Gurus. I'm using extractor 2lis_11_VAITM, when I test the extractor in RSA3, it is bringing me all registers of table VBAP, but when I load this extractor into an ODS in BW, It is not inserting all registers into the cube, some "return orders"

  • Wish MSI would post this kind of info on this forum

    Nice to have a peek Inside MSI's Design Studio and Test Lab http://blog.laptopmag.com/msi-gaming-lab

  • Unable to export to excel

    Hello All, I am getting the following error when I tried to export to excel in portal.   We are in BI 7.0 SAP system data Component version - SAP EHP 1 for SAP NetWeaver 7.0 SAP_BW - 006 (Level) - SAPKW70106 (Highest support Package) I am able to see

  • Unable to upload files to server via Transmit (ftp client)

    Hi For some reason I am no longer able to upload files via Transmit to my website server. I have built several sites hosted on different servers and I cant access any of them, so it is obviously a problem at my end. The Message I get when I try to co

  • Push notification not working anymore on replaced phone

    Hi! I'm encountering a problem with Push Notification. My iPhone 4 (iOS 4.3.3) was replaced last friday by an Apple Store. I restored everything on it using the iTunes backup but Push Notificasion seem to be broken now: I don't receive anymore Facebo