Host & Java monitoring returns grey entries solman 7.1 SP10

Hello SAP,
We have configured system monitoring in Solution Manager 7.1 SP10 system.
Monitoring data for database and ABAP technical instance is getting captured and available in system/database monitoring in technical monitoring work center.
But host monitoring not working for both ABAP and Java systems and technical instance of Java data not capturing, shows grey entries.
We have followed and implemented the SAP note:
1853160 - Grey host metrics in Technical Monitoring
1855064 - Error occurred when calling the DPC Push web service
1638655 - Errors with requests coming from ICM
But still the host monitoring and Java system details are not working in Technical Monitoring.
We have noticed below error message on Diagnostic Agent log files:
Jul 18, 2014 2:23:40 AM [Thread[ExRun:dpc:job_3,5,dpc:job:ExecTG]] Error      [DPCServicePushMetricJob.pushSimpleEvents] Error occurred when calling the DPC Push web service. (http://xxxxxxxx:8000/sap/bc/srt/scs/sap/e2e_dpc_push?sap-client=030).
[EXCEPTION]
java.rmi.RemoteException: Service call exception; nested exception is:
        com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (404) Not found. The request URL was:"http://xxxxxxxx:8000/sap/bc/srt/scs/sap/e2e_dpc_push?sap-client=xxx". Check, whether the URL is correct, and the Web Service that you are requesting is up and running.
        at com.sap.smd.agent.wsclients.dpc.BindingStub.e2eDpcPushMetrics(BindingStub.java:85)
        at com.sap.smd.agent.wsclients.dpc.BindingStub.e2eDpcPushMetrics(BindingStub.java:96)
        at sun.reflect.GeneratedMethodAccessor39576.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sap.smd.api.util.SynchronizedProxy$SyncHandler.invoke(SynchronizedProxy.java:32)
        at $Proxy37.e2eDpcPushMetrics(Unknown Source)
        at com.sap.smd.dpc.job.DPCServicePushMetricJob.pushSimpleEvents(DPCServicePushMetricJob.java:122)
        at com.sap.smd.dpc.job.DPCServicePushMetricJob.run(DPCServicePushMetricJob.java:66)
        at com.sap.smd.server.exec.TaskRunner.run(TaskRunner.java:46)
        at com.sap.smd.server.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:785)
        at java.lang.Thread.run(Thread.java:722)
Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (404) Not found. The request URL was:"http://xxxxxxxx.:8000/sap/bc/srt/scs/sap/e2e_dpc_push?sap-client=xxx". Check, whether the URL is correct, and the Web Service that you are requesting is up and running.
        at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.handleResponseMessage(MimeHttpBinding.java:998)
        at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1452)
        at com.sap.smd.agent.wsclients.dpc.BindingStub.e2eDpcPushMetrics(BindingStub.java:78)
        ... 11 more
Request you to look into this and advice us to correct the issue
Thanks,
Vamshi

