Getting references of a methods
Hi experts,
I am trying to create a cross-refernce tool using Java for our project.
I need to get the list of all the references of the method,class throughout the application.
Is it possible to do so?
If so how can i achieve it?
Waiting for a reply,
swarna.
You can write a custom doclet and use the javadoc tool. Search the web for javadoc custom doclet, there were some pretty good articles on the matter iirc.
Similar Messages
-
How to get caller object reference from a method
Hi,
I am working a already existing Java Swing project, now I got a problem, in a method I need to get the caller object reference otherwise, I can't succeed this operation. So please tell me a way how to get the caller object reference from a method. that method would be static or regular method anything will do for me.
Edited by: navaneeth.j on Jan 29, 2010 11:20 PMnavaneeth.j wrote:
Actually my doubt is, I have a method "addition" method, which is using by many classes so my requirement is in the addition method I want to write a code snippet which will identify and get the the caller object. Actually I tried Reflection.getcallerclass but there I am getting "CLASS" object not the actual object reference, but I want object reference.
Actually we have a huge project which is writen plain JAVA, so in this project the authors written the Database connection package for single database transaction. so now we are using this project source code for JSF application in this web application the DB package has serve based on the dynamic db connection parameters, so if we want to change this package fully means need to solve the dependency problem in hundreds of classes, so my point is if I can access the caller object in the DB package when ever it gets called by any class from any where of the project. So actually I liked Reflection.getcallerclass, the way of implementation perfectly works for me but it is not giving caller object reference, if something gives the caller object then I can get the DB connection parameters then there is no need to pass the parameters in the hierarchy.You can add a parameter (of type Object) to your addition() method
and everywhere you call the addition() method also pass this (which from the POW of the addition() method will be a reference to the calling class instance).
There may be alternative solutions
but none that require less effort. -
Error in getting reference to a context node.
Hi,
I am getting NULL Object reference error while try to get reference to a context node of a window.
Here is Error message. Please give some suggestions.
The following error text was processed in the system NSP : Access via 'NULL' object reference not possible.
The error occurred on the application server Sundar_NSP_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: HANDLEDEFAULT of program /1BCWDY/0NMKGBOSP2TIV65B1I11==CP
Method: HANDLEDEFAULT of program /1BCWDY/0NMKGBOSP2TIV65B1I11==CP
Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/0NMKGBOSP2TIV65B1I11==CP
Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_IF_VIEW=====CP
Method: DISPLAY_TOPLEVEL_COMPONENT of program CL_WDR_CLIENT_COMPONENT=======CP
Method: INIT of program CL_WDR_CLIENT_APPLICATION=====CP
Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
Cheers,
SamHii.. Here is the short dump.
Runtime Errors OBJECTS_OBJREF_NOT_ASSIGNED_NO
Exception CX_SY_REF_IS_INITIAL
Date and Time 07.04.2007 16:43:21
Short text
Access via 'NULL' object reference not possible.
What happened?
Error in the ABAP Application Program
The current ABAP program "/1BCWDY/0NMKGBOSP2TIV65B1I11==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_REF_IS_INITIAL', was not
caught in
procedure "HANDLEDEFAULT" "(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:
You attempted to use a 'NULL' object reference (points to 'nothing')
access a component.
An object reference must point to an object (an instance of a class)
before it can be used to access components.
Either the reference was never set or it was set to 'NULL' using the
CLEAR statement.
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"OBJECTS_OBJREF_NOT_ASSIGNED_NO" "CX_SY_REF_IS_INITIAL"
"/1BCWDY/0NMKGBOSP2TIV65B1I11==CP" or "/1BCWDY/B_0NMLUIVDHGPOBAS29YIF"
"HANDLEDEFAULT"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
The exception must either be prevented, caught within proedure
"HANDLEDEFAULT" "(METHOD)", or its possible occurrence must be declared in the
RAISING clause of the procedure.
To prevent the exception, note the following:
System environment
SAP-Release 700
Application server... "Sundar"
Network address...... "10.10.0.10"
Operating system..... "Windows NT"
Release.............. "5.1"
Hardware type........ "2x Intel 80686"
Character length.... 8 Bits
Pointer length....... 32 Bits
Work process number.. 0
Shortdump setting.... "full"
Database server... "SUNDAR"
Database type..... "ADABAS D"
Database name..... "NSP"
Database user ID.. "SAPNSP"
Char.set.... "English_United State"
SAP kernel....... 700
created (date)... "Jan 29 2007 00:33:09"
create on........ "NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10"
Database version. "SQLDBC 7.6.0.036 CL 140088 "
Patch level. 95
Patch text.. " "
Database............. "MaxDB 7.6, MaxDB 7.7"
SAP database version. 700
Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2"
Memory consumption
Roll.... 8112
EM...... 3135888
Heap.... 0
Page.... 0
MM Used. 2645808
MM Free. 488520
User and Transaction
Client.............. 000
User................ "BCUSER"
Language Key........ "E"
Transaction......... " "
Program............. "/1BCWDY/0NMKGBOSP2TIV65B1I11==CP"
Screen.............. "SAPMHTTP 0010"
Screen Line......... 2
Information on Caller ofr "HTTP" Connection:
Plug-in Type.......... "HTTP"
Caller IP............. "127.0.0.1"
Caller Port........... 8000
Universal Resource Id. "/sap/bc/webdynpro/sap/zexp_parameter_app/"
Information on where terminated
Termination occurred in the ABAP program "/1BCWDY/0NMKGBOSP2TIV65B1I11==CP" -
in "HANDLEDEFAULT".
The main program was "SAPMHTTP ".
In the source code you have the termination point in line 309
of the (Include) program "/1BCWDY/B_0NMLUIVDHGPOBAS29YIF".
Termination occurred in a Web Dynpro application
Web Dynpro Component ZEXP_PARAMETER_APP
Web Dynpro Controller ZEXP_PARAMETER_APP
The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
procedure "HANDLEDEFAULT" "(METHOD)", but it was neither handled locally nor
declared
in the RAISING clause of its signature.
The procedure is in program "/1BCWDY/0NMKGBOSP2TIV65B1I11==CP "; its source
code begins in line
301 of the (Include program "/1BCWDY/B_0NMLUIVDHGPOBAS29YIF ".
Source Code Extract
Line
SourceCde
279
endmethod.
280
281
282
general methods
283
284
285
method WDDOEXIT . "#EC NEEDED
286
endmethod.
287
288
method WDDOINIT . "#EC NEEDED
289
endmethod.
290
291
method WDDOONCLOSE . "#EC NEEDED
292
endmethod.
293
294
method WDDOONOPEN . "#EC NEEDED
295
endmethod.
296
297
298
event handlers
299
300
301
METHOD handledefault .
302
DATA lr_node TYPE REF TO if_wd_context_node.
303
DATA ls_content TYPE if_zexp_parameter_app=>element_content.
304
305
Assign Parameter values
306
ls_content-first_name = first_name.
307
ls_content-last_name = last_name.
308
Get reference to context node 'CONTEXT'
>>>>>
lr_node->get_child_node( 'CONTENT' ).
310
Bind element
311
lr_node->bind_element( new_item = ls_content ).
312
313
ENDMETHOD.
314
315
endclass.
316
Contents of system fields
Name
Val.
SY-SUBRC
0
SY-INDEX
1
SY-TABIX
0
SY-DBCNT
2
SY-FDPOS
21
SY-LSIND
0
SY-PAGNO
0
SY-LINNO
1
SY-COLNO
1
SY-PFKEY
SY-UCOMM
SY-TITLE
HTTP Control
SY-MSGTY
SY-MSGID
SY-MSGNO
000
SY-MSGV1
SY-MSGV2
SY-MSGV3
SY-MSGV4
SY-MODNO
0
SY-DATUM
20070407
SY-UZEIT
164321
SY-XPROG
SSO2GETPARAM
SY-XFORM
GET_PARAMETER
Active Calls/Events
No. Ty. Program Include Line
Name
11 METHOD /1BCWDY/0NMKGBOSP2TIV65B1I11==CP /1BCWDY/B_0NMLUIVDHGPOBAS29YIF 309
CL_ZEXP_PARAMETER_APP_CTR=>HANDLEDEFAULT
Web Dynpro Component ZEXP_PARAMETER_APP
Web Dynpro Controller ZEXP_PARAMETER_APP
10 METHOD /1BCWDY/0NMKGBOSP2TIV65B1I11==CP /1BCWDY/B_0NMLUIVDHGPOBAS29YIF 246
CLF_ZEXP_PARAMETER_APP_CTR=>HANDLEDEFAULT
Web Dynpro Component ZEXP_PARAMETER_APP
Web Dynpro Controller ZEXP_PARAMETER_APP
9 METHOD /1BCWDY/0NMKGBOSP2TIV65B1I11==CP /1BCWDY/B_0NMLUIVDHGPOBAS29YIF 193
CLF_ZEXP_PARAMETER_APP_CTR=>IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER
Web Dynpro Component ZEXP_PARAMETER_APP
Web Dynpro Controller ZEXP_PARAMETER_APP
8 METHOD CL_WDR_DELEGATING_IF_VIEW=====CP CL_WDR_DELEGATING_IF_VIEW=====CM006 3
CL_WDR_DELEGATING_IF_VIEW=>INVOKE_EVENTHANDLER
7 METHOD CL_WDR_CLIENT_COMPONENT=======CP CL_WDR_CLIENT_COMPONENT=======CM004 56
CL_WDR_CLIENT_COMPONENT=>DISPLAY_TOPLEVEL_COMPONENT
6 METHOD CL_WDR_CLIENT_APPLICATION=====CP CL_WDR_CLIENT_APPLICATION=====CM00L 30
CL_WDR_CLIENT_APPLICATION=>INIT
5 METHOD CL_WDR_MAIN_TASK==============CP CL_WDR_MAIN_TASK==============CM00I 40
CL_WDR_MAIN_TASK=>EXECUTE
4 METHOD CL_WDR_MAIN_TASK==============CP CL_WDR_MAIN_TASK==============CM00J 69
CL_WDR_MAIN_TASK=>IF_HTTP_EXTENSION~HANDLE_REQUEST
3 METHOD CL_HTTP_SERVER================CP CL_HTTP_SERVER================CM00I 524
CL_HTTP_SERVER=>EXECUTE_REQUEST
2 FUNCTION SAPLHTTP_RUNTIME LHTTP_RUNTIMEU02 929
HTTP_DISPATCH_REQUEST
1 MODULE (PBO) SAPMHTTP SAPMHTTP 13
%_HTTP_START
Chosen variables
Name
Val.
No. 11 Ty. METHOD
Name CL_ZEXP_PARAMETER_APP_CTR=>HANDLEDEFAULT
FIRST_NAME
first_name
6677756666
69234FE1D5
LAST_NAME
last_name
667756666
C134FE1D5
WDEVENT
|
| 0000F000 |
| F0000000 |
| SYST-REPID |
| /1BCWDY/0NMKGBOSP2TIV65B1I11==CP |
| 2344545234444445535453343433334522222222 |
| F123749F0EDB72F3024966521911DD3000000000 |
| LS_CONTENT-FIRST_NAME |
| first_name |
| 6677756666 |
| 69234FE1D5 |
| LS_CONTENT-LAST_NAME |
| last_name |
| 667756666 |
| C134FE1D5 |
| %_DUMMY$$ |
| |
| 2222 |
| 0000 |
| %_SPACE |
| |
| 2 |
| 0 |
| LS_CONTENT |
| ë#######ê####### |
| E0000100E0000100 |
| B0004300A0005300 |
| No. 10 Ty. METHOD |
| Name CLF_ZEXP_PARAMETER_APP_CTR=>HANDLEDEFAULT |
| EVENT |
|
0000F000
F0000000
RESULT
|
| F0000000 |
| F0000000 |
| EVENT->PARAMETERS |
| Table IT_628[3x16] |
| DATA=PARAMETERS
Table reference: 361
TABH+ 0(20) = 38CAA53BD87CAE3B000000006901000074020000
TABH+ 20(20) = 0300000010000000FFFFFFFF04520100A0030000
TABH+ 40( 8) = 10000000A4288401
store = 0x38CAA53B
ext1 = 0xD87CAE3B
shmId = 0 (0x00000000)
id = 361 (0x69010000)
label = 628 (0x74020000)
fill = 3 (0x03000000)
leng = 16 (0x10000000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000006
occu = 16 (0x10000000)
access = 4 (ItAccessHashed)
idxKind = 0 (ItIndexNone)
uniKind = 1 (ItUnique)
keyKind = 1 (default)
cmpMode = 4 (cmpSingleEq)
occu0 = 1
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 1
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
isCtfyAble = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x28C9A53B
pgHook = 0x00000000
idxPtr = 0x78CAA53B
shmTabhSet = 0x00000000
id = 212 (0xD4000000)
refCount = 1 (0x01000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 16 (0x10000000)
lineAlloc = 16 (0x10000000)
shmVersId = 0 (0x00000000)
shmRefCount = 2 (0x02000000)
>>>>> 1st level extension part <<<<<
regHook = 0xA87BAE3B
collHook = 0x00000000
ext2 = 0x00000000
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
<CUR_PARAM>
+###Ô ##ß#######
2000D000D0001000
B0004900F0000000
SY-SUBRC
0
0000
0000
%_VIASELSCR
0
4
SY
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.
0000000000000000000000000000000000000000000010000000000000000000000000000000100000000000000000
1000000000003000000000000000000000000000200050001000000010000000000000000000000000000000000000
%_EXCP
|
| F0000000 |
| F0000000 |
| SPACE |
| |
| 2 |
| 0 |
| SY-REPID |
| /1BCWDY/0NMKGBOSP2TIV65B1I11==CP |
| 2344545234444445535453343433334522222222 |
| F123749F0EDB72F3024966521911DD3000000000 |
| <CUR_PARAM>-VALUE |
| 0.0.0.0.0.0.0.1. |
| D0001000 |
| F0000000 |
| LAST_NAME |
| last_name |
| 667756666 |
| C134FE1D5 |
| ME->F_APPL_CLASS |
|
A0005000
E0001000
FIRST_NAME
first_name
6677756666
69234FE1D5
WDEVENT
|
| 0000F000 |
| F0000000 |
| No. 9 Ty. METHOD |
| Name CLF_ZEXP_PARAMETER_APP_CTR=>IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER |
| HANDLER_NAME |
| HANDLEDEFAULT |
| 4444444444545 |
| 81E4C545615C4 |
| EVENT |
|
0000F000
F0000000
PARAMETERS
Table[initial]
RESULT
|
| F0000000 |
| F0000000 |
| WDEVENT |
|
0000F000
F0000000
ABAP_TRUE
X
5
8
ME->F_SYS64738
2
0
%_PRINT
000 0 ##
2222333222222222222222222222222222222222222222222222222222222222222222222222222222222222223200
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%_EXCP
|
| F0000000 |
| F0000000 |
| CX_WD_BAD_STATE=>USAGE_AFTER_DO_EXIT |
| 9E034D3F19DCAB3FE10000000A1550A8 |
| 34333434334444344333333334333343 |
| 95034436194312365100000001155018 |
| ME |
|
B0004000
5000A000
No. 8 Ty. METHOD
Name CL_WDR_DELEGATING_IF_VIEW=>INVOKE_EVENTHANDLER
NAME
HANDLEDEFAULT
4444444444545
81E4C545615C4
EVENT
0000F000
F0000000
RET
|
| F0000000 |
| F0000000 |
| SYST-REPID |
| CL_WDR_DELEGATING_IF_VIEW=====CP |
| 4455455444444544454455445333334522222222 |
| 3CF742F45C57149E7F96F6957DDDDD3000000000 |
| SY-REPID |
| CL_WDR_DELEGATING_IF_VIEW=====CP |
| 4455455444444544454455445333334522222222 |
| 3CF742F45C57149E7F96F6957DDDDD3000000000 |
| %_SPACE |
| |
| 2 |
| 0 |
| %_DUMMY$$ |
| |
| 2222 |
| 0000 |
| No. 7 Ty. METHOD |
| Name CL_WDR_CLIENT_COMPONENT=>DISPLAY_TOPLEVEL_COMPONENT |
| WINDOW_ID |
| $$ROOT_VIEW_AREA |
| 2254455544554544 |
| 442FF4F6957F1251 |
| PARAMETERS |
| Table IT_264[3x16] |
| CLASS=CL_WDR_CLIENT_APPLICATIONMETHOD=INITDATA=PARAMETERS |
| Table reference: 172 |
| TABH+ 0(20) = 38CAA53B0000000000000000AC00000008010000 |
| TABH+ 20(20) = 0300000010000000FFFFFFFF04AE0000F8090000 |
| TABH+ 40( 8) = 10000000A4288401 |
| store = 0x38CAA53B |
| ext1 = 0x00000000 |
| shmId = 0 (0x00000000) |
| id = 172 (0xAC000000) |
| label = 264 (0x08010000) |
| fill = 3 (0x03000000) |
| leng = 16 (0x10000000) |
| loop = -1 (0xFFFFFFFF) |
| xtyp = TYPE#000035 |
| occu = 16 (0x10000000) |
| access = 4 (ItAccessHashed) |
| idxKind = 0 (ItIndexNone) |
| uniKind = 1 (ItUnique) |
| keyKind = 1 (default) |
| cmpMode = 4 (cmpSingleEq) |
| occu0 = 1 |
| groupCntl = 0 |
| rfc = 0 |
| unShareable = 0 |
| mightBeShared = 1 |
| sharedWithShmTab = 0 |
| isShmLockId = 0 |
| gcKind = 0 |
| isUsed = 1 |
| isCtfyAble = 1 |
| >>>>> Shareable Table Header Data <<<<< |
| tabi = 0x28C9A53B |
| pgHook = 0x00000000 |
| idxPtr = 0x78CAA53B |
| shmTabhSet = 0x00000000 |
| id = 212 (0xD4000000) |
| refCount = 1 (0x01000000) |
| tstRefCount = 0 (0x00000000) |
| lineAdmin = 16 (0x10000000) |
| lineAlloc = 16 (0x10000000) |
| shmVersId = 0 (0x00000000) |
| shmRefCount = 2 (0x02000000) |
| >>>>> 1st level extension part <<<<< |
| regHook = Not allocated |
| collHook = Not allocated |
| ext2 = Not allocated |
| >>>>> 2nd level extension part <<<<< |
| tabhBack = Not allocated |
| delta_head = Not allocated |
| pb_func = Not allocated |
| pb_handle = Not allocated |
| STARTUP_PLUG |
| )###Æ ##.###Ñ ##1X## |
| 2000C0002000D0003500 |
| 90006900E00019001800 |
| INTERFACE_VIEW_INFO |
|
F0000000
3000C000
<VIEW_MANAGER>-VIEW_MANAGER
|
| C0003000 |
| B0004000 |
| %_DUMMY$$ |
| |
| 2222 |
| 0000 |
| L_DELEGATING_IF_VIEW |
|
B0004000
90006000
SY-REPID
CL_WDR_CLIENT_COMPONENT=======CP
4455455444445544454444533333334522222222
3CF742F3C95E4F3FD0FE5E4DDDDDDD3000000000
%_PRINT
000 0 ##
2222333222222222222222222222222222222222222222222222222222222222222222222222222222222222223200
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
STARTUP_PLUG-PLUG_NAME
DEFAULT
4444545
45615C4
L_EVENT_HANDLER
)###Æ ##/###Ð ##CL_WDY_MD_CTLR_EVENT_HANDLER ######0###ï#######ï#######ï#######ï#######)###Æ
2000C0002000D0004455455445454554544554444445220000003000E0000000E0000000E0000000E00000002000C0
90006900F00009003CF749FD4F34C2F565E4F81E4C52000010000000F0000000F0000000F0000000F0000000900069
L_CUSTOM_EVENT
0000F000
F0000000
SYST-REPID
CL_WDR_CLIENT_COMPONENT=======CP
4455455444445544454444533333334522222222
3CF742F3C95E4F3FD0FE5E4DDDDDDD3000000000
L_EVENT_HANDLER-CMPNAME
HANDLEDEFAULT
4444444444545
81E4C545615C4
No. 6 Ty. METHOD
Name CL_WDR_CLIENT_APPLICATION=>INIT
%_DUMMY$$
2222
0000
%_EXCP
|
| F0000000 |
| F0000000 |
| SY-REPID |
| CL_WDR_CLIENT_APPLICATION=====CP |
| 4455455444445545544445444333334522222222 |
| 3CF742F3C95E4F100C93149FEDDDDD3000000000 |
| SY-XFORM |
| GET_PARAMETER |
| 445554544454522222222222222222 |
| 754F0121D545200000000000000000 |
| L_STARTUP_VIEW |
|
F0000000
3000C000
%_SPACE
2
0
ME
|
| D0002000 |
| F0000000 |
| PARAMETERS |
| Table IT_264[3x16] |
| SY-XPROG |
| SSO2GETPARAM |
| 5543445545442222222222222222222222222222 |
| 33F27540121D0000000000000000000000000000 |
| CL_WDR_CLIENT_CONSTANTS=>ROOT_WINDOW_VIEW_AREA_NAME |
| $$ROOT_VIEW_AREA |
| 2254455544554544 |
| 442FF4F6957F1251 |
| No. 5 Ty. METHOD |
| Name CL_WDR_MAIN_TASK=>EXECUTE |
| SY-REPID |
| CL_WDR_MAIN_TASK==============CP |
| 4455455444455454333333333333334522222222 |
| 3CF742FD19EF413BDDDDDDDDDDDDDD3000000000 |
| L_APPLICATION_NAME |
| ZEXP_PARAMETER_APP |
| 5455554544454554552222222222222222222222 |
| A580F0121D5452F1000000000000000000000000 |
| SY-MSGID |
| |
| 22222222222222222222 |
| 00000000000000000000 |
| WDR_TASK=>RESPONSE |
|
F0000000
A0005000
SYST-REPID
CL_WDR_MAIN_TASK==============CP
4455455444455454333333333333334522222222
3CF742FD19EF413BDDDDDDDDDDDDDD3000000000
SY-MSGNO
000
333
000
SPACE
2
0
WDR_TASK=>APPLICATION_NAME
ZEXP_PARAMETER_APP
545555454445455455
A580F0121D5452F100
WDR_TASK=>CLIENT_WINDOW
|
| F0000000 |
| 0000F000 |
| WDR_TASK=>APPLICATION |
|
D0002000
F0000000
%_DUMMY$$
2222
0000
ME->APPLICATIONS
Table IT_251[1x8]
DATA=APPLICATIONS |
| Table reference: 167 |
| TABH+ 0(20) = F8B8A53B0000000000000000A7000000FB000000 |
| TABH+ 20(20) = 0100000008000000FFFFFFFF042C0000B8040000 |
| TABH+ 40( 8) = 10000000C1288001 |
| store = 0xF8B8A53B |
| ext1 = 0x00000000 |
| shmId = 0 (0x00000000) |
| id = 167 (0xA7000000) |
| label = 251 (0xFB000000) |
| fill = 1 (0x01000000) |
| leng = 8 (0x08000000) |
| loop = -1 (0xFFFFFFFF) |
| xtyp = TYPE#000011 |
| occu = 16 (0x10000000) |
| access = 1 (ItAccessStandard) |
| idxKind = 0 (ItIndexNone) |
| uniKind = 2 (ItUniqueNon) |
| keyKind = 1 (default) |
| cmpMode = 4 (cmpSingleEq) |
| occu0 = 1 |
| groupCntl = 0 |
| rfc = 0 |
| unShareable = 0 |
| mightBeShared = 0 |
| sharedWithShmTab = 0 |
| isShmLockId = 0 |
| gcKind = 0 |
| isUsed = 1 |
| isCtfyAble = 1 |
| >>>>> Shareable Table Header Data <<<<< |
| tabi = 0x68B8A53B |
| pgHook = 0x00000000 |
| idxPtr = 0x00000000 |
| shmTabhSet = 0x00000000 |
| id = 208 (0xD0000000) |
| refCount = 0 (0x00000000) |
| tstRefCount = 0 (0x00000000) |
| lineAdmin = 16 (0x10000000) |
| lineAlloc = 16 (0x10000000) |
| shmVersId = 0 (0x00000000) |
| shmRefCount = 1 (0x01000000) |
| >>>>> 1st level extension part <<<<< |
| regHook = Not allocated |
| collHook = Not allocated |
| ext2 = Not allocated |
| >>>>> 2nd level extension part <<<<< |
| tabhBack = Not allocated |
| delta_head = Not allocated |
| pb_func = Not allocated |
| pb_handle = Not allocated |
| SYST |
| 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1. |
| 0000000000000000000000000000000000000000000010000000000000000000000000000000100000000000000000 |
| 1000000000003000000000000000000000000000200050001000000010000000000000000000000000000000000000 |
| WDR_TASK=>APPLICATION->IS_SUSPENDED |
| |
| 2 |
| 0 |
| ABAP_TRUE |
| X |
| 5 |
| 8 |
| WDR_TASK=>APPLICATION->APPLICATION_WINDOW->VIEW_MANAGER->IF_WDR_VIEW_MANAGER~WINDOW_INFO |
|
F0000000
3000C000
L_APPL_STATE_CHANGE
|
| F0000000 |
| F0000000 |
| No. 4 Ty. METHOD |
| Name CL_WDR_MAIN_TASK=>IF_HTTP_EXTENSION~HANDLE_REQUEST |
| SERVER |
|
F0000000
D0002000
WDR_TASK=>APPLICATION
|
| D0002000 |
| F0000000 |
| ME |
|
F0000000
90006000
WDR_TASK=>CLIENT_WINDOW
|
| F0000000 |
| 0000F000 |
| LR_UCF |
|
F0000000
80007000
WDR_TASK=>CLIENT_WINDOW->CLIENT
|
| E0001000 |
| A0005000 |
| WDR_TASK=>CLIENT_WINDOW->REC_PLUGIN_MANAGER |
|
E0001000
3000C000
RSJOBINFO
00000000000000 ####
222222222222222222222222222222223333333333333322222222222222222222222222222222220000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000
WDR_TASK=>CLIENT_WINDOW->CLIENT_INFO_OBJECT
|
| F0000000 |
| 0000F000 |
| %_SPACE |
| |
| 2 |
| 0 |
| ME->APPL_STATISTICS+12(8) |
| |
| WDR_TASK=>APPLICATION_NAME |
| ZEXP_PARAMETER_APP |
| 545555454445455455 |
| A580F0121D5452F100 |
| No. 3 Ty. METHOD |
| Name CL_HTTP_SERVER=>EXECUTE_REQUEST |
| SERVER |
|
F0000000
D0002000
SERVTBL
Table IT_210[6x2336]
FUNCTION=HTTP_DISPATCH_REQUESTDATA=SERVTBL
Table reference: 1
TABH+ 0(20) = 38F1A53B000000000000000001000000D2000000
TABH+ 20(20) = 0600000020090000180000000401000020070000
TABH+ 40( 8) = 04000000C1308001
store = 0x38F1A53B
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 1 (0x01000000)
label = 210 (0xD2000000)
fill = 6 (0x06000000)
leng = 2336 (0x20090000)
loop = 24 (0x18000000)
xtyp = TYPE#000022
occu = 4 (0x04000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
isCtfyAble = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0xF801973B
pgHook = 0x08AF903B
idxPtr = 0x00000000
shmTabhSet = 0x00000000
id = 190 (0xBE000000)
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 8 (0x08000000)
lineAlloc = 8 (0x08000000)
shmVersId = 0 (0x00000000)
shmRefCount = 1 (0x01000000)
>>>>> 1st level extension part <<<<<
regHook = Not allocated
collHook = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
FIRSTALIAS
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
URLSUFFIX
FLOW_RC
0
0000
0000
TIMEOUT
000000
333333
000000
SEND_PAGE_RC
0
0000
0000
RUNTIME_MEMORY
########Æ###)###Û#######
00000000C0002000D00000002222222222222222222222222222222222222222222222222222222222222222222222
0000000060009000B00040000000000000000000000000000000000000000000000000000000000000000000000000
CL_HTTP_SERVER=>C_STATISTIC_STATE
0
0000
0000
%_PRINT
000 0 ##
2222333222222222222222222222222222222222222222222222222222222222222222222222222222222222223200
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
SECURE_INSERT
0
0000
0000
IHTTP_OPCODE_CLOSE_INTERVAL
1
2
%_DUMMY$$
2222
0000
SYST
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.
0000000000000000000000000000000000000000000010000000000000000000000000000000100000000000000000
1000000000003000000000000000000000000000200050001000000010000000000000000000000000000000000000
STIME
187269
8D00
5B20
SY-XFORM
GET_PARAMETER
445554544454522222222222222222
754F0121D545200000000000000000
IHTTP_OPCODE_OPEN_INTERVAL
1
1
SCREEN
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
SERVER_OBJ->M_CONNECTION_ERROR
ï###########ï#######
E00000000000E0000000
F00000000000F0000000
SY
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.
0000000000000000000000000000000000000000000010000000000000000000000000000000100000000000000000
1000000000003000000000000000000000000000200050001000000010000000000000000000000000000000000000
L_EXCEPTION
|
| F0000000 |
| F0000000 |
| %_SPACE |
| |
| 2 |
| 0 |
| CL_HTTP_SERVER=>IF_HTTP_SERVER~STATEFUL |
| 1 |
| 0000 |
| 1000 |
| OPCODE_GET_SAP_CPIC_RC |
| # |
| 0 |
| 1 |
| L_EXCEPTION->M_CONNECTION_ERROR |
| ??? |
| ?????? |
| ?????? |
| ICF_ACTIVE |
| X |
| 5 |
| 8 |
| No. 2 Ty. FUNCTION |
| Name HTTP_DISPATCH_REQUEST |
| CLIENT_NAME |
| |
| DOCUMENT_IN |
| |
| VIRTUAL_HOST |
| 0 |
| 0000 |
| 0000 |
| DOCUMENT_OUT |
| |
| PF_TASK_PLUGIN |
| # |
| 0 |
| A |
| PF_ACTION_BATCH_JOB |
| 2 |
| 0000 |
| 2000 |
| ERROR_STATE |
| 0 |
| 0000 |
| 0000 |
| PF_OPCODE_APP_STAT_CLOSE |
| # |
| 0 |
| B |
| L_RM_FROM_BUFFER |
| |
| 2 |
| 0 |
| INITPASSWORD |
| |
| 22222222 |
| 00000000 |
| C_STATISTIC_STATE |
| 0 |
| 0000 |
| 0000 |
| SY-XFORM |
| GET_PARAMETER |
| 445554544454522222222222222222 |
| 754F0121D545200000000000000000 |
| PF_CLIINFO |
| # |
| 0 |
| E |
| PF_OPCODE_OPEN_INTERVAL |
| # |
| 1 |
| 1 |
| SPACE |
| |
| 2 |
| 0 |
| C_SERVER |
|
F0000000
D0002000
SERVTBL
Table IT_210[6x2336]
FIRSTALIAS
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
URLSUFFIX
FLOW_RC
0
0000
0000
TIMEOUT
000000
333333
000000
SEND_PAGE_RC
0
0000
0000
L_RUNTIME_MEMORY
########Æ###)###Û#######
00000000C0002000D00000002222222222222222222222222222222222222222222222222222222222222222222222
0000000060009000B00040000000000000000000000000000000000000000000000000000000000000000000000000
%_DUMMY$$
2222
0000
%_PRINT
000 0 ##
2222333222222222222222222222222222222222222222222222222222222222222222222222222222222222223200
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
PF_OPCODE_CLOSE_INTERVAL
1
2
NODENAME
No. 1 Ty. MODULE (PBO)
Name %_HTTP_START
SY-REPID
SAPMHTTP
5454455522222222222222222222222222222222
310D844000000000000000000000000000000000
SYST-REPID
SAPMHTTP
5454455522222222222222222222222222222222
310D844000000000000000000000000000000000
%_ARCHIVE
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%_DUMMY$$
2222
0000
%_SPACE
2
0
Internal notes
The termination was triggered in function "method_call_iref"
of the SAP kernel, in line 2207 of the module
"//bas/700_REL/src/krn/runt/abmethod.c#8".
The internal operation just processed is "METH".
Internal mode was started at 20070407164321.
Active Calls in SAP Kernel
Lines of C Stack in Kernel (Structure Differs on Each Platform)
SAP (R) - R/3(TM) Callstack, Version 1.0
Copyright (C) SAP AG. All rights reserved.
Callstack without Exce -
How to get reference of a SessionBean From RemoteClient
How to get reference of a SessionBean in a ApplicationServer from another SessionBean running in Another ApplicationServer
Hi
There is a method, getHandle() on the EJBObject interface that your remote interfaces extend. This handle can be used to pass a reference to an EJB to someone else (possibly running in another JVM). You can then call getEJBObject() on the Handle instance and get your remote interface on which you can call methods. Should be able to cast it to your specific bean.
I haven't done this, so definitly test it out, but I think this is what you want to do.
check it:
http://mail-archive.objectweb.org/jonas/2000-12/msg00064.html
I suggest u not to go for more complex code, make it simpler, or if its really required use it as a webservice
Regards
Abhijith YS -
How to Find references to a method or a constant?
I want to programmatically find the references to a method or a constant defined in a class.
For example, in Eclipse you can right click on a class, select 'References', and you can get a list of all the places throughout your code that references the class.
How can I do this programmatically?
Thanks,This is not something possible, as requested, even with reflection.
I can't find the reason for having that kind of implementation at runtime.. your compiled assembly is not going to change once it's compiled.
The way references are listed from within visual studio is probably using metadata gathered from the background compiler. When you write code, the compiler run pre-compilation tests, this is the same feature that will display error in your code before you
compile, or complete your intelisense for types that aren't even compiled in the assembly.
So, the only way for you to analyze this kind of thing would be to use something like ILDASM to disasemble your compiled libraries and gather metadata from the resulting MSIL. That would not work if you are using code obfuscation by the way. -
Getting NoSuchObjectInTable Exception though getting reference to remoteObj
This is part of my BE final year project
My RMI agent is working, it is getting Remote reference to my FileTransfer agent
but while executing method "connectAgent" is not working
it says
"NoSuchObjectInTable" exception type
donno what is prob with it
and more over sometime it works too
can ANYBODY PLS SUGGEST ANY SOLUTION
PLS REPLY SOON
I HAVE MY SUBMISSIONS DATE VERY CLOSE
MAN THANKS IN ADVANCE
best regards
this registers my FileTransferAgnet to registry
public FileTransferAgent()
try
LogManager logManager=new LogManager();
disp=new StatusDisplay();
address=logManager.readLogContent("environment_log\\EnvironmentConfig.xml", "local_dir_ip");
int port=Integer.parseInt(logManager.readLogContent("environment_log\\EnvironmentConfig.xml", "local_registrar_port"));
Registry registry=LocateRegistry.getRegistry(address,port);
registrar=(LocalRegistrarInterface)registry.lookup("LocalRegistrar");
disp.write("Registrar#"+registrar);
System.out.print("Registrar#"+registrar);
if(registrar.isAgentAlive(classString))
agent=(FileTransferAgentInterface)registrar.getAgent(service,address);
System.out.print("Got from registry"+agent);
disp.write("Got from registry"+agent);
else
registrar.registerAgent(classString,this,0,null,null);
registrar.registerService(service,classString);
agent=(FileTransferAgentInterface)registrar.getAgent(service,address);
System.out.print("Registered"+agent);
disp.write("Registered"+agent);
while(socketPort<1024)
socketPort=(int)Math.round(Math.random()*65550);
catch(Exception e)
e.printStackTrace();
this will get remote reference and is working fine till Connect Agent method call
public boolean invokeRemoteAgent(String hostName,boolean isIPAddress)
try
UniversalRegistrarInterface uniReg=registrar.getUniversalRegistrarInterface();
System.out.println(uniReg);
int port=uniReg.getLocalDirPort(hostName,isIPAddress);
String addr="";
if(!isIPAddress)
addr=uniReg.getIP(hostName);
else
addr=hostName;
LocalRegistrarInterface regi=registrar.getLocalRegistrarInterface(addr, port, null);
System.out.println("\n\n\nRemoteLocalRegistrar: "+regi);
System.out.println(regi.isAgentAlive(classString));
if(!regi.isAgentAlive(classString))
regi.invokeAgent("framework.agents.FileTransferAgent", service);
remoteAgent=(FileTransferAgentInterface)regi.getAgent(service,address);
System.out.println("\n\nremoteAgent: "+remoteAgent);
serverSock=new ServerSocket(socketPort);
//new Thread(this).start();
remoteAgent.connectAgent(address, socketPort);
socket=serverSock.accept();
System.out.println("Server socket is created at"+address+"#"+socketPort+" \n\nSocket:"+ socket);
return true;
catch(Exception e)
e.printStackTrace();
return false;
}root of the problem
public boolean connectAgent(String address, int port)
try
Thread.sleep(5000);
socket=new Socket(address,port);
in=socket.getInputStream();
out=socket.getOutputStream();
System.out.println("\n\n************Connected at"+address+"#"+port);
new StatusDisplay().write("Connected at"+address+"#"+port);
return true;
catch(Exception e)
e.printStackTrace();
return false;
}Edited by: RiteshMModi on Apr 14, 2008 4:12 PMsee the following output I get
Proxy[FileTransferAgentInterface,RemoteObjectInvocationHandler[UnicastRef [liveR
ef: [endpoint:[172.168.0.15:1073](remote),objID:[-7c4f6d64:119558c6a45:-7fd6, 24
63486946656381430]]]]]
java.rmi.NoSuchObjectException: no such object in table
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
n Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unkn
own Source)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
at $Proxy1.createFile(Unknown Source)
at TestingFTA.main(TestingFTA.java:37)This means that I am getting reference to the remote FileTransferAgent , it is printing it, till this point all fine
but as soon as i invoke any method using the same object, it throws exception as NoSuchObject -
VI Scripting: get reference of the duplicate element
In VI scripting I copy element (any type of indicator, control, constant) with Move method with duplicate property - true. The output top right terminal of the method is the reference to the source object, not the new one.
Is there any straightforward way to get reference to that copy (other copy method, etc)?
Not straightforward solutions (they may work on test examples, but not good)
1) move to temporary cluster - easy to find a new element
2) list all objects before, after and compare lists. But the source VI can be of any size and complexity.
3) Create element copy manually - bad, the solution should work on all kinds of elements.
Solved!
Go to Solution.Good method.
It is almost working!
It can create controls and indicators, but fails with constants (Class conflict, when wiring constant reference to the Source Object Reference terminal)
Besides, there is a wrong description of the method (LV 2011):
LabVIEW help
Create from reference method:
Source Object Reference
A reference to the object you want to duplicate on the target VI. If you use this parameter, you do not need to wire the _type descriptor and style fields_.
There are no type descriptor and style fields at all, they are in other methods
Who is failing, me or LV? =)
Attachments:
Duplicate constant fails.png 56 KB -
Event generated by user 'anonymous' at host 'CIS'. Unable to get reference.
Hi,
We have integrated our custom portal webcenter application with UCM through document taskflows.
We are not unable to view the documentts fetched from UCM. Below is the error getting logged in UCM whenever we access the application.
Event generated by user 'anonymous' at host 'CIS'. Unable to get reference. Cannot read folder. [ Details ]
An error has occurred. The stack trace below shows more information.
!csUserEventMessage,anonymous,CIS!$!csCollectionUnableToGetReference!csCollectionCannotRead
intradoc.common.ServiceException: !csCollectionUnableToGetReference!csCollectionCannotRead
*ScriptStack COLLECTION_GET_REFERENCE
3:getReferenceMeta,**no captured values**
at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
at intradoc.server.Service.buildServiceException(Service.java:2260)
at intradoc.server.Service.createServiceExceptionEx(Service.java:2254)
at collections.CollectionUserHandler.getReferenceMeta(CollectionUserHandler.java:1765)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)
at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:324)
at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
at intradoc.server.Service.doCodeEx(Service.java:533)
at intradoc.server.Service.doCode(Service.java:505)
at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
at intradoc.server.Service.doAction(Service.java:477)
at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
at intradoc.server.Service.doActions(Service.java:472)
at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1391)
at intradoc.server.Service.executeActions(Service.java:458)
at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:737)
at intradoc.server.Service.doRequest(Service.java:1890)
at intradoc.server.ServiceManager.processCommand(ServiceManager.java:435)
at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Regards,
Boopathy PHi Ryan and Deepak,
Thanks for your suggestions.
The problem was due to the security group assigned to the folders. I had created custom security groups and had assigned it to the folders and contents. But forgot to create the role as groups in weblogic console and assign it to the user. On applying the public security group to folders and contents i was able to rectify this error.
Regards,
Boopathy -
[AS CS5.5] Bad Perfomance: sequentially using DOM to get references
Hi guys,
The issue
I'm having terrible performance problems when using a complex script I wrote.
The script
I need to make some special comparisons between found text and the texts in that page.
My script is written in Flash Builder 4, using the CS_SDK (without Extension Builder)
In short, my script has a class that performs the following tasks:
1. Finds texts that meet some criteria (by using Document.findText() method) and stores the Array of texts result in an array.
2. Traverses the Array of found texts and, for each one of them:
a. Finds a reference to the page where that text is. Something like (within a for loop, with iFoundText as the indexing var):
var currentParentPage :Page =
foundText[iFoundText].parentStory.textContainers[0].parentPage;
b. Finds all the page items in that page. The code goes something like this:
var myPageItems :Object =
currentParentPage.allPageItems;
c. If the PageItem is a TextFrame, then make the 'special comparison', word by word.
if (currentPageItem is TextFrame)
var allTheWords :Words =
currentPageItem.words
for (var iWord:int = 0 ; iWord < allTheWords.length ; iWord++)
//Code to perform comparison and related operations...
It seems to work OK, when allowing to perform the script for he first three occurrences (although very slow, say some 12 seconds for this).
So, what's the problem?
What happens when I run it with more load:
When I run the script for all the occurrences (I know that the number is around 100), the application halts, an stops responding. After 10 min it doesn't work anymore.
What the documentation says:
I found a document called "FEATURE DEVELOPMENT WITH SCRIPTING - Adobe CS5" (link), where it gives this recommendation:
Performance techniques
Minimize access to InDesign DOM
Querying the InDesign DOM may be the main performance bottleneck for your script. A considerable amount of time typically is spent resolving object references, because InDesign does not hand out pointers to objects but rather uses references that need to be resolved every time they are used. Here are some techniques to alleviate this problem:
z Reduce the number of calls to the scripting DOM.
z Store and reuse resolved references in variables wherever possible.
z Use everyItem() to fetch and cache data of a collection object all at once, instead of querying the properties with separate calls.
But I don't know how to not query InDesign's DOM every time...
So. I understand that calling InDesign's DOM is bad for the script's performance, but I really don't know how could I avoid querying it for getting references to parent objects, or any other item.
I have two questions
1. If I have a variable stored in my AS script, for example:
var anyTextItem:com.adobe.indesign.Text
When I call a property or a method of that variable... Am I querying InDesign's DOM? (in other words, the variables' content is passed as a reference?)
2. How do I query the DOM less times?
For example:
Problem: I constantly need to know what's the parent page of a found text, and then get the array of page items, and then, the array of words of every page item that is a textframe.
How could I query the DOM once and then play with the stored variables instead of repetitively querying the DOM?
Because, even if I have the variable stored, say "anyTextItem:Text", and I also have all the document's TextFrames stored in other variable (say "var allTextFrames:TextFrames"), I would still need to call "anyTextItem.parentTextFrame" to get a reference to the containing textFrame, and that would mean "querying InDesign's DOM".
I would appreciate if anybody understands how to solve this.
Thanks you, guys !Harbs,
Thank you very much for your answer. You're very knowledgeable about InDesign DOM.
Your message gives me a better understanding of how objects are managed between a scripting environment and the DOM. I still have some questions, though...
b.
I will change the call to 'allPageItems' to 'page.textFrames.everyItem().getElements()'. It makes much more sense.
Now, quick question:
What do you use 'getElements()' for?
What's the diference between calling 'page.textFrames.everyItem().getElements()' and 'page.textFrames.everyItem()'?
c.
OK. I kinda got it. But, I have questions here too.
For me, it's been quite tricky to understand indexes and references for InDesign DOM objects.
Let's say that I have stored a Story's words object in my script. Something like:
var currentWords :Words = currentStory.words;
And then, I go through a TextFrame that contains part of that Story, and find one word that meets my criteria. So I get:
var foundWord :Word = (... Somehow I got a reference to this ...);
Is it there a way to easily find that word (by index) in the 'currentWords' object? (maybe using index or id...) The problem is that I've found that sometimes the indexes don't match (i. e. if I call "foundWord.index", its index can be way larger than the parentStory.words.length, for example, I got foundWord.index=942, whereas foundWord.parentStory.length=742).
And, as a consequence, I'm using long workarounds to find the word within that collection (and I guess you'd scold me for this one; now I think that might be a serious performance killer, because I'm reconstructing the 'words' collection over and over again :S)
Thanks again to both of you (@Harbs and @Andrés), you've been very kind and helpful. -
How to get references to project´s entities?
Hi there,
is there any straightforward way of getting reference to project´s entities? The idea is get a collection/array of all the entities enumerated at the persistence.xml via some JPA class. Is this possible?
Thanks for any hint!Hi
You should not set the attributes at the DOINIT, as the view will not be created that time.So what i suggest is , create it DOMODIFY .
As i said in my previous post , create five attributes in the component controller.
like l_view1,l_view2,l_view3...etc. of type if_wd_view_controller.
And now go to each view's modify method. And write the following code.
Data: lo_api TYPE REF TO if_wd_view_controller.
If first_time = 'X'.
lo_api = wd_this->wd_get_api( ).
wd_Comp_Controller->l_view1 = lo_api.
endif
And you could access this view controller , anywhere u want by using wd_Comp_Controller->l_view1
Thanks
Anzy
Award points if this solves your issue.
Message was edited by:
Mohammed Anzy S -
Urgent help req : work item id not getting passed in the method
Hi ,
I have created a subtype zcats of business object CATS and delegated it .
I have created a new method Approve1 ( with attributes SYNCRONUS & DIALOG ) in zcats which is similar in coding to Approve method of CATS ( DIALOG) .
I have include the method Approve1 of business object zcats in a standard task .
The problem is that when the eorkflow gets triggered , the workitem id is not getting passed in the method APProve1 of zcats.
Can someone please help me with this .
Points would surely be awarded .BEGIN_METHOD APPROVE1 CHANGING CONTAINER.
DATA: WORKITEMID_IMP LIKE OBJECT-KEY-ITEMID.
DATA: WI_CHCKWI LIKE SWWWIHEAD-WI_ID.
DATA: WORKITEM TYPE SWC_OBJECT.
<u> WORKITEMID_IMP = OBJECT-KEY-ITEMID</u>.
SWC_GET_ELEMENT CONTAINER '_WORKITEM' WORKITEM.
SWC_GET_PROPERTY WORKITEM 'WorkitemReference' WI_CHCKWI.
IF SY-SUBRC EQ 0 AND NOT WI_CHCKWI IS INITIAL.
WORKITEMID_IMP = WI_CHCKWI.
ENDIF.
CALL FUNCTION 'CATS_WF_APPROVAL'
EXPORTING
WORKITEMID_IMP = WORKITEMID_IMP
TABLES
CONT_IMP = CONTAINER.
END_METHOD.
hi ,
the above is the code in the method .
At the first step of execution underlined above , the work item id is appearing blank .
I think that the value is not passed to the container , but i am not sure og how to pass data to this conatiner -
Getting references to the objects in a VM to dynamically link MBeans
Hi, I am dynamically generating MBeans and using Apache BCEL to change the resource classes to link themselves to the MBeans. The objective is to instrument applications wich we can't access the code and, if possible, do it on a running one.
I could use the Instrumentation API to change the classes of the application and the Attach API to do it on a running application, but only new instances would be affected, so the previously created objects would not be managed. I can generate MBeans in many ways, but can't link them to already running application objects.
So, what i want to know is in the title: is there a way to get references to the objects actually loaded in a Virtual Machine or another way to link an MBean to a running object?
I saw McManus talk at Sun One 2006 about the different ways to link MBeans to application objects, but all of them look to need code changes or previous suport to dependency injection, for example.
http://developers.sun.com/learning/javaoneonline/2006/coreplatform/TS-3523.html
I need it to a technical writing, so an official word can be enough, or even more helpful than a solution.
Thanks,
GustavoGustavo,
Assuming I understand your question correctly, the only way I can see that you can enumerate instances of objects in a Java VM without changing the classes of those objects in any way is to use JVMTI <http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html#Heap_1_0>. That requires you to write native code somewhere as part of your solution. It is applicable to already-running apps via attach-on-demand <http://java.sun.com/javase/6/docs/jdk/api/attach/spec/index.html>. The MLet service from the JMX API might be convenient here to bridge from the jar file that the Attach API expects to the native code that you need to access JVMTI.
As you can see this is pretty advanced stuff, but your ideas are interesting and I'd be interested in knowing how they work out.
Regards,
�amonn McManus -- JMX Spec Lead -- http://weblogs.java.net/blog/emcmanus -
Can we get reference of WD component in custom class of enhanced View cont
Dear Member,
We are enhancing WD component. We need to get a reference of WD component in custom class of enhanced View controller (post exit) so that popups can be triggered or URLs can be called?. How should we get reference of WD component? I need to know cons of our approach.
...NaddyHi,
Create one static attribute in your custom class with type ref to of your component and populate this attribute in webdynpro enhancement and then use this reference in your custom class.
Regards,
Pon Murugesh -
Problem with GET REFERENCE statement
Hi gurus,
shortly; I need to populate a table whose elements are made as follows:
CODE TYPE MDM_FIELD_CODE (a string, basically)
VALUE TYPE REF TO DATA.
I need to loop over an item table and populate the above sketched table; so I wrote as follows:
LOOP AT lt_item INTO ls_item.
*** MDMSRM_SHORT_DESCRIPTION ***
CLEAR value_pair.
MOVE 'MDMSRM_SHORT_DESCRIPTION' to value_pair-code.
GET REFERENCE OF ls_item-short_desc INTO value_pair-value.
APPEND value_pair TO lt_value_pair.
ENDLOOP.
The problem is: each time the loop is performed, all the VALUE fields already appended have the value of the last iteration.
How can I overcome this problem? Is there a sort of unassignment technique for GET REFERENCE?
Thanks,Had some difficulties in working with field-symbols as I have to reference to a structure which is partly derived from the workarea and partly fixed...
I did as follows, maybe it's not the best solution, however, seems to work:
FIELD-SYMBOLS <item> TYPE zsrm_cat_files_i.
FIELD-SYMBOLS: <minqty> TYPE mdm_gdt_quantity-content.
FIELD-SYMBOLS: <minqty_unit> TYPE MDM_CDT_MEASURE_UNIT_CODE.
FIELD-SYMBOLS: <minqty_struct> TYPE mdm_gdt_quantity.
DATA minimum_qty TYPE REF TO mdm_gdt_quantity
LOOP ... ASSIGNING <item>.
CREATE DATA minimum_qty.
ASSIGN minimum_qty->* TO <minqty_struct>.
ASSIGN COMPONENT 1 OF STRUCTURE <minqty_struct> TO <minqty>.
ASSIGN COMPONENT 2 OF STRUCTURE <minqty_struct> TO <minqty_unit>.
<minqty> = <item>-min_qty.
<minqty_unit> = '$$$'.
GET REFERENCE OF <minqty_struct> INTO value_pair-value.
APPEND value_pair TO lt_value_pair. -
In Which Table I Will get Reference Document for MIGO Transaction
Hai Experts
In Which Table I Will get Reference Document for MIGO Transaction
Regards
JagadishHi,
The 2 main tables for this MIGO Transaction are ,
MKPF - Header table
MSEG - Item table
Reference Document is XBLNR.
Regards,
Raj.
Maybe you are looking for
-
Flash player is automatically block on sites like Youtube, and I have to click to play videos. While working at school, this is profoundly irritating, and I have no permissions to update flash shockwave. How do I disable the "click to play" so that I
-
HOW TO RESOLVE(Test failed: The Network Adapter could not establish the connection)
Hii I want to create new databse as sysdba in jdev.I followed the steps as given in Oracle JDeveloper 11g Release 2 Tutorials - Designing and Building Database Tables In step 7 create database user and database connection, I am not able to do that an
-
Hey, I need smth like BorderLayout from swing in javafx, but much simpler (only North and Center). I used Vbox layout on scene with binding width and height values with scene size for autosizing all content inside scene. First, in VBox I put ToolBar
-
Every time browser starts the same 3 tabs open no matter what
Every time I open my browser the same 3 tabs open even though I specified a single tab as my home page! The tabs are welcome to firefox, mozilla start page and mozilla notepad addon. Also my addon lastpass manager every time I start it I have to keep
-
How to remove any view from material master
Hello guys, Actually we can attach the view to material master by MM01 and also by MM50. Now,consider this, in my company even we sale the semifinished material along with the finished material.So we have attached the sales view to semifinished