FATAL ERROR in native method: JNI call made with exception pending

Hi everyone,
I am trying to resolve this error exhaustively for the last 3 days.
I have a 3rd Party DLL library which i am supposed to use from my Java Application. I compiled my own DLL that links(calls methods) the Java code and the the 3rd party DLLs.
It works fine in my machine and 2 of my other colleagues but does work for the QA tester. The JVM crashes when it comes to the point of loading the DLL with the exception mentioned above.
For the QA tester, a version of the DLL made in VC7.1 works fine, but the one we are trying to load was made in VC80.
It also has the dependency dll like msvcr80.dll and msvcp80.dll
We both have Windows XP and same the JVM (1.4)
Please Help !!!!!!!
Thanks,
Zuber

I would suggest further investigation of dependencies. If the QA machine doesn't have VC 8 check what the diffs are there.
Jim

Similar Messages

  • FATAL ERROR in native method

    Dear all,
    I am working on a MacOSX. I am having trouble in using a Dynamic Library generated from C files and accessed from a java project using JNI.
    The loading of the library work well bur when i try to access a method I have the following error:
    FATAL ERROR in native method: JNI received a class argument that is not a class
         at cytosolve.sbmlSolver.SBMLSolver.initSolver(Native Method)
         at cytosolve.sbmlSolver.SBMLSolver.<init>(SBMLSolver.java:87)
         at cytosolve.sbmlSolver.cytosolve.main(cytosolve.java:29)where the Native method inside the C file is the following:
    JNIEXPORT jint JNICALL
    Java_cytosolve_sbmlSolver_SBMLSolver_initSolver(JNIEnv *env, jobject obj, jstring model_filename, jdouble totalTime, jint numSteps)and it is called from the Java file as:
    int successCode = initSolver(model_filename, totalTime, numSteps);Do you have any idea on where is the problem and how to fix it?
    Thank you,
    Eva.

    Everything seems to be right. Maybe you use JNI functions inproperly?

  • FATAL ERROR in native method: Wrong Method ID

    I have a piece of C code from which I am trying to launch a piece of Java, but I am having severe problems just trying to get a simple integer value returned from any Java function. I keep getting the error message "FATAL ERROR in native method: Wrong method ID used to invode a Java method"
    My C code looks like :
    JNIEnv *env;
    long result;
    jmethodID mid;
    jclass cls;
    jobjectArray args;
    jstring jstr;
    jint res;
    jobject myObj;
    options[0].optionString = "-Djava.class.path=.";
    options[1].optionString = "-Djava.compiler=NONE";
    options[2].optionString = "-verbose:jni";
    vm_args.version = JNI_VERSION_1_2;
    vm_args.options = options;
    vm_args.nOptions = 2;
    vm_args.ignoreUnrecognized = JNI_FALSE;
    // Create the Java VM
    result = JNI_CreateJavaVM(&jvm,(void **)&env, &vm_args);
    if (result == JNI_ERR )
    printf("Can't create Java VM\n");
    exit(1);
    else
    printf("Java VM created successfully\n");
    cls = (*env)->FindClass(env, "Example1");
    if (cls == 0){
    printf("Can't find Class\n");
    exit(1);
    else
    printf("Class Found\n");
    mid = (*env)->GetMethodID(env, cls, "GetIntValue", "()I" );
    if (mid == 0) {
    printf("Can't find function\n");
    exit(1);
    else
    printf("Function Found\n");
    res = (*env)->CallIntMethod(env, cls, mid);
    if (res != 0)
    char pszTempString[256] = {'\0'};
    sprintf (pszJavaString, "Returned from Java the value of %d", res);
    printf("Returned from Java with ");
    printf(pszJavaString);
    My GetMethodID call works correctly and I have checked the signature (using javap -s) and that works fine. I've seen many references on these forums about using NewObject prior to calling CallIntMethod, but if I try to use that I then get the error message "FATAL ERROR in native method: a non-constructor passed to NewObject".
    Any body got any ideas please.
    Thanks

    What I couldn't figure out from your code is where you create the java object that is supposed to return the integer to your C code.
    Alternatives:
    o This is just code snippets, and you really are creating the object.
    o Error - the object should have been created.
    o Error - it is a static method, and you should be finding a static method and calling it on a class object.
    (Other than that, I didn't see anything obviously wrong.

  • FATAL ERROR in native method: Wrong method ID used to invoke a Java method

    When calling the same method second time , I get message ::
    <FATAL ERROR in native method: Wrong method ID used to invoke a Java method>
    void myFunction(int myVal)
    JNIEnv *env = NULL;
    jclass odbcconnls;
    jint res;
    printf("\nInitilaizing class ");
    res = (jvm)->AttachCurrentThread((void **)&env,NULL);
    if (res < 0) {
    fprintf(stderr, "Can't get Env \n");
    (jvm)->DestroyJavaVM();
    return SQL_ERROR;          
    if(res == JNI_OK)
    printf("\nThe env is initialized ");
    if(*(&env) == NULL)
    printf(" the env is NULL ");
    printf("\nenv :::::: %s ", env);     
    // the jobject (dbc->actualConn) is a global reference
    odbcconnls = (env)->GetObjectClass(dbc->actualConn);
    if (odbcconnls == NULL) {
    goto destroy;
    switch(myVal){
    case 1:
    jmethodID methodId ;
    jboolean jbool;
    SQLINTEGER Val = (SQLINTEGER )Value;
    SQLINTEGER val1 = *Val;
    methodId = (env)->GetMethodID( odbcconnls,"myFun1","(Z)V");
    if(methodId == NULL){
    goto destroy;
    if(val1 == SQL_FALSE )
    jbool = 0;
    else
    jbool =1;
    env->CallVoidMethod(dbc->actualConn,methodId,jbool);
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId);
    jvm->DetachCurrentThread();
    return ;
    case 2 :
    jmethodID methodId1 ;
    SQLUINTEGER* Level;
    methodId1 = (env)->GetMethodID( odbcconnls,"myFun2","(I)V");
    if(methodId1 == NULL){
    goto destroy;
    Level = (SQLUINTEGER *)Value;
    env->CallVoidMethod(dbc->actualConn,methodId1,(int)*Level);
    dbc->txn_isolation = (SQLUINTEGER)Value;
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId1);
    jvm->DetachCurrentThread();
    return ;
    case 3 :
    SQLCHAR* Cate;
    jmethodID methodId2 ;
    jstring jStrCat;
    methodId2 = (env)->GetMethodID(odbcconnls,"myFun3","(Ljava/lang/String;)V");
    if(methodId2 == NULL){
    goto destroy;
    Cate = new SQLCHAR[20];
    strcpy((char *)CCatalog,(char *)Value);
    jStrCat = env->NewStringUTF((char *) Cate);
    printf("\n got jSTring ");
    env->CallVoidMethod(dbc->actualConn,methodId2,jStrCat);
    printf("\n after called method ");
    int len = strlen((char *)Cate);
    dbc->Cate = new SQLCHAR[len+1];
    strcpy((char *)dbc->Cate,(char *)Cate);
    printf("\n copied result ");
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId2);
    jvm->DetachCurrentThread();
    return ;
    destroy:
    if ((env)->ExceptionOccurred()) {
    (env)->ExceptionDescribe();
    jvm->DetachCurrentThread();
    (jvm)->DestroyJavaVM();
    return SQL_ERROR;
    When case 1 is called second time this error is thrown..
    plz help me..
    Thanx
    MittalSunita.

    When calling the same method second time , I get
    message ::
    <FATAL ERROR in native method: Wrong method ID used
    d to invoke a Java method>
    void myFunction(int myVal)
    JNIEnv *env = NULL;
    jclass odbcconnls;
    jint res;
    printf("\nInitilaizing class ");
    res = (jvm)->AttachCurrentThread((void **)&env,NULL);
    if (res < 0) {
    fprintf(stderr, "Can't get Env \n");
    (jvm)->DestroyJavaVM();
    return SQL_ERROR;          
    if(res == JNI_OK)
    printf("\nThe env is initialized ");
    if(*(&env) == NULL)
    printf(" the env is NULL ");
    printf("\nenv :::::: %s ", env);     
    // the jobject (dbc->actualConn) is a global
    reference
    odbcconnls = (env)->GetObjectClass(dbc->actualConn);
    if (odbcconnls == NULL) {
    goto destroy;
    switch(myVal){
    case 1:
    jmethodID methodId ;
    jboolean jbool;
    SQLINTEGER Val = (SQLINTEGER )Value;
    SQLINTEGER val1 = *Val;
    methodId = (env)->GetMethodID(
    ( odbcconnls,"myFun1","(Z)V");
    if(methodId == NULL){
    goto destroy;
    if(val1 == SQL_FALSE )
    jbool = 0;
    else
    jbool =1;
    env->CallVoidMethod(dbc->actualConn,methodId,jbool);
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId);
    jvm->DetachCurrentThread();
    return ;Why do you delete a local reference???
    Did you ever call the get local reference?
    case 2 :
    jmethodID methodId1 ;
    SQLUINTEGER* Level;
    methodId1 = (env)->GetMethodID(
    ( odbcconnls,"myFun2","(I)V");
    if(methodId1 == NULL){
    goto destroy;
    Level = (SQLUINTEGER *)Value;
    env->CallVoidMethod(dbc->actualConn,methodId1,(int)*Le
    el);
    dbc->txn_isolation = (SQLUINTEGER)Value;
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId1);
    jvm->DetachCurrentThread();
    return ;
    case 3 :
    SQLCHAR* Cate;
    jmethodID methodId2 ;
    jstring jStrCat;
    methodId2 =
    (env)->GetMethodID(odbcconnls,"myFun3","(Ljava/lang/St
    ing;)V");
    if(methodId2 == NULL){
    goto destroy;
    Cate = new SQLCHAR[20];
    strcpy((char *)CCatalog,(char *)Value);
    jStrCat = env->NewStringUTF((char *) Cate);
    printf("\n got jSTring ");
    env->CallVoidMethod(dbc->actualConn,methodId2,jStrCat)
    printf("\n after called method ");
    int len = strlen((char *)Cate);
    dbc->Cate = new SQLCHAR[len+1];
    strcpy((char *)dbc->Cate,(char *)Cate);
    printf("\n copied result ");
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId2);
    jvm->DetachCurrentThread();
    return ;
    destroy:
    if ((env)->ExceptionOccurred()) {
    (env)->ExceptionDescribe();
    jvm->DetachCurrentThread();
    (jvm)->DestroyJavaVM();
    return SQL_ERROR;
    When case 1 is called second time this error is
    thrown..
    plz help me..
    Thanx
    MittalSunita.

  • Forte debugger exits (FATAL ERROR in native method: JDWP "util.c")

    When debugging my GUI app in Forte on Solaris 8, my debug session exits with the following error:
    FATAL ERROR in native method: JDWP "util.c" (Feb 20 2002), line 1029: Unexpected error, error code = 113 (JVMDI_ERROR_INTERNAL)
    It seems to do so while in the middle of a comm api routine where I'm accessing the serial port. Has anyone else ever seen this error is Solaris? I have all of the patches required by Sun for JDK1.3.1_02 installed with the same version of the JDK.
    The application runs fine when I run it standalone...
    Any suggestions?
    Thanks.

    I've had the same problem. It appears that it occures when an error is thrown that stop a JSP page load.
    Everything will run find up to that point, but after that, the util.c error will not go away except by deinstall and reinstall of Forte. We can't even use Forte at this point since it will start throwing the error within 1 hour of reinstall. Crap.
    I'm on Windows XP also, and this happens with JVM 1.3 or 1.4.

  • FATAL ERROR in native method: Non-array passed to JNI array operations

    After stepping up to JDK 1.4.2 we started getting a hotspot error, I added -Xcheck:jni and it yielded the above error which was not existent in JDK 1.4.1 and for the life of me I cannot find out whats wrong:
    Native method dec:
    private native byte[] cost(final byte[] byte_array,
    final double minCostPerMeter,
    final int costFuncSelection,
    final double maxCostThreshold);
    Method call:
    ByteArrayInputStream
    inputByteStream = new ByteArrayInputStream(
    cost(output_byte_stream.toByteArray(),
    minCostPerMeter,
    costFunctionSelection.length,
    maxCostThreshold));
    An array is being passed I have no idea why it is complaing about the method call.
    Any help would be appreciated.
    -R

    What happens if you remove all the code from the JNI method - so it just calls and then returns?
    If it still occurs then I would expect that you have a memory problem in a piece of code before this one. Such problems can have no impact when run in one environment but cause failures in another becomes some other legitimate piece of data moved.
    If it doesn't then I would expect that the problem is in the method itself and not the call.
    It could be some odd VM problem so trying a different version of 1.4.2 might help (but in of itself would not eliminate the possibility that you have a memory problem.)

  • Error: Fatal error in function BldAlter on call to function GetOldRecDefn.

    At step "Generating the Updated PeopleTools Script" to generate "PPLTLS84CURTables.sql", more than 2270 errors occured:
    Example Error 1:
    System Error : File: E:\pt85403d-retail\peopletools\src\psbld\bldalter.cppSQL error. Stmt #: 4550  Error Position: 0  Return: 601 - [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'SYSCOLUMNS'.
    Failed SQL stmt: select c.name,c.colid,t.name,c.length,c.prec,c.scale,c.isnullable         from SYSCOLUMNS c, SYSOBJECTS o, SYSTYPES t        where c.id = o.id        and c.usertype = t.usertype        and o.type = 'U'        and o.name = :1        order by c.colid
    After changing table/view names from upper case to lower case. the query works.
    Example Error 2:
    Error: Fatal error in function BldAlter on call to function GetOldRecDefn.  Return code = 1. (76,6)
    Error: MENU_LANG_TMP - SQL Error. Error Position: 0  Return: 601 - [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'SYSOBJECTS'.
    SELECT NAME FROM SYSOBJECTS WHERE TYPE = 'TR' AND NAME = :1
    Error: PSMSFTMPCOM - SQL Error. Error Position: 0  Return: 601 - [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'SYSOBJECTS'.
    SQL Build process ended on 11/7/2014 at 10:39:42 AM.
    2698 records processed, 2274 errors, 0 warnings.
    SQL Build script for all processes written to file E:/temp/CAOutput/softwareupdatePeopleTools_Only_Upgrade{HR90UPG}/PPLTLS84CURTables.sql.
    SQL Build log file written to E:/temp/CAOutput/softwareupdatePeopleTools_Only_Upgrade{HR90UPG}/BuildPPLTLS84CURTables.log.
    Thanks for any suggestions!
    Dongmei

    Passed the above error by changing object owner from ACCESSID to dbo. Now on the same task "Generating the Updated PeopleTools Scripts", there are 516 errors, sample error messages:
    Error: PS_APP_DES_OBJ_CST - Alter failed due to an unknown column type (NVARCHAR) found for field PSOWNER. (76,22)
    Error: Fatal error in function BldAlter on call to function GetOldRecDefn.  Return code = 1. (76,6)
    Error: PS_APP_DES_OBJ_LNG - Alter failed due to an unknown column type (NVARCHAR) found for field PSOWNER. (76,22)
    Error: Fatal error in function BldAlter on call to function GetOldRecDefn.  Return code = 1. (76,6)
    Error: PS_APP_DES_OBJECTS - Alter failed due to an unknown column type (NVARCHAR) found for field PSOWNER. (76,22)
    Error: Fatal error in function BldAlter on call to function GetOldRecDefn.  Return code = 1. (76,6)
    Warning: MCF_IM_DEMO_REC.MCF_IMUSERID - Default record.field MCF_IM_DEMO_REC.USER_OPRID has no rows, field type default used. (76,66)
    Error: PS_PRCSDEFN - Alter failed due to an unknown column type (NVARCHAR) found for field PRCSTYPE. (76,22)
    Appreciate any help!!
    Dongmei

  • Fatal error in function BldAlter on call to function GetOldRecDefn

    Greetings anyone. Thx in advance for the help.
    My issue is that I'm getting errors running the steps "Task 7A-24: Running Alter Audit" from the Ptools 8.50 installation guide.(plan to isntall FSCM 9.1 next). The error is as follows and I get it for every statement executed during the build process...;
    SQL Build process began on 6/22/2010 at 12:01:40 PM for database PSOFT.
    Error: EOCM_TER0000101 - Unable to retrieve current DDL space name. Alter processed failed. (76,47)
    Error: Fatal error in function BldAlter on call to function GetOldRecDefn. Return code = 1. (76,6)
    I'm pretty sure I've followed all the installation steps correctly. The only remedy step I found helpful from Oracle Support is to make sure my PSDBOWNER is upprcase. I did change that, to no avail. There were some VIEWs discrepencies when I ran DDDaudit(none for sysadudit. But that's because AUC_SCR_CHT_VW would always hang when replacing views. Any direction would be much appreciated.
    Windows Server 2003, Oracle DB 10.2, Tools 8.50 new install
    Thanks. novice at a Peoplesoft install!
    -KevinC

    Passed the above error by changing object owner from ACCESSID to dbo. Now on the same task "Generating the Updated PeopleTools Scripts", there are 516 errors, sample error messages:
    Error: PS_APP_DES_OBJ_CST - Alter failed due to an unknown column type (NVARCHAR) found for field PSOWNER. (76,22)
    Error: Fatal error in function BldAlter on call to function GetOldRecDefn.  Return code = 1. (76,6)
    Error: PS_APP_DES_OBJ_LNG - Alter failed due to an unknown column type (NVARCHAR) found for field PSOWNER. (76,22)
    Error: Fatal error in function BldAlter on call to function GetOldRecDefn.  Return code = 1. (76,6)
    Error: PS_APP_DES_OBJECTS - Alter failed due to an unknown column type (NVARCHAR) found for field PSOWNER. (76,22)
    Error: Fatal error in function BldAlter on call to function GetOldRecDefn.  Return code = 1. (76,6)
    Warning: MCF_IM_DEMO_REC.MCF_IMUSERID - Default record.field MCF_IM_DEMO_REC.USER_OPRID has no rows, field type default used. (76,66)
    Error: PS_PRCSDEFN - Alter failed due to an unknown column type (NVARCHAR) found for field PRCSTYPE. (76,22)
    Appreciate any help!!
    Dongmei

  • Help with x64: fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

    Hello, I am trying to complie some C code for some applications I am working on in labview (I am using Labview 2012 64bit).
    When I try to build my code in Visual C++ 2010 ( I have set it up to be able to use x64) I get the following fatal error:
    nivision.lib(StartupShutdown.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
    Which I understand that .lib does not have a 64bit compatability. However, if I were to use 32bit code, how can I link/emulate it to my 64bit labview? Is there a good tutorial on this application? The problem is the rest of my application uses and requires 64bit labview, so I am stuck in this enviroment.
    Thanks.

    dbrittain wrote:
    Thanks for the reply. The C code I have cross correlates images, and it does reference the image inputs and size variables from the nivision classes. I am thinking of using a side by side labview environment with shared variables. I have not done this before, do you have any good examples? Can you make the library function node a shared variable or only the elements within it? 
    I guess I could try to convert to labview, but the are a lot of lines of code that I would prefer not to try to wrap my head around in translation.
    The LabVIEW API in Vision Development Module has functions that let you get access to all those parameters as well as the raw image data pointer. A common design is to query those items on the LabVIEW diagram and then pass them to your DLL. This would mean you wouldn't need to make any calls into the Vision DLL from your C code.
    As for examples showing how to use shared variables, keep in mind that it isn't just like doing a function call. The more appropriate way to think of it would be communicating with another VI by getting and setting controls and indicators while it runs. You could put all your arguments into a shared variable and set a boolean indicating it is ready, then wait for another boolean to go high indicating the other code has finished and placed its results in another shared variable. Your application code interacts with the shared variables just like a control/indicator/local variable. This of course is a simple description and I would not be surprised if there are well-defined frameworks/examples searchable in the forums that use shared variables in this manner.
    Eric
    Eric

  • ERROR_WAIT_NO_CHILDREN error while native method calling

    I have some self-made DLL and call it from Java over JNI.
    Under 100% repeatable conditions, the calling of the native method conduce to
    java.exe(JVM) termination with errorlevel 128L. Without any trace or reports.
    If to assume, that java.exe uses OS error codes, then 128L is
    'ERROR_WAIT_NO_CHILDREN - There are no child processes to wait for.'
    What that? JVM crashed by the Dll?
    Some additional information:
    I found the position(approximately) in C code where the execution is stopping.
    It far from JNI/C function declaration.
    Dll is compiled by Watcom C/C++32 Compiler and Linker, Version 11.0.
    I tried to compile Dll by Borland C++ 5.5.1 free command-line compiler, and error
    disappears. But I don't think it right way to refer the error to compiler.
    And something else. Native code work fine, if it was called not from Java but
    from native application.
    Any ideas?
    Thanks.

    Hmm, could You send the header of the method from Your
    DLL which you are calling from Java?Sure.
    JNIEXPORT jint JNICALL Java_mypackage_NativeBuilder_build
    (JNIEnv *env, jobject obj, jstring project)

  • Error while transforming XSLT by calling function with Reflection API

    Hi,
    I'm new to Reflection API. I want to call function from the jar file which is not in my application context. So I have loaded that jar ( say XXX.jar) file at runtime with URLClassLoader and call the function say [ *myTransform(Document document)* ]. Problem is that when I want to transform any XSLT file in that function it throws exception 'Could not compile stylesheet'. All required classes are in XXX.jar.
    If I call 'myTransform' function directly without reflection API then it transformation successfully completed.
    Following is code of reflection to invoke function
            ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
            URLClassLoader loader = new URLClassLoader(jarURLs, contextCL);
            Class c = loader.loadClass(fullClasspath);
            Constructor constructor = c.getDeclaredConstructor(constructorParamsClasses);
            Object instance = constructor.newInstance(constructorParams);
            Method method = c.getDeclaredMethod("myTransform", methodParamsClasses);
            Object object = method.invoke(instance, methodParams);Following is function to be called with reflection API.
    public Document myTransform ( Document document ) {
    // Reference of Document (DOM NODE) used to hold the result of transformation.
                Document doc = null ;
                // DocumentBuilderFactory instance which is used to initialize DocumentBuilder to create newDocumentBuilder.
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance () ;
                // Reference of DocumentBuilder used to create new Document (DOM NODE).
                DocumentBuilder builder;
                try {
                      // Initialize DocumentBuilder by using DocumentBuilderFactory instance.
                      builder = factory.newDocumentBuilder ();
                      // Initialize new document instance by using DocumentBuilder instance.
                      doc = builder.newDocument () ;
                      // Creates new DOMSource by using document (DOM NODE) which is coming through current transform() method parameter.
                      DOMSource domsource = new DOMSource ( document ) ;
                      // Creates new instance of TransformerFactory.
                      TransformerFactory transformerfactory = TransformerFactory.newInstance () ;
                      // Creates new Transformer instance by using TransformerFactory which holds XSLT file.
                      Transformer transformer = null;
    ********* exception is thrown from here onward ******************
                      transformer = transformerfactory.newTransformer (new StreamSource (xsltFile));
                      // Transform XSLT on document (DOM NODE) and store result in doc (DOM NODE).
                      transformer.transform ( domsource , new DOMResult ( doc ) ) ;
                } catch (ParserConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerException ex) {
                     ex.printStackTrace();
                } catch (Exception ex) {
                     ex.printStackTrace();
                //holds result of transformation.
                return doc ;
    }Following is full exception stacktrace
    ERROR:  'The first argument to the non-static Java function 'myBeanMethod' is not a valid object reference.'
    FATAL ERROR:  'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:829)
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:623)
            at com.actl.dxchange.utilities.Transformation.transform(Transformation.java:83)
            at com.actl.dxchange.base.BaseConnector.transform(BaseConnector.java:330)
            at com.actl.dxchange.connectors.KuoniConnector.doRequestProcess(KuoniConnector.java:388)
            at com.actl.dxchange.connectors.KuoniConnector.hotelAvail(KuoniConnector.java:241)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            ...........

    Hi,
    Thanks for response.
    Following is code for setting 'methodParamsClasses' array object. I do ensure that Document is not null and valid. My application is web application.
    Document requestObj = /* my code for generating Document object*/
    Object[] methodParams = new Object[]{requestObj}
    Class[] methodParamsClasses = new Class[]{};
                if (methodParams != null) {
                    methodParamsClasses = new Class[methodParams.length];
                    for (int i = 0; i < methodParams.length; i++) {
                        if (methodParams[i] instanceof Document) {
    /************** if parameter is instance of Document then I set class type as "Document.class" ***********/
                            methodParamsClasses[i] = Document.class;
                        } else {
                            methodParamsClasses[i] = methodParams.getClass();

  • I want to know why it's happening me this error: Object synchronization method was called from an unsynchronized block of code.

    I'm developing a Smart Array (it's a request I cannot use a List of int that I know it's easier because I made both codes). I have done this class and below is the example of how I use it. The error is often in this line (153 from class):
    // Ensure that the lock is released.
    Monitor.Exit(array);
    If I use a List nothing wrong happens just when I translate to an array. Thanks for your help.
    SmartArray3.cs
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;
    namespace SmartArray
    class SmartArray3
    private int[] array;
    private int size = 0;
    private int count = 0;
    public SmartArray3()
    Resize(1);
    public SmartArray3(int size)
    this.size = size;
    array = new int[this.size];
    public bool Resize(int size)
    try
    if (array == null)
    array = new int[size];
    else
    Array.Resize(ref array, size);
    this.size++;
    return true;
    catch
    return false;
    private void add(int value)
    try
    if (array == null)
    this.size = 1;
    Resize(this.size);
    array[0] = value;
    this.count++;
    else
    if (this.count == (this.size - 1))
    this.size *= 2;
    this.Resize(this.size);
    if ((this.count - 1) < 0)
    array[0] = value;
    else
    array[this.count - 1] = value;
    this.count++;
    catch (Exception ex)
    Console.Write(ex.ToString());
    throw new System.IndexOutOfRangeException("Index out of Range.");
    // Lock the array and add an element.
    public void Add(int value)
    // Request the lock, and block until it is obtained.
    Monitor.Enter(array);
    try
    if (array == null)
    this.size = 1;
    Resize(this.size);
    array[0] = value;
    this.count++;
    else
    if (this.count == (this.size - 1))
    this.size *= 2;
    this.Resize(this.size);
    if ((this.count - 1) < 0)
    array[0] = value;
    else
    array[this.count - 1] = value;
    this.count++;
    finally
    // Ensure that the lock is released.
    Monitor.Exit(array);
    // Try to add an element to the List: Add the element to the List
    // only if the lock is immediately available.
    public bool TryAdd(int value)
    // Request the lock.
    if (Monitor.TryEnter(array))
    try
    if (array == null)
    this.size = 1;
    Resize(this.size);
    array[0] = value;
    this.count++;
    else
    if (this.count == (this.size - 1))
    this.size *= 2;
    this.Resize(this.size);
    if ((this.count - 1) < 0)
    array[0] = value;
    else
    array[this.count - 1] = value;
    this.count++;
    finally
    // Ensure that the lock is released.
    Monitor.Exit(array);
    return true;
    else
    return false;
    public int Get(int index)
    try
    return array[index];
    catch (IndexOutOfRangeException ex)
    throw new System.IndexOutOfRangeException("Index out of range");
    Code for called the Class:
    private static int threadsRunning = 0;
    private SmartArray3 sa = new SmartArray3();
    private List<double> times;
    private static string[] titles ={
    "Add ", "Add failed ", "TryAdd succeeded ", "TryAdd failed "};
    private static int[][] results = new int[3][];
    //Event to Create Threads
    private void newTest()
    for (int i = 0; i < 3; i++)
    Thread t = new Thread(ThreadProc);
    t.Start(i);
    Interlocked.Increment(ref threadsRunning);
    private void ThreadProc(object state)
    times = new List<double>();
    DateTime finish = DateTime.Now.AddSeconds(10);
    Random rand = new Random();
    int[] result = { 0, 0, 0, 0};
    int threadNum = (int)state;
    while (DateTime.Now < finish)
    Stopwatch sw = Stopwatch.StartNew();
    int what = rand.Next(250);
    int how = rand.Next(25);
    if (how < 16)
    try
    sa.Add(what);
    result[(int)ThreadResultIndex.AddCt] += 1;
    times.Add(sw.Elapsed.TotalMilliseconds);
    catch
    result[(int)ThreadResultIndex.AddFailCt] += 1;
    else
    if (sa.TryAdd(what))
    result[(int)ThreadResultIndex.TryAddSucceedCt] += 1;
    else
    result[(int)ThreadResultIndex.TryAddFailCt] += 1;
    sw.Stop();
    results[threadNum] = result;
    if (0 == Interlocked.Decrement(ref threadsRunning))
    StringBuilder sb = new StringBuilder(
    " Thread 1 Thread 2 Thread 3 Total\n");
    for (int row = 0; row < 4; row++)
    int total = 0;
    sb.Append(titles[row]);
    for (int col = 0; col < 3; col++)
    sb.Append(String.Format("{0,4} ", results[col][row]));
    total += results[col][row];
    sb.AppendLine(String.Format("{0,4} ", total));
    Console.WriteLine(sb.ToString());
    private enum ThreadResultIndex
    AddCt,
    AddFailCt,
    TryAddSucceedCt,
    TryAddFailCt
    Federico Navarrete

    The array that you're calling Monitor.Enter under is not always the same array that you call Monitor.Exit on. When you resize an array using Array.Resize, you pass the variable in as a reference parameter (ref). The method then creates a
    new array object and assigns it to the array variable. Then, when you leave the synchronization block after resizing the array, your Monitor.Exit uses the new array rather than the one it originally entered
    and... boom.
    Instead of locking on the array itself, create a new private readonly field of type Object called "lock" within the SmartArray class and use that to lock on. It doesn't
    need to be readonly, but the keyword will prevent you from accidentally introducing this issue again.

  • Fatal error: LABVIEW.LIB was not called from a labview process

    I have built a very simple executable which uses shared variables which should talk to an OPC server. When I try to run it on the target machine, I get this error. Does anyone know what it means?

    If you up/down graded from 8.2 to 8.5 then I would suggest doing a mass compile on the VI's into a new folder (or have a backup of your files somewhere).
    You can do this via LabVIEW > Tools > Advanced > Mass Compile.
    Please let me know how this turns out.
    All the best,
    Message Edited by rsw on 01-08-2008 07:02 AM
    Applications Engineer

  • Track calls made with 6110

    Hey,
    I'm with Optus in Australia and they dont have "Live Billing" or what ever there excuse was. SOOO i cannot check how much i have used on my plan, untill the bill comes out. Yes i know its gay.
    Here is where i want to track calls. My old phone (LG K800) had a feature where you can input call cost per 30 sec block and price per SMS and it told you how much you should have spent. Does the 6110 have a feature like this that i have missed ?? Alternatively, is there an application i can get that does this??
    If not, is there a way i can transfer my log of calls and SMS's to my computer so i can put all that into a program and do the same thing??
    Thanks Guys

    You can report fraudulent purchases to Apple using the email form here >  iTunes Store - Contact Us
    And if you have not already done so, change your Apple ID password ASAP >  Apple - Support - Apple ID
    Apple ID: Tips for protecting the security of your account

  • JDeveloper & Debug : FATAL ERROR

    Hello,
    when i try to debug any project in JDeveloper, i got the following error:
    FATAL ERROR in native method: No transports initialized
    Transport dt_socket failed to initialize, rc = 509.
    Process exited with exit code 1.
    Debugger unable to connect to local process.
    I allready reinstall JDeveloper in JDK, but no luck. Please, help. Thank you.

    hello,
    i am also getting the erro while executing project on jdeveloper using ejb and jpa entities the error is as follows :
    [EclipseLink/JPA Client] Adding Java options: -javaagent:C:\middleware\jdeveloper\..\modules\org.eclipse.persistence_1.0.0.0_2-1.jar
    c:\middleware\jdk160_21\bin\javaw.exe -client -classpath C:\Users\eaurgta\Documents\JDeveloper\mywork\cab_ejb_jpa_app\.adf;C:\Users\eaurgta\Documents\JDeveloper\mywork\cab_ejb_jpa_app\cabejbmodel\classes;C:\middleware\modules\com.oracle.toplink_1.0.0.0_11-1-1-4-0.jar;C:\middleware\modules\org.eclipse.persistence_1.0.0.0_2-1.jar;C:\middleware\modules\com.bea.core.antlr.runtime_2.7.7.jar;C:\middleware\oracle_common\modules\oracle.toplink_11.1.1\javax.persistence_2.0_preview.jar;C:\middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;C:\middleware\oracle_common\modules\oracle.xdk_11.1.0\xml.jar;C:\middleware\modules\javax.jsf_1.1.0.0_1-2.jar;C:\middleware\modules\javax.ejb_3.0.1.jar;C:\middleware\modules\javax.enterprise.deploy_1.2.jar;C:\middleware\modules\javax.interceptor_1.0.jar;C:\middleware\modules\javax.jms_1.1.1.jar;C:\middleware\modules\javax.jsp_1.2.0.0_2-1.jar;C:\middleware\modules\javax.jws_2.0.jar;C:\middleware\modules\javax.activation_1.1.0.0_1-1.jar;C:\middleware\modules\javax.mail_1.1.0.0_1-4-1.jar;C:\middleware\modules\javax.xml.soap_1.3.1.0.jar;C:\middleware\modules\javax.xml.rpc_1.2.1.jar;C:\middleware\modules\javax.xml.ws_2.1.1.jar;C:\middleware\modules\javax.management.j2ee_1.0.jar;C:\middleware\modules\javax.resource_1.5.1.jar;C:\middleware\modules\javax.servlet_1.0.0.0_2-5.jar;C:\middleware\modules\javax.transaction_1.0.0.0_1-1.jar;C:\middleware\modules\javax.xml.stream_1.1.1.0.jar;C:\middleware\modules\javax.security.jacc_1.0.0.0_1-1.jar;C:\middleware\modules\javax.xml.registry_1.0.0.0_1-0.jar;C:\middleware\modules\javax.persistence_1.0.0.0_1-0-2.jar;C:\middleware\wlserver_10.3\server\lib\weblogic.jar -Djavax.net.ssl.trustStore=C:\middleware\wlserver_10.3\server\lib\DemoTrust.jks -javaagent:C:\middleware\jdeveloper\..\modules\org.eclipse.persistence_1.0.0.0_2-1.jar oracle.cab_facadeClient
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
         at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.initializeFromAgent(JavaSECMPInitializerAgent.java:45)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.premain(JavaSECMPInitializerAgent.java:38)
         ... 6 more
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [cabejbmodel] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.T76] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1014)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:88)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:256)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:216)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initializeFromAgent(JavaSECMPInitializer.java:159)
         ... 12 more
    Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [cabejbmodel] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.T76] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
         ... 17 more
    Caused by: Exception [EclipseLink-7161] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.T76] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.ValidationException.noPrimaryKeyAnnotationsFound(ValidationException.java:1374)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.validatePrimaryKey(EntityAccessor.java:1366)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.processAccessors(EntityAccessor.java:885)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.process(EntityAccessor.java:691)
         at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage2(MetadataProject.java:1531)
         at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:474)
         at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:441)
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:968)
         ... 16 more
    FATAL ERROR in native method: processing of -javaagent failed
    Exception in thread "main" Process exited with exit code 1.
    thanks and regards
    ankur

Maybe you are looking for