Thank you Divyanshu,
Please find the Host agent logs and profile details .
1. Host Agent logs:
trc file: "dev_saphostexec", trc level: 3, release: "720"
SAPHOSTAGENT information
kernel release                720
kernel make variant           720_REL
compiled on                   AIX 2 5 00092901D600 for rs6000_64
compiled for                  64 BIT
compilation mode              Non-Unicode
compile time                  Jan 25 2014 06:32:12
patch number                  178
latest change number          1470842
supported environment
operating system
AIX 2 5
AIX 3 5
AIX 1 6
AIX 1 7
[Thr 01] Sat May 17 08:31:13 2014
[Thr 01] update env : PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/sap/<SID>/DVEBMGSxx/exe/sapjvm_4/bin:/etc:/usr/ucb:/usr/bin/X11:/
usr/java14/jre/bin:/usr/java14/bin:/usr/local/bin:/etc:/usr/ucb:/home/<SID>adm/bin:/usr/bin/X11:/usr/sap/<SID>/SYS/exe/uc/rs6000_
64:/usr/sap/<SID>/SYS/exe/run:/home/<SID>adm:.:/db2/db2<SID>/sqllib/bin:/db2/db2<SID>/sqllib/adm:/db2/db2<SID>/sqllib/misc:
[Thr 01] update env : LIBPATH=/usr/sap/hostctrl/exe
[Thr 01] _=/usr/sap/hostctrl/exe/hostexecstart
[Thr 01] MANPATH=/opt/tectia/man:
[Thr 01] LANG=en_US
[Thr 01] WSM_WS_CMD="startsrc -s http4websm"
[Thr 01] LOGIN=<SID>adm
[Thr 01] PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/sap/<SID>/DVEBMGSxx/exe/sapjvm_4/bin:/etc:/usr/ucb:/usr/bin/X11:/usr/java14/jr
e/bin:/usr/java14/bin:/usr/local/bin:/etc:/usr/ucb:/home/<SID>adm/bin:/usr/bin/X11:/usr/sap/<SID>/SYS/exe/uc/rs6000_64:/usr/sap/S
MP/SYS/exe/run:/home/<SID>adm:.:/db2/db2<SID>/sqllib/bin:/db2/db2<SID>/sqllib/adm:/db2/db2<SID>/sqllib/misc:
[Thr 01] RES_RETRY=2
[Thr 01] RSEC_SSFS_KEYPATH=/usr/sap/<SID>/SYS/global/security/rsecssfs/key
[Thr 01] LC__FASTMSG=true
[Thr 01] CLASSPATH=:/db2/db2<SID>/sqllib/java/db2java.zip:/db2/db2<SID>/sqllib/java/runtime.zip:.
[Thr 01] LOGNAME=<SID>adm
[Thr 01] RES_TIMEOUT=2
[Thr 01] dbs_db6_user=sap<SID>
[Thr 01] MAIL=/usr/spool/mail/<SID>adm
[Thr 01] DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt
[Thr 01] LOCPATH=/usr/lib/nls/loc
[Thr 01] PS1=uahris12:<SID>adm> 
[Thr 01] DIR_LIBRARY=/usr/sap/<SID>/SYS/exe/run
[Thr 01] WSM_DOC_DIR="/usr/websm/http/com.ibm.websm.http.server_1.0.0"
[Thr 01] USER=<SID>adm
[Thr 01] AUTHSTATE=compat
[Thr 01] DSM_LOG=/db2/db2<SID>/errors
[Thr 01] IBM_JAVA_OPTIONS=-Xmx256M -Xj9
[Thr 01] SHELL=/usr/bin/ksh
[Thr 01] ODMDIR=/etc/objrepos
[Thr 01] CASHCOMP=/opt/CA/SharedComponents
[Thr 01] JAVA_HOME=/usr/sap/<SID>/DVEBMGSxx/exe/sapjvm_4
[Thr 01] TIMEOUT=900
[Thr 01] TMOUT=900
[Thr 01] DSMI_LOG=/db2/db2<SID>/errors
[Thr 01] dbs_db6_schema=sap<SID>
[Thr 01] RSEC_SSFS_DATAPATH=/usr/sap/<SID>/SYS/global/security/rsecssfs/data
[Thr 01] HOME=/home/<SID>adm
[Thr 01] DB2INSTANCE=db2<SID>
[Thr 01] TERM=vt100
[Thr 01] MAILMSG=[YOU HAVE NEW MAIL]
[Thr 01] DSM_DIR=/usr/tivoli/tsm/client/ba/bin
[Thr 01] rsdb_ssfs_connect=0
[Thr 01] DB2DBDFT=<SID>
[Thr 01] PWD=/home/<SID>adm
[Thr 01] TZ=EST5EDT
[Thr 01] dbms_type=db6
[Thr 01] AIXTHREAD_SCOPE=S
[Thr 01] WSM_CGI_DIR=
[Thr 01] SAPSYSTEMNAME=<SID>
[Thr 01] DSM_CONFIG=/usr/tivoli/tsm/client/ba/bin/dsm.opt
[Thr 01] DSMI_DIR=/usr/tivoli/tsm/client/api/bin64
[Thr 01] INSTHOME=/db2/db2<SID>
[Thr 01] A__z=! LOGNAME="*TMOUT
[Thr 01] NODNSSAPTRANSHOST=1
[Thr 01] LIBPATH=/usr/sap/hostctrl/exe
[Thr 01] **** Create a deamon **********
trc file: "dev_saphostexec", trc level: 3, release: "720"
[Thr 01] Sat May 17 08:31:13 2014
[Thr 01] ##############################################################
[Thr 01] saphostexec restarted as daemon with tracelevel 1
[Thr 01] ##############################################################
[Thr 01] SigISetDefaultAction : default handling for signal SIGCHLD
[Thr 01] Setup autoupgrade with following path:
[Thr 01] source='/usr/sap/hostctrl/exe'
[Thr 01] upgrade='/usr/sap/hostctrl/exe/../new'
[Thr 01] * Environment of /usr/sap/hostctrl/exe/sapstartsrv process *
[Thr 01] _=/usr/sap/hostctrl/exe/hostexecstart
[Thr 01] MANPATH=/opt/tectia/man:
[Thr 01] LANG=en_US
[Thr 01] WSM_WS_CMD="startsrc -s http4websm"
[Thr 01] LOGIN=<SID>adm
[Thr 01] PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/sap/<SID>/DVEBMGSxx/exe/sapjvm_4/bin:/etc:/usr/ucb:/usr/bin/X11:/usr/java14/jr
e/bin:/usr/java14/bin:/usr/local/bin:/etc:/usr/ucb:/home/<SID>adm/bin:/usr/bin/X11:/usr/sap/<SID>/SYS/exe/uc/rs6000_64:/usr/sap/S
MP/SYS/exe/run:/home/<SID>adm:.:/db2/db2<SID>/sqllib/bin:/db2/db2<SID>/sqllib/adm:/db2/db2<SID>/sqllib/misc:
[Thr 01] RES_RETRY=2
[Thr 01] RSEC_SSFS_KEYPATH=/usr/sap/<SID>/SYS/global/security/rsecssfs/key
[Thr 01] LC__FASTMSG=true
[Thr 01] CLASSPATH=:/db2/db2<SID>/sqllib/java/db2java.zip:/db2/db2<SID>/sqllib/java/runtime.zip:.
[Thr 01] LOGNAME=sapadm
[Thr 01] RES_TIMEOUT=2
[Thr 01] dbs_db6_user=sap<SID>
[Thr 01] MAIL=/usr/spool/mail/<SID>adm
[Thr 01] DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt
[Thr 01] LOCPATH=/usr/lib/nls/loc
[Thr 01] PS1=uahris12:<SID>adm> 
[Thr 01] DIR_LIBRARY=/usr/sap/<SID>/SYS/exe/run
[Thr 01] WSM_DOC_DIR="/usr/websm/http/com.ibm.websm.http.server_1.0.0"
[Thr 01] USER=sapadm
[Thr 01] AUTHSTATE=compat
[Thr 01] DSM_LOG=/db2/db2<SID>/errors
[Thr 01] IBM_JAVA_OPTIONS=-Xmx256M -Xj9
[Thr 01] SHELL=/usr/bin/ksh
[Thr 01] ODMDIR=/etc/objrepos
[Thr 01] CASHCOMP=/opt/CA/SharedComponents
[Thr 01] JAVA_HOME=/usr/sap/<SID>/DVEBMGSxx/exe/sapjvm_4
[Thr 01] TIMEOUT=900
[Thr 01] TMOUT=900
[Thr 01] DSMI_LOG=/db2/db2<SID>/errors
[Thr 01] dbs_db6_schema=sap<SID>
[Thr 01] RSEC_SSFS_DATAPATH=/usr/sap/<SID>/SYS/global/security/rsecssfs/data
[Thr 01] HOME=/home/sapadm
[Thr 01] DB2INSTANCE=db2<SID>
[Thr 01] TERM=vt100
[Thr 01] MAILMSG=[YOU HAVE NEW MAIL]
[Thr 01] DSM_DIR=/usr/tivoli/tsm/client/ba/bin
[Thr 01] rsdb_ssfs_connect=0
[Thr 01] DB2DBDFT=<SID>
[Thr 01] PWD=/home/<SID>adm
[Thr 01] TZ=EST5EDT
[Thr 01] dbms_type=db6
[Thr 01] AIXTHREAD_SCOPE=S
[Thr 01] WSM_CGI_DIR=
[Thr 01] SAPSYSTEMNAME=<SID>
[Thr 01] DSM_CONFIG=/usr/tivoli/tsm/client/ba/bin/dsm.opt
[Thr 01] DSMI_DIR=/usr/tivoli/tsm/client/api/bin64
[Thr 01] INSTHOME=/db2/db2<SID>
[Thr 01] A__z=! LOGNAME="*TMOUT
[Thr 01] NODNSSAPTRANSHOST=1
[Thr 01] LIBPATH=/usr/sap/hostctrl/exe
[Thr 01] USERNAME=sapadm
2. Host Agent profile:
SAPSYSTEMNAME = SAP
SAPSYSTEM = 99
service/porttypes = SAPHostControl NwaManagement SAPCCMS SAPOscol
#service/porttypes = SAPHostControl SAPOscol SAPCCMS
service/admin_users = diaadm
DIR_LIBRARY = /usr/sap/hostctrl/exe
DIR_EXECUTABLE = /usr/sap/hostctrl/exe
DIR_PROFILE = /usr/sap/hostctrl/exe
DIR_GLOBAL = /usr/sap/hostctrl/exe
DIR_INSTANCE = /usr/sap/hostctrl/exe
DIR_HOME = /usr/sap/hostctrl/work
service/logfile_000 = /tmp/s
service/logfile_001 = /usr/sap/<SID>/DVEBMGSxx/j2ee/cluster/dispatcher/log/applications*.log
service/logfile_002 = /usr/sap/<SID>/DVEBMGSxx/j2ee/cluster/dispatcher/log/applications.*.log
service/logfile_003 = /usr/sap/<SID>/DVEBMGSxx/j2ee/cluster/dispatcher/log/defaultTrace*.trc
service/logfile_004 = /usr/sap/<SID>/DVEBMGSxx/j2ee/cluster/dispatcher/log/defaultTrace.*.trc
service/logfile_005 = /usr/sap/<SID>/DVEBMGSxx/j2ee/cluster/server0/log/applications*.log
service/logfile_006 = /usr/sap/<SID>/DVEBMGSxx/j2ee/cluster/server0/log/applications.*.log
service/logfile_007 = /usr/sap/<SID>/DVEBMGSxx/j2ee/cluster/server0/log/applications/com.sap.xi/xi*.log
service/logfile_008 = /usr/sap/<SID>/DVEBMGSxx/j2ee/cluster/server0/log/applications/com.sap.xi/xi.*.log
service/logfile_009 = /usr/sap/<SID>/DVEBMGSxx/j2ee/cluster/server0/log/defaultTrace*.trc
service/logfile_010 = /usr/sap/<SID>/DVEBMGSxx/j2ee/cluster/server0/log/defaultTrace.*.trc
Thanks  Vamshi.

