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.

Similar Messages

  • 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.

  • 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?

  • 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.)

  • 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

  • Wrong Method Id

    Hi,
    can i tell how can i access the non-static method in java through native language.
    When I try to access using callObjectMethod, I get
    FATAL ERROR in native method: Wrong method ID used to invoke a Java method
    error.
    Thanks in advance.
    Ranjan

    Wrong method ID used to invoke a Java methodI would guess that you are either using a method id that has not been initialized or you are using one that was created for another class and not the class you are calling it with.

  • JDWP fatal error from thread.stop()

    I get this message
    FATAL ERROR in native method: JDWP "util.c" (Jan 20 2004), line 1209: Unexpected error, error code = 113 (JVMDI_ERROR_INTERNAL)
    from the target VM when I do thread.stop() on the debugger side. The debugger isn't bothered by the fatal error, but the target dies.
    Can anyone offer a clue to what I did wrong?
    Peter

    FATAL ERROR in native method: JDWP "util.c" (Jan 20
    2004), line 1209: Unexpected error, error code = 113
    (JVMDI_ERROR_INTERNAL)
    from the target VM when I do thread.stop() on the
    debugger side. The debugger isn't bothered by the
    fatal error, but the target dies.
    Can anyone offer a clue to what I did wrong?Lets see... "Jan 20 2004" implies that you are using the Tiger (1.5)
    beta release for this experiment.
    According to the JDWP spec:
    http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html
    Error 113 is "An unexpected internal error has occurred"
    More information, please...
    - What platform are you running on, and what version(s) of the VM
    are you using?
    - Which thread in the debugee did you send the stop() to?
    - Can you update this article with sample code and a narrative
    describing what happened when?
    - What throwable did you pass to com.sun.jdi.ThreadReference.stop(ObjectReference throwable)

  • 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

  • Excel export problem (Fatal Error)

    Hi friends,
    I am trying export my ALV grid contents (my internal table content) to excel with standard alv toolbar excel button (&XXL) But i give an error.
    "Spreadsheet cannot be called (return code FATAL error)" What is my wrong?
    My code parts :
    Data : Begin Of IRapor Occurs 0,
              Malzeme_Kodu     Like Mkal-Matnr,   "Malzeme Numaras&#305;
              Versiyon_No      Like Mkal-Verid,   "Versiyon no
              Bilesen_Kodu     Like Makt-Matnr,   "Bile&#351;en Numaras&#305;
              Tanim            Like Makt-Maktx,   "Malzeme K&#305;sa Metni
              Batch            Like Mseg-Charg,   "Parti Numaras&#305; - Batch
              Birim            Like Mseg-Meins,   "Temel ölçü birimi
              Malzeme_Fire(12) Type P Decimals 2, "Teorik Malzeme Fire % si
              Batch_Fire(12)   Type P Decimals 2, "Teorik Batch Fire % si
              OMiktar          Like Mseg-Menge,   "Önceki Dönem Miktar
              OYuzde(12)       Type P Decimals 2, "Önceki Dönem Yuzde
              OTeorik          Like Mseg-Menge,   "Önceki Dönem Teorik
              OSapma_Deger     Like Mseg-Menge,   "Önceki Dönem Sapma De&#287;eri
              OSapma_Oran(12)  Type P Decimals 2, "Önceki Dönem Sapma Oran&#305;
              SMiktar          Like Mseg-Menge,   "Seçim Dönemi Miktar
              SYuzde(16)       Type P Decimals 2, "Seçim Dönemi Yüzde
              STeorik          Like Mseg-Menge,   "Seçim Dönemi Teorik
              SSapma_Deger     Like Mseg-Menge,   "Seçim Dönemi Sapma De&#287;eri
              SSapma_Oran(12)  Type P Decimals 2, "Seçim Dönemi Sapma Oran&#305;
              Hareket          Like Mseg-Bwart,
              Isyeri           Like Crhd-Arbpl,
            End Of IRapor.
    Data : Begin Of SRapor Occurs 0,
             Renk(4) Type C.
             Include Structure IRapor.
    Data : End Of SRapor.
    FORM BuildCatalog .
      Call Function 'REUSE_ALV_FIELDCATALOG_MERGE'
        Exporting
          I_Program_Name         = Sy-Repid
          I_Internal_Tabname     = 'SRAPOR'
          I_Inclname             = Sy-Repid
        Changing
          Ct_Fieldcat            = Gt_Fieldcat
        Exceptions
          Inconsistent_Interface = 1
          Program_Error          = 2
          Others                 = 3.
      If Sy-Subrc <> 0.
        Message Id Sy-Msgid Type Sy-Msgty Number Sy-Msgno
                With Sy-Msgv1 Sy-Msgv2 Sy-Msgv3 Sy-Msgv4.
      Endif.
          Wa_cat-Fieldname = 'BILESEN_KODU'.
          Wa_cat-Seltext_m = 'Bile&#351;en Kodu'.
          Wa_cat-Outputlen = '20'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
         Wa_cat-Fieldname = 'TANIM'.
          Wa_cat-Seltext_m = 'Tan&#305;m'.
          Wa_cat-Outputlen = '20'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'BATCH'.
          Wa_cat-Seltext_m = 'Batchi'.
          Wa_cat-Outputlen = '20'.
          Wa_cat-Do_Sum    = 'X'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'BIRIM'.
          Wa_cat-Seltext_m = 'Birimi'.
          Wa_cat-Outputlen = '20'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'MALZEME_FIRE'.
          Wa_cat-Seltext_m = 'Teorik Firesi-Malzeme'.
          Wa_cat-Outputlen = '20'.
          Wa_cat-Do_Sum    = ''.
          Wa_Cat-No_Zero   = 'X'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'BATCH_FIRE'.
          Wa_cat-Seltext_m = 'Teorik Firesi-Batch'.
          Wa_cat-Outputlen = '20'.
          Wa_Cat-No_Zero   = 'X'.
    *      Wa_cat-No_out    = p_toplam.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'OMIKTAR'.
          Wa_cat-Seltext_m = 'Miktar'.
          Wa_cat-Outputlen = '20'.
          Wa_Cat-Emphasize = 'C600'.
          Wa_cat-Do_Sum    = ''.
          Wa_Cat-Ref_Fieldname = 'BIRIM'.
          Wa_Cat-No_Zero   = 'X'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'OYUZDE'.
          Wa_cat-Seltext_l = '% (Bile&#351;en Koduna Göre)'.
          Wa_cat-Outputlen = '25'.
          Wa_Cat-Emphasize = 'C600'.
          Wa_Cat-No_Zero   = 'X'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'OTEORIK'.
          Wa_cat-Seltext_m = 'Teorik Kullan&#305;m'.
          Wa_cat-Outputlen = '20'.
          Wa_Cat-Emphasize = 'C600'.
          Wa_Cat-Ref_Fieldname = 'BIRIM'.
          Wa_Cat-No_Zero   = 'X'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'OSAPMA_DEGER'.
          Wa_cat-Seltext_m = 'Sapma De&#287;eri'.
          Wa_cat-Outputlen = '20'.
          Wa_Cat-Ref_Fieldname = 'BIRIM'.
          Wa_Cat-Emphasize = 'C600'.
    *      Wa_Cat-No_Zero   = 'X'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'OSAPMA_ORAN'.
          Wa_cat-Seltext_m = 'Sapma Oran&#305;'.
          Wa_cat-Outputlen = '20'.
          Wa_Cat-Emphasize = 'C600'.
    *      Wa_Cat-No_Zero   = 'X'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'SMIKTAR'.
          Wa_cat-Seltext_m = 'Miktar'.
          Wa_cat-Outputlen = '20'.
          Wa_Cat-Emphasize = 'C500'.
          Wa_Cat-Do_Sum    = ''.
          Wa_Cat-Ref_Fieldname = 'BIRIM'.
          Wa_Cat-No_Zero   = 'X'.
          Wa_cat-No_out    = izleme.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'SYUZDE'.
          Wa_cat-Seltext_l = '% (Bile&#351;en Koduna Göre)'.
          Wa_cat-Outputlen = '20'.
          Wa_Cat-Emphasize = 'C500'.
          Wa_Cat-No_Zero   = 'X'.
          Wa_cat-No_out    = izleme.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'STEORIK'.
          Wa_cat-Seltext_m = 'Teorik Kullan&#305;m'.
          Wa_cat-Outputlen = '20'.
          Wa_Cat-Ref_Fieldname = 'BIRIM'.
          Wa_Cat-Emphasize = 'C500'.
          Wa_Cat-No_Zero   = 'X'.
          Wa_cat-No_out    = izleme.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
        Wa_cat-Fieldname = 'SSAPMA_DEGER'.
          Wa_cat-Seltext_m = 'Sapma De&#287;eri'.
          Wa_cat-Outputlen = '20'.
    *      Wa_Cat-No_Zero   = 'X'.
          Wa_cat-No_out    = izleme.
          Wa_Cat-Emphasize = 'C500'.
          Wa_Cat-Ref_Fieldname = 'BIRIM'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
          Wa_cat-Fieldname = 'SSAPMA_ORAN'.
          Wa_cat-Seltext_m = 'Sapma Oran&#305;'.
          Wa_cat-Outputlen = '20'.
    *      Wa_Cat-No_Zero   = 'X'.
          Wa_cat-No_out    = izleme.
          Wa_Cat-Emphasize = 'C500'.
          Append Wa_Cat To Gt_Fieldcat.
          Clear Wa_Cat.
      Loop At Gt_Fieldcat Into Wa_Cat.
        if Wa_cat-Fieldname = 'RENK'.
          Wa_cat-No_out = 'X'. " Bu alan&#305; gösterme
          modify Gt_Fieldcat from Wa_cat index sy-tabix.
        endif.
      Endloop.
      Wa_srt-fieldname = 'BILESEN_KODU'.
      Wa_srt-expa      = p_toplam.
      Wa_srt-Up        = 'X'.
      Wa_srt-spos      = 1.
    *  Wa_srt-subtot    = P_BilTop.
      Wa_srt-GROUP     = P_BilTop.
      Append Wa_srt TO Wa_Alvsrt.
    ENDFORM.                    " BuildCatalog
    FORM ShowData .
      Call Function 'REUSE_ALV_GRID_DISPLAY'
        Exporting
          Is_Layout                = L_Layout
          I_Callback_Program       = Sy-Repid
          I_Callback_Pf_Status_Set = 'STATUS'
          I_Callback_User_Command  = 'USER_COMMAND'
          It_Fieldcat              = Gt_Fieldcat[]
          It_Sort                  = Wa_Alvsrt
          I_Save                   = 'X'
          I_Callback_Top_Of_Page   = 'TOP_OF_PAGE'
        Tables
          T_Outtab                 = SRAPOR.
    ENDFORM.                    " ShowData
    Message was edited by: Mehmet Avsar

    After using
    Call Function 'REUSE_ALV_FIELDCATALOG_MERGE'
    do not append anything to gt_fieldcat without using tabname.
    if u want to change seltext_m or anything else,
    use
      Loop At Gt_Fieldcat Into Wa_Cat
                  where fieldname = 'BILESEN_KODU'.      
            Wa_cat-Seltext_m = 'Bile&#351;en Kodu'.
          modify Gt_Fieldcat from Wa_cat index sy-tabix.
        endif.
      Endloop.
    Kolay Gelsin,
    Burak

  • My email quits and I get the message; database daemon fatal error

    Our Imac started posting a message this morning when we opened entourage.
    Database Daemon Fatal Error.
    What is wrong and how can I fix it?

    Select one of the AVCHD clips in the Browser. Right click and choose Transcode Media. Choose Optimize. When it's completed processing. see whether that clip will successfully Share>DVD. If it does, optimize the rest of those AVCHD clips.
    Russ

  • Fatal error: Call to undefined method tNG_fields::tNG_fields() in C:

    Hi
    I've just installed Xampp 1.7.2 locally with PHP Version 5.3.0 and Apache 2.2.12 on a Windows platform
    and I now I'm really in a big trouble !!!
    My home pages wich have a Login forms do not work anymore !!! They give me back this error:
    Fatal error: Call to undefined method tNG_fields::tNG_fields() in C:\xampp\htdocs\MySite\includes\tng\tNG_custom.class.php on line 30
    I think it's probably the new PHP version 5.3.0 and I'm really worried because I have many sites around made with ADD and if the servers will be as probably be updated to the new PHP version all my sites will stop working !!!
    What can I do? I'm really desperated and fell abandoned....PLEASE HELP !!!
    Monikka

    Yes, it almost surely is version 5.3.0 of PHP.  Any version below will work with ADDT,with 5.3.0, ADDT breaks.
    The only real solution is to not use 5.3.0 and use a less recent version.  With Xamp, the package is bundled, PHP and MySQL. I  had this exact same issue and someone, I think Gunter, suggested moving to WAMP which allows you to run different versions of PHP and MySQL as you desire.  This worked.
    The most disturbing thing for me was the "writing on the wall"...the ADDT life clock is ticking.  Remaining on CS4 and PHP 5.2 extends the useful life - but at some point, we will be forced by something to upgrade (like our ISP), then big problems.
    Jim

  • Native - Java Method Call problem - "Wrong Method ID..."

    I am writing a 3d game engine using c++, with all the game logic code in Java, for the purpose of making the thing extendible, easily modifyable, etc...
    I am using J2SE JDK 1.2.2.
    Most things work fine (engine-wise), but i have a few questions about problems i am having getting the JNI to work correctly with calls to Java Methods.
    1. If I use FindClass() to get a jclass reference to a named class, I get one number back. If I then instantiate this class, and then call GetObjectClass() with the instance, I get another number, **which doesnt appear to work for anything**. What is going on here? Can the JVM give different jclass numbers for the same class? Is GetObjectClass() supposed to work?
    2. Is AllocObject() alright for instantiating Java objects? It does seem to allocate memory, and method calls work to the new object. I am aware that it doesn't call a constructor, but I like that, seeing as the initialization is handled through a different [network-synchronized] means.
    3. Using a jclass retrieved using FindClass(), which I store in a global variable, I am able to call methods on an instance that I created in a certain function. I then make sure (?) that the GC can't reclaim the class or object memory by getting a NewGlobalReference to both of them [just to be safe]. However, in a later function, I am unable to call methods using my stored method IDs, ["Wrong Method ID....JVM has been asked to shut down this application in an unusual manner..."]. I am also unable to acquire new methodIDs, as the system returns 0xCCCCCCCC for all method ID queries. Obviously, attempting to use those bogus method IDs results in a JVM crash, in a segment called [2 deep in the untraceable depths of JVM.dll] from the JNI CallVoidMethodV() function. Why is this happening? Is the GC getting in there despite my best efforts? Is it illegal to cache methodIDs, jclass references or jobject references? aaarrggh! :)
    Thanks
    Chris Forbes
    Lead Programmer
    Sprocket Interactive
    [email protected]

    Hi Chris,
    I hit the same sort of problem, when writing a JVMDI ( VM debugger hook ), in C++.
    My question remained unanswered too
    http://forum.java.sun.com/thread.jsp?forum=47&thread=461503&tstart=30&trange=30
    I didn't try a call to NewGlobalRef, as you did... but it sounds like it could be what I was missing.
    I've a couple of ideas, but nothing definite for you.
    1) maybe there's more than one classloader, so that multiple copies of the class are loaded
    2) ensure you're compiling your DLL with "quad-word" ( 8 byte ) alignment.
    Otherwise all your JNI references will be misaligned !
    Since the JNI reference maps to a C++ pointer, it's possible that you can't cache any JNI references.
    That's my vague feeling on the subject.
    As a workaround, you may have to keep requesting any JNI references, eg. jclass & jmethod's, as you need them.
    regards,
    Owen

  • Fatal error using C++ native library

    Hi everyone,
    I'm currently developing a JNI native library in C++ in order to use an original library from a third vendor. I'm trying to perform a very simple operation, just calling a concrete method from the original library from a Java sample application.
    The same test in C++ is working fine, so I assume the vendor library is working correctly. But if I perform exactly the same code from within my native library using JNI, it give a crash like this:
    # A fatal error has been detected by the Java Runtime Environment:
    # SIGSEGV (0xb) at pc=0x000000371c880580, pid=17095, tid=1077307712
    # JRE version: 6.0_27-b07
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.2-b06 mixed mode linux-amd64 compressed oops)
    # Problematic frame:
    # C [libc.so.6+0x80580] wchar_t+0x0
    I think this is telling me that there was an error in the native library, more concrete in the libc.so library which is part of the GNU C++ compiler used to generate the native library. I don't know what the "wchar_t" wants to mean, since I know that is a primitive type for wide chars. It might be that the error is related to the use of this primitive within the vendor library?
    The compilation options that I'm using are the following:
    #CCFLAGS = -shared -Wl,-soname,${TARGET} -lstdc++ -ldl -lpthread -fopenmp
    CCFLAGS = -shared -Wl,-soname,${TARGET} -ldl -fopenmp
    #FPFLAGS = -DLINUX -DGX_NAMESPACES -fPIC -fshort-wchar
    #FPFLAGS = -fPIC -fshort-wchar
    FPFLAGS = -fPIC
    ${TARGET} : FPEnginePulnixImpl.o
         ${CC} -o ${TARGET} FPEnginePulnixImpl.o ${CCFLAGS} -L${JAI_DIR} -lVrs
    FPEnginePulnixImpl.o :
         ${CC} -o FPEnginePulnixImpl.o -I"${JDK_INCLUDES}" -I"${JDK_INCLUDES_LINUX}" -I"../jni/include" -I"${JAI_INCLUDES}" ${FPFLAGS} -c ../src/main/C++/FPEnginePulnixImpl.cc
    I played around with those ones, without success so far. I debugged the native code and I know the crash is coming when I call a constructor of a C++ class of the vendor library. Is there something I could do about this? BTW, on Windows is working fine, but indeed, the vendor library is a different one. I've got the impression that there's something in the JNI wrapper of the JDK6 that I'm using that makes the vendor library to crash, either that or something wrong with the compilation of my native library.
    Any help will be welcome.
    Thanks and regards,
    Luis

    Most often errors are caused by
    1. Pointer errors
    2. Api misuse, such as using something in the wrong order (which actually leads to a pointer problem but it not really the cause.)
    Keep in mind that the fact that code runs 'ok' on one system is NOT a safe indicator that the above problems do not exist.
    If it is not that then if the binaries have incompatible build properties then that can cause problems.

  • Error -50400 occurred at Invoke Method: FIFO.Read in Host.vi

    Hey there,
    we have sensors on an Engine which are connected to a NI cRIO 9014 board (with a NI9411 6-channel digital input modul) and go from there via network to a host computer.
    cRIO board: the cRIO board collects the data from the engine and stores it in a buffer, this is because the network is to slow for the magnitude of data
    host computer: the host computer reads over the network the buffer on the cRIO board, on the host computer it takes out specific portions of the data to create pressure graphs of the engine
    Error: 
    Error -50400 occurred at Invoke Method: FIFO.Read in Host.vi
    Possible reason(s):
    The transfer did not complete within the timeout period or within the specified number of retries.
    This error occurs in the following scenario:
    - engine is running
    - cRIO is running
    When I press the start button (boolean 3) in the host.VI to start the reading of the data from the board AFTER I pressed the run button of the host VI. 
    The Error would not occur if I pressed the start button (boolean 3) BEFORE I pressed the run button of the host VI.
    We tried to increase the time out, but it still did not work, the error occurs!
    We would be really happy if you could look over it and help us in this case! If you need further informations or if we need to clarify some specific portion, please let us know!
    We included the VI's in the attachement!
    Thanks in advance!
    Solved!
    Go to Solution.
    Attachments:
    Host.vi ‏152 KB
    C_RIO.vi ‏92 KB
    Cyl_Pres.lvproj ‏196 KB

    Chrisse,
    There are a few things wrong in your application, if I may offer some suggestions.
    First, your while loops are not running in parallel.  In fact, they are in while loops with a true constant wired to them. I am not sure if this is by design for debugging, or on accident.  I would put the Polling(read pulling zero elements) outside your main while loop.
    Your second nested while loop (the one polling the # of elements and then pulling them out) is going to run just once, and may pull only a few samples.  I don't think that is what you are looking for here, and there are a couple ways we can go here.  You could continuously poll until you have 0 elements available for x amount of time, then you know you have no more samples available and you can process all the data OR you can put all of your data processing as part of that loop and just always write to file immediately as x samples are pulled.
    Also, your main loop's stop condition is (i <= 3) Therefore, it will run once and then stop.  Maybe you mean >=3?
    Also, you have 'append to file' disabled on your write to spreadsheet, so everytime you write you are overwriting old data.  If you want to continuously write, you will be losing data.  This can be cured by either setting this to true(requiring a new file name or programatically deleting the old spreadsheet every time you run the vi) OR you can collect all of your data in a shift register, and only write to file once you have all your data available.
    The error you are seeing is because you try to close your FPGA reference twice.  You only need to close it once.
    After seeing your overall picture, I think this can all be cured by simply hardwiring your Read to get your 1440X4 elements, but as we have seen, this does not work.  Something is happening in your system....this is what I want you to do...run just the following code...and let me know how many elements remaining it gives you...Once the number has settled(I hope it does and your engine doesn't keep running), hit stop, and all the values will be put on a graph for you.  My broken wires are because I do not have the FPGA VI.
    Message Edited by Robbob on 04-21-2009 01:48 PM
    Rob K
    Measurements Mechanical Engineer (C-Series, USB X-Series)
    National Instruments
    CompactRIO Developers Guide
    CompactRIO Out of the Box Video
    Attachments:
    numelements.jpg ‏39 KB

Maybe you are looking for

  • Never used Photoshop CS6 nor Adobe Bridge CS6, on my drive. Trash them before using CC?

    I am a photographer. I never used the Photoshop CS6 nor Adobe Bridge CS6, both of which are on my drive. I used Apple's Aperture software instead. a) should I trash them before downloading CC  (I don't see any Uninstall feature for them)? and, b) doe

  • ICal crawling SO SLOOOOOOWWW! Please Help!

    It's actually on my sister-in-laws 1.6ghz G5 Powermac, but I have run out of ideas to try and help her.. Granted, she has about 17 very full calenders, but there is definitely something wrong.... iCal takes about 8 seconds to launch, moving from fiel

  • Error: Inconsistent currency information J2I8

    Hi Experts, We are capturing the balance 50 % credit on capital goods using T-code J2I8 we are getting below error Inconsistent currency information Message no. F5725 Diagnosis Company code '6202' has currency type '10'. This currency type has the cu

  • Hp pavillion xg843 system number p3957a replacement cables and update hardware

    Spoiler (Highlight to read) microsoft me millennium 2000 and samsung 3000:1 monitor error analog cable?  I need cable for monitor and replacement for hp pavillion xg 843. microsoft me millennium 2000 and samsung 3000:1 monitor error analog cable?  I

  • Durable subscriptions and windows clients

    Hi, I think I have found a potential problem. Scenario MQ: 3.x or 4.x Clients: windows OS with Durable Subscriptions Destinations: Topic Problem: Disconnect a windows client with a durable subscription (for example, pulling the network cable) Try to