Application error  when calling CallStaticVoidMethod

Dear all,
I'm calling a C-written program from java. The C-routine opens a usb dongle and gets data in a callback function. Each time when I call a CallStaticVoidMethod in order to return the data to my java counterpart, I get an Application Error which says: The instruction at "0x6d701845" referenced memory at "0x00000090". The memory could not be read. It looks like I'm calling the wrong method, but I can't get around this problem. I don't get a stacktrace and I don't get a java callback method called.
Any help is appreciated. See below for the code.
Regards,
Jeroen.
<c-code>
// Need global access to jclass and jmethod...
typedef struct
Bool connect;
int dongleId;
jclass WIN32_class;
jmethodID WIN32_method;
jmethodID WIN32_methodHw;
JNIEnv* WIN32_jenv;
int type;
} TState;
TState state;
JNIEXPORT jint JNICALL Java_com_philips_aurora_tools_nal_1interface_sniffer_StkUsbJni_connect
(JNIEnv * env, jobject obj, jint dongleId)
state.WIN32_jenv = env;
state.WIN32_class = (*env)->GetObjectClass(env, obj);
state.WIN32_method = (*env)->GetStaticMethodID(env, state.WIN32_class, "callback", "([B)V");
state.dongleId = dongleId;
errCode = (usbConnect)(dongleId,
(LPARAM) NULL /*??*/, // Don't use windows handles
(void*) receiveCallback,
(void*) handleNotifyCallback,
addr,
0x1 /*?*/);
static void receiveCallback(UCHAR dev, PUCHAR pMsg)
jbyteArray data = NULL;
int i, msgLength = 0;
data = (*state.WIN32_jenv)->NewByteArray(state.WIN32_jenv, msgLength);
(*state.WIN32_jenv)->SetByteArrayRegion(state.WIN32_jenv, data, 0, msgLength, (jbyte *)pMsg);
(*state.WIN32_jenv)->CallStaticVoidMethod(state.WIN32_jenv, state.WIN32_class, state.WIN32_method, data);
// BOOM!
(*state.WIN32_jenv)->ReleaseByteArrayElements(state.WIN32_jenv, data, (jbyte *)pMsg, 0);
(usbFree)(state.dongleId, pMsg);
</c-code>
<java-code>
public final class StkUsbJni implements StkUsbInterface {
     public native int connect(int dongleId);
     public native int disconnect();
     static void callback(byte[] aMessage) {
          StkCallBack.mwToolingMsg(aMessage);
</java-code>

Holding on to JNI info actually works very well like this.The fact that you have gotten it to work sometimes doesn't mean it is correct, it just means you were lucky.
stack is updated (corrupted) when I'm running in java.Which of course means that your C code is wrong.

Similar Messages

  • Error when calling up the application function for hierarchies

    Hello,
    if I try to load a material class hierarchy and the loading is failing directly in source system with error message "Error when calling up the application function for hierarchies". Did anybody have this problem? I could not find anything iside the forums.
    Thanks for your help!
    Regards,
    Christian

    Hi,
    I have the same problem. Do someone know the solution? What is the problem?
    Thanks,
    Ángel.

  • 401 Unauthorized Error When calling a SharePoint REST web service from SharePoint 2013 Workflow

    We have our Workflow Manger installed on the same server as our SharePoint 2013 WFE development environment. When creating a SharePoint 2013 Workflow all Calls to a SharePoint 2013 REST web service results in a 401 Unauthorized error.
    As an example I created a simple workflow that should return a JSON result. The REST Url returns the results in the browser without error.
    Set Variable:webServiceUrl to https://<hostnamedsitecollection>/_vti_bin/client.svc/web/lists/getbytitle('ISR%20Approvers')/Items?$select=Title&$filter=Title%20eq%20%27General%27
    then Build{...} Dictionary (Output to Variable:requestHeaders)
    then Call [%Variable:webServiceUrl%] HTTP web service with request (ResponseContent to Variable:responseContent |ResponseHeaders to responseHeaders | ResponseStatusCode to Variable:responseCode)
    The RequestHeader is set to the requestHeaders variable though the web service call properties
    then Log Variable:responseCode to the workflow history list
    After manually running the workflow in SharePoint on a list item in the ISR Approvers list it Logs "Unauthorized" in the Workflow History Log. It does this with every SharePoint REST web service call that I have tried through the workflow.
    It doesn't have anything to do with the Workflow Manger being installed on the same machine as the SharePoint WFE does it?
    Thank You for any insight

    Hi,
    According to your post, my understanding is that you had 401 Unauthorized Error when calling a SharePoint REST web service from SharePoint 2013 Workflow.
    Please make sure you use the ‘Call HTTP Web Service’ correctly.
    You can enter the URL into the brower to check whether it is correctly.
    You need to
    create the Request header requestHeaders
    using a Dictionary:
    Accept : application/json;odata=verbose
    Content-Type : application/json;odata=verbose
    To associate the
    requestHeaders variable, select the Call action
    property, set the RequestHeaders property to
    requestHeaders.
    Please refer to the following articles:
    Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013
    Calling the SharePoint 2013 Rest API from a SharePoint Designer
    Workflow
    In addtion, you need to make sure you install the workflow manager correctly.
    More information:
    Install and configure workflow for SharePoint Server 2013
    Known Issues in Workflow Manager 1.0
    Troubleshooting Workflow Manager 1.0 Management and Execution
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • 500 Internal Server Error - When calling LOV's

    I receiving the following error when calling a LOV.
    Both date LOV's and LOV's based on a foreign key fail.
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:D:\Oracle\oc4j\j2ee\home\application-deployments\ois\web\persistence\_pages\_jheadstart\_lovFrame.java
    error: Invalid class file format in C:\Program Files\Java\j2re1.4.0\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand.
    D:\Oracle\oc4j\j2ee\home\application-deployments\ois\web\persistence\_pages\_jheadstart\_lovFrame.java:0: Class java.lang.Object not found in class com.orionserver.http.OrionHttpJspPage.
    package _jheadstart;
    ^
    2 errors

    Marcel,
    JDeveloper will not run out of the box with JDK 1.4. There is a help topic 'Configuring Support for JDK 1.4.0.01 in JDeveloper' that gives you some information.
    But you also need to verify the compatability of all the frameworks you use with JKD 1.4, including BC4J, MVC and UIX. E.g. the classes12.jar we normally use for a JHeadstart application only works with JKD 1.2/1.3.
    Having found out which versions of the frameworks you need, the next step is to validate whether the JHeadstart runtime classes will work with these versions. We have no experience ourself in this respect.
    If it is an option for you, you might consider to downgrade to JKD 1.3.
    Jan Kettenis

  • JAX-WS client error when calling web method

    My JAX-WS client is getting the following error when calling a web method:
    Exception in thread "main" javax.xml.ws.WebServiceException:
    No Content-type in the header!
    I'm using Eclipse as my development environment. I use the CXF facet to generate a WSDL from Java code. I then use the New -> Web Service Client to generate client side code from the WSDL.
    The following fully describes my environment:
    Windows XP
    JDK 1.6.0_22
    Java EE 6
    Eclipse Helios
    Apache CXF 2.3.0 (runtime)
    Tomcat 6.0
    I have found several post on the net that describe this problem and a solution for JBoss, but I have been unable to find anything that addresses this error on Tomcat.
    I can provide source code if needed. The app is a simple Hello World web service. I'm using it to try and get familiar with developing web services with all the components listed above.
    Thanks

    Hi Anders,
    The resolution of the crossdomain problem is not to store an cross-domain-policy file at the [SAP] webservice side; but instead it needs to be done at the (every...) webservice client. In case the client is an IIS based webapplication (and thus the ultimate end-users are accessing it via their browser), this is not such an issue. It there is sufficient to put an crossdomain.xml policy file in the IIS main virtual root of your 'client' .net webapplication (c:\inetpub\wwwroot). It also can be required or at least helpful to put a clientaccesspolicy.xml file; both at the main virtual root and in the virtual root of the specific webapplication
    In case of SharePoint application, the crossdomain.xml file must be stored in the WSS virtual root of that site; c:\inetpub\wwwroot\wss\virtualdirectories\<your SharePoint webapp>
    Best regards, William.

  • Error when calling SOAP Runtime functions - Please help!

    Hi,
    Very new to SAP. I just installed SAPNW7.0ABAPTrialSP12 (sandbox server, with default options) and setup the
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/db/7c623cf568896be10000000a11405a/content.htm">Flight Data</a>.
    I wanted to invoke some of the Flight Data functions through SOAP. So I invoked the following URL:
    http://localhost:8000/sap/bc/srt/rfc/sap/BAPI_FLIGHT_GETDETAIL?sap-client=000&wsdl=1.1
    I get the following error:
      The following error text was processed in the system NSP : Error when calling SOAP Runtime functions
    The error occurred on the application server hs_NSP_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
          Method: HANDLE_REQUEST of program CL_SOAP_TRANSPORT_EXTENSN_ROOTCP
          Method: HANDLE_REQUEST of program CL_SOAP_HTTP_EXTENSION========CP
          Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_SOAP_HTTP_EXTENSION========CP
          Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
          Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
          Module: %_HTTP_START of program SAPMHTTP
    FROM Runtime Error Log:
    Runtime Errors                     UNCAUGHT_EXCEPTION                                                          
    Exception                          CX_SOAP_CORE
           Termination occurred in the ABAP program "CL_SOAP_TRANSPORT_EXTENSN_ROOTCP" -                
               in "HANDLE_REQUEST".                                                                               
    The main program was "SAPMHTTP ".                                                                               
    In the source code you have the termination point in line 37                                 
              of the (Include) program "CL_SOAP_TRANSPORT_EXTENSN_ROOTCM004".
    Does anyone have any ideas on what is going on? Thanks in advance.

    Hi,
    Have a look at this blog from Michal Krawczyk to find a solution:
    The specified item was not found.
    Hope this helps,
    Grzegorz

  • LV 6.0.2: an App-built dll gives a runtime error when called by C

    I want to use Labview 6.0.2 VIs as DLL's in a Borland C++ Project.
    Starting with the simple I have made a VI that returns a constant int32 then built a dll with the Application Builder and put the dll and include file in a BC++ project directory. Compile and link seems to run well. But when excuting the call to the LV fuction gives Fatal Error: labview.lib was not called from a Labview process.
    It seems this question was posted before, but answer didn't help me, Sorry.
    7.1 -- 2013
    CLA

    Hi Gabriela -
    This question is answered in the KB article entitled : "LabVIEW.LIB Error When Calling a DLL Built with LabVIEW"
    The link for this document is -> http://ae.natinst.com/operations/ae/public.nsf/fca7838c4500dc10862567a100753500/a4c3aef93240280a86256931006fb66c?OpenDocument
    Or you can go directly to www.ni.com/support and search for this document and others to help.
    The reason for this is that the old labview.lib does not know how to correctly locate the LabVIEW Run-Time Engine when called.
    From the document I posted ->
    Your dll is most likely making a call If you want to call a Windows DLL or CIN built with a version of cintools before LabVIEW 6.0, you must relink the DLL with the labview.lib from 6.0. If you call an old DLL or CIN in your LabVIE
    W DLL, you receive the aforementioned error and the application terminates, because the old labview.lib does not know how to correctly locate the LabVIEW Run-Time Engine when called in this situation.
    Good luck-
    ben schulte
    national instruments

  • Question: Application error when using SOAP sender

    Hi,
    I got the following error when calling SOAP sender:
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="UNKNOWN">APPLICATION_ERROR</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>application fault</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="http://xml.apache.org/axis/">hostname</SAP:ApplicationFaultMessage>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    The return message is:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
      <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">gdcn-admin</ns2:hostname>
    From the runtime monitor, it shows:
    SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault
    Actually I maintained the host name in file hosts. And with XMLSpy, I can directly connect the Webservice successfully, but with XI, it stops me at this point. It seems the connection has been established, because if the WebService is stopped, I will get error HTTP 0 Null, If it's started, I get the above problem.
    Could you please provide the hints.
    Thanks a lot!
    Best Regards
    Yuedong

    Hi,
    I found the problem:
    It's because of the wrong format of message. the message is created with a WSDL file generated by external development system, but it's not correctly explained by XI. I manually created the messge (request & response), then it worked.
    Actually the error has nothing to do with hostname. it means the host returns application error (but unfortunately there is no detailed information).
    Thanks a lot for your kindly help!
    Best Regards
    Yuedong
    By the way, how can I reward the point?
    Message was edited by: Yuedong Chen

  • Error when call RFC Function module in R/3

    Dear All,
    We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
    we are facing the error "Error while lookup Exception during processing the payload. Error when calling an adapter by using the communication channel CC_PPPI_MES_RFC_Rcvr (Party: , Service: WCD_320, Object ID: 16563889b449328eac76caa6a3bc592e) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'."
    This is the first time we are doing this configuration.
    Could you please let me know what woulbe the reason.

    read the original message
    We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
    I am talking about the above Receiver RFC channel which you guys are using to call R/3 from XI. That where you need to change the commit parameter

  • Error when calling a Webservice's public method in Forms10g

    Hi,
    I'm getting the following error when calling a webservice's public method, i'm using Forms10g 10.1.2.3
    java.rmi.RemoteException; nested exception is: HTTP transport error javax.xml.soap.SOAPException
    java.security.PrivilegedActionException javax.xml.soap.SOAPException
    Message send failed javax.net.ssl.SSLException SSL handshake failed X509CertChI have added the Jar containing the client proxy in both Classpaths(system variable and default.env), the jar has been made with jdk 1.4
    I also have tested the client proxy from jDeveloper and it's working there, but in Forms i'm getting this error.
    I guess my problem might be that i'm calling a webservice that is secured since the url starts with https
    what should i do to fix this ??
    Regards
    Carlos

    I understand, so i have a doubt, why the webservice works on jDeveloper ??Not just JDeveloper even soapUI and Neatbeans have a way of working without a client certificate installed.
    I do not know how they achieve it. I know that they work without a client DC.
    Cheers,
    PS: See this http://stackoverflow.com/questions/8887434/webservices-ssl-https, it offers a clue.
    The java programs run unhindered when one-way authentication is being used. These products ship with a digital certificate that is in the path of most popular CAs.
    Corollary, if the Web Server is configured for mutual authentication then you need to install and configure the client certificate in the tools.
    Edited by: Prabodh on Dec 5, 2012 8:36 PM

  • ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http

    I am getting error message ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http PL/SQL package,
    when browsed through some of the messages they point to setting Oracle Wallet Manager.
    I am trying to connect
    Any idea on how to resolve this issue ?
    your input is appreciated.
    Thanks
    Ravi

    Duplicate post ... please ignore.

  • ORA-03115 error when calling a Stored Procedure

    Hi All,
    I'm in the process of porting a Pro/C app from NT to Linux. I've installed 8.1.5 on our Linux box and patched it up to 8.1.5.02.
    It all kind of works ok, except that I'm sometimes getting ORA-03115 errors when the app calls a stored procedure. The call in question looks like this:
    EXEC SQL BEGIN DECLARE SECTION;
    VARCHAR resprows[50][3998];
    int numret = 0;
    int numrows= 50;
    int done= 0;
    unsigned long resp_id = 0;
    EXEC SQL END DECLARE SECTION;
    EXEC SQL AT DB_NAME EXECUTE
    BEGIN pkg_something.getdata(
    :resp_id, /* IN */
    :numrows, /* IN */
    :done, /* OUT */
    :resprows, /* OUT */
    :numret /* OUT */
    END;
    END-EXEC;
    The stored procedure basically uses the resp_id value to select rows from a table;
    in each row there is a VARCHAR2(4000) column which it copies into the hostarray resprows.
    There may be anything from 1 to numrows returned from the SP.
    Initially, the resprows rows were defined to be size [4000]. Unfortunately, this caused ORA-02005 errors - I then changed the size to [3998], which seemed to fix the 02005's (although I'm unclear as to the reasons why).
    Now I'm getting the 03115 errors when calling the SP. The oracle manual is not very helpful on what this error means.
    This all works chipper on NT.
    Any ideas?
    Thanks in advance,
    Nigel.
    PS: The database the app is talking to is still hosted on NT.
    null

    Histon FTM wrote:
    ORA-04063: package body "LAZARUS.LAZARUS" has errors Above, obviously conflicts with the statement that follows:
    >
    The procedure and package have both compiled without errors and the statement on its own works fine in SQL*Plus.I suggest you take a look in the USER_ERRORS view to see, what the errors are.
    And just checking:
    You have schema called LAZARUS, which holds a package named LAZARUS, which holds a procedure called POPULATEGRIDPOSITIONS?
    Edited by: Toon Koppelaars on Oct 1, 2009 5:55 PM

  • Error when calling SOAP Runtime functions

    Hi Guys,
    I have a requirement in which i have to consume a webservice and get a response from it but when i consumed the web service and tried to test it i got the below error please let me know solution for this as it is very urgent and also i am very new to web services stuff
    Error when calling SOAP Runtime functions: SRT: Processing error in Internet Communication Framework: ("ICF Error when receiving the response: ICM_HTTP_CONNECTION_FAILED")
    Thanks
    shivraj

    Hi,
    Have a look at this blog from Michal Krawczyk to find a solution:
    The specified item was not found.
    Hope this helps,
    Grzegorz

  • Application crashes when calling run_report_object , FRM-93652: The runtime process has terminated abnormally

    I got this error when calling report from my form:
    FRM-93652: The runtime process has terminated abnormally
    Forms Session ID is WLS FORMS.formsapp.101
    Here is the trace dump info :
    Last Trigger  FORM/BLOCK/FIELD: FRM_ACTIVITY_QUEUE.BLK_ACTIVITY_QUEUE.BTN_PRINT
    Last Trigger: WHEN-BUTTON-PRESSED - (In Progress)
    Last Builtin: RUN_REPORT_OBJECT - (In Progress)
    ----- Call Stack Trace -----
    calling              call     entry                argument values in hex
    location             type     point                (? means dubious value)
    siehDumpStackTrace(  call     kgdsdst()            000000000 ? 000000000 ?
    )+104                                              7FFFBF18D110 ? 7FFFBF18D1D8 ?
                                                       7FFFBF1AD130 ? 000000000 ?
    siehjmpterm()+650    call     siehDumpStackTrace(  000000000 ? 2B1668E4EB00 ?
                                  )                    7FFFBF18D110 ? 7FFFBF18D1D8 ?
                                                       7FFFBF1AD130 ? 000000000 ?
    __restore_rt()       call     siehjmpterm()        00000000B ? 2B1668E4EB00 ?
                                                       7FFFBF18D110 ? 7FFFBF18D1D8 ?
                                                       7FFFBF1AD130 ? 000000000 ?
    00002B1660459EB0     signal   __restore_rt()       2B16603F2929 ? 7FFFBF1ADBD8 ?
                                                       000000000 ? 000000002 ?
                                                       000000001 ? 0EBC57ED8 ?
    Anybody knows what might be the cause ?
    Thanks

    Refer to : Oracle Support :  Forms Runtime Crash (FRM-93652) When calling RUN_REPORT_OBJECT in 11g (Doc ID 1306368.1)

  • ERROR: Error when calling IDOCTYPE_READ_COMPLETE:OBJECT_UNKNOWN

    Hi,
    We are having a problem in processing (receiving) an idoc through our RFC client in SAP .
    The RFC Client is up and running however, turns red while processing a certain Idoc.
    The error occured:
    Error when calling IDOCTYPE_READ_COMPLETE:OBJECT_UNKNOWN (IDoc /).
    This issue has been occurring since August 18-23. if the status of the RFC client is green, its shows: Waiting for IDOC.
    My questions would be:
    1) If for example, there are 50,000 idocs that are being sent and the first 1000 contains an error, will it still process the 49,000 idocs left through RFC client?
    2) what are the possible errors of an idoc which causes the RFC client to be down (having the error above)? is it the format of the idoc? or the idoc_type itself?
    3) another instance would be, if they are resending the idocs again, the RFC will be up eventually and we'll be able to receive the idocs. what are the causes for this?
    4) are there any ways to track these idocs (which contains the error) in BODI or in SAP?
    5) what are the alternative ways of processing the idocs that contains an error?

    I think there is a misspelling in your IDOC type (in header of IDOC probably)
    or the IDOC type does not exist on your SAP system
    you call function IDOCTYPE_READ_COMPLETE remotely on SAP server and this falls into error with exception 1 (OBJECT_UNKNOWN)