Similar Messages

  • Configure Interface channel monitoring for PI in SOLMAN 7.1

    Hi Experts,
    I am configuring interface channel monitoring for PI in SOLMAN 7.1.In step 5 (Define scope) it is asking to select scenario.I can see all PI systems (Dev,QA and PRD) is listed in the table with "monitoring and alerting setup status" as yellow.when I select PI (prod) and proceed , in step 6.3 (Interface channel Monitoring config) I don't find any channel name in table.I need your support to clear my understanding on this.
    1)My objective is to monitor all the interfaces that are existing between PI system and other SAP as well as non SAP systems (that include JDBC connections also).How can find all these interfaces in solman while doing Interface channel monitoring config?
    2)I am not sure if I have understood correctly that I need to create scenario that includes technical systems between which Interface channel are to be monitored. If I am correct then how can I bring the technical system to SOLMAN SLD from Local SLD of PI(prod).Here I am not getting option to synchronize SOLMAN SLD from PI Local SLD. Even Import option is also not there. Do I need to create all the Technical systems (present in PI) to SOLMAN SLD manually?
    If my understanding is not correct then please guide me through steps to do the configuration to achieve my objective.
    Thanks
    Aditya Roushan.

    yes, the problem solved. thanks for your replies all.
    the users SLDDSUSER and SLDAPIUSER got locked, I changed it in su01.
    and I created rfc in SM59 for SAPSLDAPI and LCRSAPRFC and create the same in JCo RFC provider.
    both are working.
    but iam facing new problem.
    I have solution manager 7.1 system and I configured local SLD. I did not connect any managed system as of now.
    after all the trouble shooting, SLDAPICUST and SLDCHECK is fine but
    the error is
    "Functional call returned exception code 3"
    "Access to XI Profile currently disrupted.
    I have solution manager 7.1, I did not configure managed systems as of now.  is this error belongs to solution manager 7.1 or for PI system.
    can u please guide me how to trouble shoot this error. check the following screen shot for reference.
    thanks in advance.

  • Java always returns 15 minutes greater than the current time.

    Hi,
    I am using Microsoft Windows Server 2003R2,Standard X64 edition with Service Pack 2 and jdk1.6.0-03.
    Java always returns time 15 minutes greater than the current system time.
    eg:
    SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    System.out.println("Now time: "+simpleDateFormat.format(new Date()));
    System.out.println("Now time: "+new Date());The output of the program is :
    Now time: 2008-12-22 18:47:04
    Now time: Mon Dec 22 18:47:04 NPT 2008
    When my actual system time is 6:32 PM or (18:32)
    I have checked the current time with other programming languages like python and it always returns the actual date and time.
    Note: To my observation java is always utilizing a time which is 15 minutes greater than the current time even for its log.
    Thanks,
    Rajeswari (Msys)

    I think a more practical time machine would be one that actually travels back in time rather than forward (by 15 minutes). Sounds like it needs some more work.
    Anyway, I suggest changing the system time on your computer to some other value (say, 2 hours ahead), then running the program again. If its off by 2 hours and 15 minutes, its getting the time from your computer. However, if its still off by only 15 minutes (from your wristwatch's time), then its getting the time form somehere other than the computer clock.

  • Function to return the Entry Value based on Assignment, Element and Date

    Hi Guys,
    Is there a function that returns the Entry Value for the Assignment Element, based on the Assignment Number, Element Name, Entry Segment and the End of Period date?
    Example:
    ==============
    Input Parameters:
    Employee: Iana
    Assignment Num: 123
    Element: D480
    Element Entry: Fund Name
    Output Parameter:
    Element Entry Value: MLC Super Fund
    Thanks,
    Iana

    For element entry values you can use:
    select petf.element_name, nvl(peevf.screen_entry_value,0) screen_entry_value
    from
    pay_element_entries_f peef, pay_element_types_f petf,
    pay_element_entry_values_f peevf, pay_input_values_f pivf,
    per_all_assignments_f paaf
    where petf.element_type_id = peef.element_type_id
    and :p_date_earned between pivf.effective_start_date and pivf.effective_end_date
    and :p_date_earned between petf.effective_start_date and petf.effective_end_date
    and peevf.input_value_id = pivf.input_value_id
    and paaf.assignment_id = peef.assignment_id
    and petf.business_group_id = :p_business_group_id
    and peevf.element_entry_id = peef.element_entry_id
    and :p_date_earned between peef.effective_start_date and peef.effective_end_date
    and :p_date_earned between peevf.effective_start_date and peevf.effective_end_date
    and :p_date_earned between paaf.effective_start_date and paaf.effective_end_date
    and pivf.name = :p_input_value_name
    and petf.element_name = :p_element_name
    and peef.entry_type = 'E'
    and peevf.effective_start_date = peef.effective_start_date
    and peevf.effective_end_date = peef.effective_end_date
    --and peef.assignment_id = :p_assignment_id
    and paaf.assignment_number = :p_assignment_number;
    For payroll results you can use:
    select sum(prrv.result_value)
    from pay_run_results prr, pay_run_result_values prrv,
    pay_assignment_actions paa, pay_payroll_actions ppa,
    pay_element_types_f petf, pay_input_values_f pivf,
    per_all_assignments_f paaf, per_all_people_f papf
    where
    petf.element_type_id = pivf.element_type_id
    and :p_pay_date between petf.effective_start_date and petf.effective_end_date
    and :p_pay_date between pivf.effective_start_date and pivf.effective_end_date
    and paa.assignment_action_id = prr.assignment_action_id
    and petf.element_type_id = prr.element_type_id
    and ppa.payroll_action_id = paa.payroll_action_id
    and prrv.input_value_id = pivf.input_value_id
    and prr.run_result_id = prrv.run_result_id
    and petf.element_name = :p_element_name
    and pivf.name = :p_input_value_name
    and ppa.date_earned = :p_pay_date
    and papf.person_id = paaf.person_id
    and nvl(prr.start_date,ppa.effective_date) between paaf.effective_start_date and paaf.effective_end_date
    and nvl(prr.start_date,ppa.effective_date) between papf.effective_start_date and papf.effective_end_date
    and paaf.assignment_id = paa.assignment_id
    and papf.employee_number = :p_employee_number;

  • [JNI Beginner] GC of Java arrays returned by the native code

    Hello all,
    I am beginning with JNI, to integrate a C library that pilots an industrial equipment, into a java UI. This library enables to exchange various proprietary PDUs (protocol data units), with the equipment, up and down (request/replies). Both requests and replies are arrays of bytes (+char*+).
    "Request" byte arrays are constructed by Java code, which passes them to the JNI code that glues with the lib. "Reply" byte arrays are returned to the Java code, which analyzes them.
    The "return reply" part is very similar to this [tutorial example|http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html] , which returns bytes read from a file. However there's something I don't understand with regard to garbage collection of the returned byte array:
    - in this stock example, the C code creates a Java byte array fills it, and simply returns it (example code stripped to highlight only the parts relevant to my question):
        jByteArray=(*env)->NewByteArray(env, size);
        (*env)->SetByteArrayRegion(env, jByteArray, 0, size, (jbyte *)sourceBytes);
        return (jByteArray);What will happen to this Java array (jByteArray) with regard to garbage collection?
    - if it's no more referenced (the example Java code just systemouts it and forgets it), will it be eligible to GC?
    - if it is referenced by a Java variable (in my case, I plan to keep a reference to several replies as the business logic requires to analyze several of them together), do regular Java language GC rules apply, and prevent eligibility of the array to GC as long as it's referenced?
    That may sound obvious, but what mixes me up is that the same tutorial describes memory issues in subsequent chapters: spécifically, the section on "passing arrays states that:
    [in the example] the array is returned to the calling Java language method, which in turn, garbage collects the reference to the array when it is no longer usedThis seems to answer "yes" to both my questions above :o) But it goes on:
    The array can be explicitly freed with the following call:
    {code} (*env)-> ReleaseByteArrayElements(env, jByteArray, (jbyte *)sourceBytes, 0);{code}Under what circumstances would one need to explicitly free jByteArray when it's about to be returned to the Java calling method? Or does this sentence apply to completely different situations (such as, when the array is +not+ returned as is to a Java method)?
    The tutorial's next section has a much-expected +memory issues+ paragraph, from which I quote:
    By default, JNI uses local references when creating objects inside a native method. This means when the method returns, the references are eligible to be garbage collected.I assume this means, +unless the references are assigned, in the Java code, to a Java variable+, right?
    If you want an object to persist across native method calls, use a global reference instead. A global reference is created from a local reference by calling NewGlobalReference on the the local reference.I assume this enables the C code to maintain a global reference to a java object even if it's not referenced anymore from the Java variables, right?
    I also checked the [JNI specification|http://download-llnw.oracle.com/javase/6/docs/technotes/guides/jni/spec/design.html#wp1242] , but this didn't clear the doubt completely:
    *Global and Local References*
    The JNI divides object references used by the native code into two categories: local and global references. Local references are valid for the duration of a native method call, and are automatically freed after the native method returns. Global references remain valid until they are explicitly freed.
    Objects are passed to native methods as local references. All Java objects returned by JNI functions are local references. The JNI allows the programmer to create global references from local references. JNI functions that expect Java objects accept both global and local references. A native method may return a local or global reference to the VM as its resultAgain I assume the intent is that Global references are meant for objects that have to survive across native calls, regardless of whether they are referenced by Java code. But what worries me is that combining both sentences end up in +All Java objects returned by JNI functions are local references (...) and are automatically freed after the native method returns.+.
    Could you clarify how to make sure that my Java byte arrays, be they allocated in C code, behave consistently with a Java array allocated in Java code (I'm familiar already with GC of "regular" Java objects)?
    Thanks in advance, and best regards,
    J.

    jduprez wrote:
    Hello all,
    I am beginning with JNI, to integrate a C library that pilots an industrial equipment, into a java UI. This library enables to exchange various proprietary PDUs (protocol data units), with the equipment, up and down (request/replies). Both requests and replies are arrays of bytes (+char*+).
    "Request" byte arrays are constructed by Java code, which passes them to the JNI code that glues with the lib. "Reply" byte arrays are returned to the Java code, which analyzes them.
    The "return reply" part is very similar to this [tutorial example|http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html] , which returns bytes read from a file. However there's something I don't understand with regard to garbage collection of the returned byte array:
    - in this stock example, the C code creates a Java byte array fills it, and simply returns it (example code stripped to highlight only the parts relevant to my question):
        jByteArray=(*env)->NewByteArray(env, size);
    (*env)->SetByteArrayRegion(env, jByteArray, 0, size, (jbyte *)sourceBytes);
    return (jByteArray);What will happen to this Java array (jByteArray) with regard to garbage collection?It will be collected when it is no longer referenced.
    The fact that you created it in jni doesn't change that.
    The array can be explicitly freed with the following call:
    (*env)-> ReleaseByteArrayElements(env, jByteArray, (jbyte *)sourceBytes, 0);Under what circumstances would one need to explicitly free jByteArray when it's about to be returned to the Java calling method? Or does this sentence apply to completely different situations (such as, when the array is not returned as is to a Java method)?
    Per what the tutorial says it is either poorly worded or just wrong.
    An array which has been properly initialized it a just a java object. Thus it can be freed like any other object.
    Per your original question that does not concern you because you return it.
    In terms of why you need to explicitly free local references.
    [http://download-llnw.oracle.com/javase/6/docs/technotes/guides/jni/spec/design.html#wp16785]
    The tutorial's next section has a much-expected memory issues paragraph, from which I quote:
    By default, JNI uses local references when creating objects inside a native method. This means when the method returns, the references are eligible to be garbage collected.I assume this means, unless the references are assigned, in the Java code, to a Java variable, right?As stated it is not precise.
    The created objects are tracked by the VM. When they are eligible to be collected they are.
    If you create a local reference and do NOTHING that creates an active reference elsewhere then when the executing thread returns to the VM then the local references are eligible to be collected.
    >
    If you want an object to persist across native method calls, use a global reference instead. A global reference is created from a local reference by calling NewGlobalReference on the the local reference.That is not precise. The scope is the executing thread. You can pass a local reference to another method without problem.
    I assume this enables the C code to maintain a global reference to a java object even if it's not referenced anymore from the Java variables, right?
    It enables access to it to be insured across multiple threads in terms of execution scope. Normally you should not use them.

  • Exception :java.sql.SQLException: Duplicate entry '1-0' for key 1

    Help me in fixing this error
    Exception :java.sql.SQLException: Duplicate entry '1-0' for key 1
    1>>User_ID is primary key and unique and
    2>>User_ID is also auto Incremented
    3>>User_ID is the First coloumn in the table
    PreparedStatement ps=con.prepareStatement("insert into User(user_name,user_email,user_password) values (?,?,?)");
    ps.setString(1,s11);
    ps.setString(2,s22);
    ps.setString(3,s33);
    int i= ps.executeUpdate();

    A growing trend it appears. Must be some new high school and/or college curriculum regarding moral relativism.

  • FM CRM_BUPA_SALES_AREA_GET_ALL returns 0 entries for export parameter

    Hi Expert:
    When I used BAPI BAPI_BUPA_FRG0010_ADD to create sales area data ,it will call function module  CRM_BUPA_SALES_AREA_GET_ALL to get all active sales areas,but it returns 0 entries for export parameter ET_SALES_AREAS. So the sales area data check is failed,then the sales area data is not created. So did anyone have faced this problem before? And how to solve this problem?

    I finally find out the reason. It because the buffer. After I executed the program HRBCI_ATTRIBUTES_BUFFER_UPDATE, the function will return a sales area list.
    Regards
    Nika

  • Java.io.FileNotFoundException: JAR entry META-INF/wsdl/....

    Hi Guys!
    I am having the following problem with my webdynpro java application on CE 7.1:
    In one of my dc's i am calling another dc which is an ejb. The called ejb calls a webservice.
    (my dc --> ejb --> webservice)
    My dc has nothing to do with the webservice. It just calls an ejb which calls a webservice.
    Although I am getting a deploymentexception when I try to deploy my dc:
    Caused by: java.io.FileNotFoundException: JAR entry META-INF/wsdl/....*.wsdl not found in /usr/sap/..../..wscl.war
    I have no idea where I should put the wsdl file ...
    Hope anyone can help me.
    Cheers,
    Andi

    Sir
    If I am not wrong you itself had mentioned that : My dc has nothing to do with the webservice. It just calls an ejb which calls a webservice.
    Now I wanted to know about your workaround also request you to go at metadata file of your DC and chck that whether it contain the reference of the EJB or Webservice.
    One more point  : exception is FileNotFoundException so might you have manually put the reference of WSDL url/uri inside EJB xml file ??
    Best Regards
    Satish Kumar
    Edited by: satish jhariya on Mar 24, 2010 2:20 PM

  • Java.lang.IllegalStateException: Locked entries

    Hi,
    My colleagues create an ADF application which is migrated from Jde 11.1.1.1. After migeration, they use Jdev11.1.1.2 to modify this application.
    They have a button. After the button is clicked, an exception appears and the page goes to the error page.
    They have to back to the original page from web browser.
    Caused by: java.lang.IllegalStateException: Locked entries
    [Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads]->]
         at fuego.pool.TimedMultiValuatedCache.clear(TimedMultiValuatedCache.java:384)
         at fuego.connector.impl.pool.PoolManager.stop(PoolManager.java:71)
         at fuego.connector.impl.BaseJDBCConnector.stop(BaseJDBCConnector.java:296)
         at fuego.connector.ConnectorService.stopService(ConnectorService.java:778)
         at fuego.connector.ConnectorService.stop(ConnectorService.java:486)
         at fuego.connector.CompositeConnectorService.restartDirectoryConnectorService(CompositeConnectorService.java:54)
         at fuego.directory.DirectoryConfigurationManager.loadDirectoryConfiguration(DirectoryConfigurationManager.java:395)
         at fuego.directory.DirectoryConfigurationManager.getDirectoryConfiguration(DirectoryConfigurationManager.java:331)
         at fuego.directory.DirectoryConfigurationManager.getDirectoryConfigType(DirectoryConfigurationManager.java:313)
         at fuego.directory.provider.Factory.getDirectoryFactory(Factory.java:216)
         at fuego.directory.Directory.fillPassport(Directory.java:123)
         at fuego.directory.DirectoryPassport.fillPassport(DirectoryPassport.java:275)
    ####<2009-12-22 CST> <Error> <org.apache.beehive.netui.pageflow.internal.AdapterManager> <WINDOWS-D6GMTZ2> <AdminServer>
    <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1261469009637> <BEA-000000> <ServletContainerAdapter manager not initialized correctly.>
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused By: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: The Network Adapter could not establish the connection
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:256)
    ####<2009-12-22 CST> <Error> <org.apache.beehive.netui.pageflow.internal.AdapterManager> <WINDOWS-D6GMTZ2> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1261473870326> <BEA-000000> <ServletContainerAdapter manager not initialized correctly.>
    Caused By: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: The Network Adapter could not establish the connection
    ###<2009-12-22 下午05时24分25秒 CST> <Error> <Deployer> <WINDOWS-D6GMTZ2> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1261473865443> <BEA-149205> <Failed to initialize the application 'ysjk109' due to error weblogic.application.ModuleException: .
    -----------------------------------

    Hi,
    I paste this thread in Weblogic forum. However, I have not get any solution.
    The ADF application is created by developers. Then, it is deployed to a Weblogic (10.3.2) domain.
    Testers start to testing functions. Every tester has a username to login the deployed adf application. Each username is unique. The above exception only appears in the deployed application during testing.
    Developers have their own usernames and each username is unique and different from usernames of testers.
    Developers run this application in the weblogic installed with jdeveloper on their machines and this exception has not appear.

  • Java.exe return codes - windows

    I have a java application being run from a batch file on WindowsNT4sp6a using Sun's j2se 1.3.0 (build 1.3.0-C) with Java Hotspot (TM) Client VM (build 1.3.0-C, mixed mode) and during the course of running the app (confirmed that it happens at different places in the app by observing logs), the VM simply dies with no exceptions thrown that my java app can catch.
    But, using MS batch environment variable ERRORLEVEL, I observe that the java.exe is returning 3 as the return code. I also have observed that java.exe returns 0 normally.
    Can anyone clue me into where I can find info about what return code 3 is?
    Also, are there any VM log/tracing mechanisms I can turn on to help debug this problem?

    Thank you for your reply.
    But, this is why this is so weird ... I am the programmer (well, maintenace programmer), and the java program is not using System.exit(), therefore, the java.exe should return 0 (zero) when the end of the main() is reached (right?).
    But, it doesn't, it returns 3 ....
    Well, I know the end of the main() is not being reached (because the program is not completing its' task). Plus, all the code is wrapped in try { ... } catch(Exception e) { e.printStackTrace(); } ... and no exceptions!
    Then, I wrapped all that in try { ... } catch(Error err) { System.out.println("caught an error!"); } ... but no dice, whatever is happening, it is out of the control of my java program.
    What could this mean, I am assuming (and correct me if I am wrong) that if I don't call System.exit(3), then it must be the jvm itself returning that code (3) .... and probably due to an internal error ... and I would assume the internal error is in some manner being caused by my code, but if I had a list of possible return codes for this specific jvm implementation and their meanings, then I would have an idea of what to look for in the code.
    I was just hoping someone could point me in the right direction on this forum quickly, but I guess I will have to earn my pay and figure it out the old fashioned way ... work!.
    Just to add:
    My current game plan is to check all the JDBC code, it looks as if not all the Statement and Connection objects are being closed properly before new ones are created (don't ask). It uses the sun.jdbc.odbc.JdbcOdbcDriver and I have heard it can be buggy if you don't properly close those things.

  • MAI monitoring templates vanished (SolMan 7.1 SP10)

    Hello all,
    it seems like almost all of our MAI monitoring templates have vanished in our SolMan 7.1 SP10 system.
    I still get the traingles were templates existed, but when expanding on them the won't Show up.
    I updated SAP Service Content yesterday and SAP Monitoring Content today to the latest version.
    I'm nor sure if this really caused the trouble.
    Does any of you ever have experienced something similiar?
    Best Regards,
    Thorsten

    Hello,
    the question was answered by SAP Support.
    One has to be logged on in the language in which the templates were created / maintained.
    I switched from German to English last week, so that's the reason why.
    Regards,
    Thorsten

  • OVD plugin returning "Virtual" entry when entry not yet available in OID

    Hi,
    We've been working on a solution in which a new user has to get immediate access to a website and we, because the provisioning is taking some time, we have implemented a plugin for OVD which basically looks in the OID and if the user exists in OID it will return that entry and otherwise will create an virtual entry (it is not stored in OID) and return this entry to the requestor.
    Now this al looks like it is working fine but the requester, OAM in this case, reacts different on a "virtual" entry then a non virtual entry. When it is a "virtual" entry not al headers are filled by OAM. So my question is if there is someone out there who has done something simliar and/or knows why this is happening, because we tried everything and still face this problem. Any help would be appreciated!
    Br,
    Sarris

    Hi Flanjman,
    Additional this article may give you more tips.
    https://connect.microsoft.com/SQLServer/feedback/details/674454/name-resolution-not-yet-available
    I’m glad to be of help to you!
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Using java monitor

    Hi. I'm trying to learn how to use and manage the java monitor, but in this case I cannot understand the behaviour. I create some threads instances of a class with this run() method:
    public synchronized void run()
       while (!free) {try {this.wait();} catch (InterruptedException e) {}}
       free = false;
       // Show some text...
       free = true;
       notify();
    ...free is a boolean, and I would like each thread to run in mutual exclusion. free is at the beginning false. The problem is that after the end of the first thread, no other thread is started by notify(). Shouldn't the notify allow some other thread to reconsider the condition (!free)?
    Thanks for any explaination.

    I do need the threads to communicate. The fact is that I simplified the thing just to understand better responses from you :). The real problem is more complicated. I have a arbitrary number of threads of two different classes. These threads have to access a shared resource (I used the boolean free). Moreover I have to give precedence to one of these two classes. So, I used to integers to represent two queues. The fact is that only the first thread to be ran reaches the end. The others, I saw, reach the wait() method, but then they stops and the program does not finish.
    I mean that I thought this: the first thread to reach the wait() passes. Then, this first thread starts to use the resource (free becomes false). Every other thread which reach the while(...) stops there (there is the wait()). Then the first process, at a particular time, release the resource (free = true) and communicate this to another thread which was stuck at the wait() instruction (through the notify()). The problem I see is that every thread reach the wait() and stops there. After the first one is finished, no more... The notify() does not give the monitor to another thread (which would find free = true). This is my problem. Do you understand?
    Many thanks for yuor answer anyway.

  • Java Monitor in NWA - Sessions chart

    I'm having trouble understanding the Sessions chart in NWA for the Java Monitor.  I would like to know what the InvalidSessionCount key figure is all about.  I can understand ActiveSessionsCount and LogoffSessionsCound, but what does InvalidSessionsCount mean.  Ours seem to grow rather quickly (much higher than our ActiveSessionsCount) and I need some help understanding what action I need to take (if any).
    thanks
    Eric

    Eric,
    Basically this monitor shows the number of sessions that have been invalidated and not yet garbage collected. Unfortunately the java applications have no control of the time when the garbage collector will be run -  this is decided by the JVM itself, but if the memory occupied by these objects is needed they will be garbage collected. When the memory utilization reaches the MaxHeapSize or MaxPermSize limit, Full GC is triggered
    by the JVM which reclaims the memory from the dead objects and the space is freed.
    So, as long as you don't experience performance issues you can relax!
    Cheers!
    Bidwan

  • Optimal configurations for webobjects using Java Monitor

    Can someone please let me know the optimal configurations for webobjects? We need details on the number of instances which can be created per cpu on the application server. Please also provide information on the thread configurations per instance in java monitor.

    I do need the threads to communicate. The fact is that I simplified the thing just to understand better responses from you :). The real problem is more complicated. I have a arbitrary number of threads of two different classes. These threads have to access a shared resource (I used the boolean free). Moreover I have to give precedence to one of these two classes. So, I used to integers to represent two queues. The fact is that only the first thread to be ran reaches the end. The others, I saw, reach the wait() method, but then they stops and the program does not finish.
    I mean that I thought this: the first thread to reach the wait() passes. Then, this first thread starts to use the resource (free becomes false). Every other thread which reach the while(...) stops there (there is the wait()). Then the first process, at a particular time, release the resource (free = true) and communicate this to another thread which was stuck at the wait() instruction (through the notify()). The problem I see is that every thread reach the wait() and stops there. After the first one is finished, no more... The notify() does not give the monitor to another thread (which would find free = true). This is my problem. Do you understand?
    Many thanks for yuor answer anyway.

Maybe you are looking for

  • EFI install - NO OS installed (formerly 10.5)

    Hi, I've had a problem with the OS on my MacBook Pro (mid-2009, 13") and I can't install OS X 10.5 back on, i've read that it's possibly something to do with the EFI bootloader. Is there any way to install the EFI bootloader, WITHOUT an OS installed?

  • Stopwatch Font too thin!

    Is it possible to change the font for the stopwatch spp for the ipohone in I OS 7. I have changed the phone to bold, and it does not effect the stopwatch application. The lap counter is currently presented in a thin grey font, that is almost impossib

  • How to capture element/attribute

    We have an export client that converts the Frame file to xml. We are using "LightTitle" element at various places, this element also has an attribute called "LightColor". When I look at the output xml, I can see all LightTitle elements, but only some

  • SCUP update failure: Error and 0x800b0004 and 0x80246002

    Hi, I'm trying to get Adobe products using SCCM2012R2 and SCUP 2011.  The site server and distribution point are on the same machine, and the WSUS server sits on a different machine.  We have a root CA which uses AD Certificate Services.  My code sig

  • BBP_MON_SC - Disable ability to Delete

    Hello Community, We would be interested in making the BBP_MON_SC tool available to several users, however, we do not what to give them the ability to delete the shopping carts. Can someone tell me if you have disabled this functionality, and how you