Maybe you are looking for

  • Mid month joiners PF Projection Issue

    Hi Team, We have an issue with respect to PF Projection for the employees who joined in mid month. We are on actual basis as an income tax projection. Employee joined on 16.04.2014 and his basic is 20,000 rupees. Since he joined in mid month his PF w

  • Application vs. Servlet

    I have an application that parses an XML file whose URL is received as a parameter. I have created a servlet that calls this application. I changed the main methods to callable "public void MethodName()". The servlet needs to call one class and then

  • What are the appropriate document/stage dimensions in Flash for tablet optimized apps?

    What are the appropriate document/stage dimensions in Flash (width x height in pixels) for tablet optimized apps? (Dec. 2013) Using Flash and AIR for Android/iOS I would like to develop a educational interactive title optimized for tablet PCs, hopefu

  • Creating pdf from MS Word 2007

    I have Acrobat pro 7.1.0., Windows XP, Office 2007. Creating pdf when I had Office 2003 worked just fine. With a 2007 document I get the message "Missing PDFMaker files. Do you wand to run the installer in repair mode?" I tried that without success.

  • Java(FX) Property Compiler

    Hi! We implemented a small Java(FX) Property Compiler which enables you to use a powerful PropertyHint-annotation. The "compiler" is implemented as an Post-"Java Compiler"-Bytecode-Modification-Tool (using asm-4). Here are 3 small example so you can