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.

Similar Messages

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

  • 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

  • Ws compile client generates wrong method signature

    Hi,
    the wscompile - option client - always generates the wrong method signature in the class AdresseIF_Stub:
    --> public de.skkoeln.webservice.web.Adresse_Type[]
    I need the signature public de.skkoeln.webservice.web.Adresse[] due to I can't compile the generated classes. This is the signature of the AdresseIF interface.
    What is my fault ?
    Oliver
    Adresse ist the JavaClass which I expect to get as return value. The webservice was successfully installed

    Oliver, is it only wrong in the stub? Does all of the generated code compile? If it all compiles then there is no error. The reason the _Type was added is because they are other WSDL names that have the same name.  Please read section 4.3.12 of the JAXRPC spec for more detail.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I have an ipad that has photos on it, and am trying to get those photos to an SDHC card. I put the card in my camera connection kit device and went to the slideshow option and selected copy and nothing happened. Am I using the wrong method?

    I am trying to get photos from a friends i pad to mine so that I can make a slide show for him. I tried using my i pad camera connection kit with a SDHC card in it and followed the instructions in the manual. I got to the part where it had me select COPY from the drop down menu. When I did that nothing happened. Can this be done at all?

    only option is to download an app for bluetooth transfer which may be quite slow, checkout 'Bump' or search for photo transfer or similar.

  • Methods returning the wrong values...

    Hi,
    I've managed to get my hands on vb6 (though, it would be really nice if there was vb .net support.. I thougt this was coming in 1.5?) and have run into a rather odd problem. get Methods seem to return values from the wrong methods! For example, let's pretend my activex control stores values about a person. getName would return their age, while getAge might return null! Something is also going wrong with my method that accepts input and returns a value (okay, it is a money conversion program!)... it is returning null!
    I have verified that all these methods work perfectly by running the code in JBuilder with a Main class.
    Any idea what to do?
    (or how to make it work in .net!!!)
    Thanks!

    Wow!! I think the key was using the CreateObject command. I was adding it as a control, like I would a textbox. Things are working perfectly as far as I can tell! I wonder how I am supposed to test it in the vb6 testbox then.. Hrm.. Odd.
    This is great, though!! Thanks so much. :)

  • Error during F110 - No Valid Payment Method found

    Hi SAP Gurus,
    During F110 (APP) i am getting the error msg as "No Valid Payment Method Found". In FBZP i have checked all the setting and which looks ok to me.
    But we i look at the log it says that (Payment must take place before 17 Aug 2010 next payment on 30 Sep 2010) Please note all the line items are entered on 17 Aug 2010 and Payment terms as 001 which is due immediately.
    In the Paramaters for F110 i have entered (Posting Date 25 Aug 2010) (Docs entered up to 25 Aug 2010) (Next P/Date 30 Sep 2010).
    The second error that is displayed in the LOG is (No amount has been scheduled for currency USD and at least 999 days' life).
    Kindly note in the value date field i have entered as 999 days.
    Please advice why this error are coming i have checked all the configuration
    Regards.

    Your first error is because no document has been found for the payment method you entered in the parameters tab.  This can be due to a wrong method entered here or a different/no method found in the payment due documents.
    Reg your second error, check the value date entry for the payment method and house bank account selected in the run.  I think the entry is missing for currency USD (or may be you have selected a wrong bank account which has currency USD) in that table.
    Ravi.

  • Message body part inputstream wrong size

    Hi to everyone,
    I'm trying to download a message (created with JavaMail) from a server: the attachment is 345.302 byte, but when I get the InputStream of the part, the available() method returns "354388".
    This is the code:
    // getting the message multipart
    Multipart mp = (Multipart)message.getContent();
    // getting the stream
    InputStream in = mp.getBodyPart(1).getInputStream();
    // showing the attachment size
    System.out.println(in.available());
    // reading the content
    byte[] data = new byte[in.available()];
    in.read(data);
    // closing the stream
    in.close();When I download the message with Thunderbird, the size of the attachment is correct... and when I store the attachment with Java, there are a few bytes at the end of the file (empty values).
    Is it a bug? Am I using wrong methods?
    Thank you for intresting

    Just to be clear, the available() method always returns only an estimate
    of the number of bytes that can be read without blocking. In the case of encoded
    data in a mail message, there's no way to determine how many bytes exist
    after decoding without reading all the data and decoding it. You certainly
    wouldn't want JavaMail to do that and throw away all the data so that you
    could read it again yourself. The approach you figured out is the correct
    approach, although you might want to consider reading a buffer at a time
    instead of a byte at a time.

  • Multiple Row Transaction and prepareForDML method

    Hi
    I want to create dept and employees record on the same page. For each employee record I created I want to update the average salary field on dept table and create some employee related records. For this I override the prepareForDML method on EmployeeImpl class and do updates and creations depending on the post state of the employee object. Say that I created one department record and and 10 employee record. If employee record passes validation its prepareForDMl method executed, if not it's not executed and entire transaction fails. If I correct the invalid employee records and press commit, for all employees prepareForDMl method is executed again and all with POSTSTATE STATUS_NEW even the ones that passed validation and executed prepareForDML in the first trial. So my update regarding average salary would be wrong and I would be creating more than one employee related record which is also wrong. How can I undo the changes made in prepareForDML? is the prepareForDML the wrong method to implement such things? I tried setclearcacheonRollback(false|true), jbo.txn.handleafterpostexc(true|false) parameters to no avail. I appreciate your helps?
    Best Regards,
    Salim

    Hi
    I want to create dept and employees record on the same page. For each employee record I created I want to update the average salary field on dept table and create some employee related records. For this I override the prepareForDML method on EmployeeImpl class and do updates and creations depending on the post state of the employee object. Say that I created one department record and and 10 employee record. If employee record passes validation its prepareForDMl method executed, if not it's not executed and entire transaction fails. If I correct the invalid employee records and press commit, for all employees prepareForDMl method is executed again and all with POSTSTATE STATUS_NEW even the ones that passed validation and executed prepareForDML in the first trial. So my update regarding average salary would be wrong and I would be creating more than one employee related record which is also wrong. How can I undo the changes made in prepareForDML? is the prepareForDML the wrong method to implement such things? I tried setclearcacheonRollback(false|true), jbo.txn.handleafterpostexc(true|false) parameters to no avail. I appreciate your helps?
    Best Regards,
    Salim

  • Implementing Empty Versions of Interface Methods with Return Types

    Subject probably is probably a bit long but I was stumped for a brief way to summarize my question. Let's say I have the interface below:
    public interface DAO {
        ...snip...
        public Object get(int id);
        public Object[] get(String clause);
        ...snip...
    }From this I want to make two concrete classes, say ClassOne and ClassTwo. Given the type of data each one is fetching, ClassOne only needs (and should only) implement get(int id) and ClassTwo only needs (and should only) implement get(String clause). This is because the first class will always deal with only one record from table_a and the second class will always deal with one or more records from table_b. So my question is what is the correct way to provide empty implementations for the unnecessary methods?
    I've thought of using an adapter to implement empty methods but a) I'm not sure that makes sense and b) I still end up have to return something. Another option was maybe having multiple interfaces, one returning a single object and the other returning an array. Neither of those options felt right and looked a bit goofy when I prototyped them out. It seems to me that I wouldn't want the classes using the concrete DAO classes to be able to call the wrong method, but I don't know how to hide the unused method. Right now I just return an empty Object or Object[] for the unused method but that seems goofy too, and makes the class using ClassOne or ClassTwo know the innards of the implementations.
    Anyway, any tips appreciated.
    Thanks,
    Pablo

    It sounds as if the methods weren't meant to be together, and so I'm wondering if you aren't better off with two distinct interfaces, one for each method. Otherwise one solution would be to implement a method that throws an exception if it is not meant to be called.
    edit: D'oh! Just when you least expect them, Ninjas! They're everywhere!
    Edited by: Encephalopathic on Apr 30, 2009 1:41 PM

  • Problem calling a Java Method from C++

    hi everyone,
    i'm using JNI and i'm trying to call a Java method from C++, this is the code:
    SocketC.java
    public class SocketC
    private native void conectaServidor();
    private void recibeBuffer()
    System.out.println("HELLO!!!");
    public static void main(String args[])
    SocketC SC = new SocketC();
    SC.conectaServidor();
    static {
    System.loadLibrary("Server_TCP");
    Server_TCP.cpp
    char* recibirSock()
         int _flag = 1;
         while(_flag != 0)
              memset(buffer,0,sizeof(buffer));//Et la, celle pour recevoir
              recv(sock,buffer,sizeof(buffer),0);
              printf(" Mensaje del cliente: %s\n",buffer);
              _flag = strcmp(buffer,"salir");
         }//fin while
         return buffer;
    void enviarSock()
         int _flag = 1;
         getchar();
         while(_flag != 0)
              memset(buffer,0,sizeof(buffer));//procedimiento para enviar
              printf("\n Escriba: ");
              gets(buffer);
         //     err=scanf("%s",buffer);
              send(sock,buffer,sizeof(buffer),0);
              _flag = strcmp(buffer,"salir");
         }//fin while
    }//fin enviarSock
    DWORD servicio(LPVOID lpvoid)//
         char *buf;
         printf("\n Cliente aceptado!!!!!\n");
         buf=recibirSock();
         return 0;
    JNIEXPORT void JNICALL Java_SocketC_conectaServidor(JNIEnv *env, jobject obj)
    //void main()
    /*this is the problem i'm calling the method recibeBuffer*/
         jclass cls = env->GetObjectClass(obj);
         jmethodID mmid = env->GetMethodID(cls, "recibeBuffer", "(V)V");
         if (mmid == 0)
              return;
         env->CallVoidMethod(obj, mmid); //llama a Java
         WSAStartup(MAKEWORD(2,0),&wsa);//MAKEWORD dit qu'on utilise la version 2 de winsock
         printf("TCP conexion Sockets\n\n");
         //estimez vous heureux que je foute pas de copyright ;)
         system("TITLE TCP Conexion Sockets (Version server)");
         //fo avouer que c'est plus joli
         int port;
         printf("Port : ");//On demande juste le port, pas besoin d'ip on est sur un server
         scanf("%i",&port);
         sinserv.sin_family=AF_INET;     //Je ne connais pas d'autres familles
         sinserv.sin_addr.s_addr=INADDR_ANY;//Pas besoin d'ip pour le server
         sinserv.sin_port=htons(port);
         server=socket(AF_INET,SOCK_STREAM,0);//On construit le server
         //SOCK_STREAM pour le TCP
         bind(server,(SOCKADDR*)&sinserv,sizeof(sinserv));
         //On lie les parametres du socket avec le socket lui meme
         listen(server,SOMAXCONN);//On se met � �couter avec server, 0 pour n'accepter qu'une seule connection
         printf(" Servidor conectado.");
         while(1)
              sinsize=sizeof(sin);
              if((sock=accept(server,(SOCKADDR*)&sin,&sinsize))!=INVALID_SOCKET)
              {//accept : acepta cualquier conexion
                   if (hReadThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)
                   servicio, 0, 0, &dwThreadID))
                        printf("\nHOLA!");
                        GetExitCodeThread(hReadThread,&dwExitCode);
                        CloseHandle (hReadThread);
                   else
                        // Could not create the read thread.
                        printf("No se pudo crear");
                        exit(0);
    when i'm running the proyect i get this error:
    C:\POT Files\UCAB\tesis\esmart\french>java SocketC
    Exception in thread "main" java.lang.NoSuchMethodError: recibeBuffer
    at SocketC.conectaServidor(Native Method)
    at SocketC.main(SocketC.java:16)
    i don't know why this is happening i got declare the method recibeBuffer in my SocketC.java class, but doesn;t work can anyone help me?
    PD: sorry for my bad english i'm from Venezuela

    Next time please paste your code between &#91;code&#93; tags with the code button just above the edit message area.
    To answer your question, you wrote the wrong method signature. It should be:jmethodID mmid = env->GetMethodID(cls, "recibeBuffer", "()V");Regards

  • Step by Step guide for upload iPad only apps

    Please note that this is not derived from me alone.
    This Knowledge is derived from three forum members, DutyFarm, ChoosingNameCanBeSoXXX & Dei_Machiavelli.
    I just add the solution for generate the .xcent file.
    [Atleast enough for me to make it work.]
    Welcome that if anyone find that this step by step guide not detail enough, you can copy and add more points and post again.
    Step 1:
    Make sure that all the Icons for the iPad are accounted for because if you don't, Application Loader will Scream
    [For some strange reason, you have to add the Old iPhone Icon Size as well]:
                             Old iPhone: 57 by 57 [Icon]
                 Start Up Icon for iPad: 72 by 72 [Icon-iPad.png].
    SpotLight Search for iPad Must Have: 48 by 48 [Icon-iPad-spot.png]
    Step 2:
    Load the Mac, unzip your *.ipa file, place the *.app file on your desktop and modify its internal Info.plist file.
    Change 3.0 to 3.2 here:
    <key>MinimumOSVersion</key>
    <string>3.2</string>
    Step 3:
    Because after you change the Info.plist file by your own way, the file will changed to wrong codesign.
    So that will need this step to change it back to right codesign which can success upload to apple store.
    Create this weird NameOfYourApp.xcent file on your desktop:
    That strange 10 digit is the App ID:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>application-identifier</key>
        <string>APP_ID_Letters_&_NUMBER_HERE.com.whatever.YourAppName</string >
        <key>get-task-allow</key>
        <true/>
    </dict>
    </plist>
    Step 4:
    Now Type this in Terminal:
    /usr/bin/codesign -f -s "iPhone Distribution: Yours Distribution Cert Name" "--resource-rules=/Users/ABC/Desktop/YourAppName.app/ResourceRules.pl ist" --entitlements "/Users/ABC/Desktop/YourAppName.xcent" "/Users/ABC/Desktop/YourAppName.app"
    iPhone Distribution: Yours Distribution Cert Name  << This you can check back at your Cert in  Keychain.
    /Users/ABC/Desktop/ : here is assume that your username in you Mac OS is ABC. But more easily, you can put all the file at any path you want.
    I just put all files at the iPad folder at system disk root. so that the path just /iPad/ .
    OK, if no error come out, congrats that you are done. You can upload the app by Application Loader. (Assume that you know what is it, and need to zip you .ipa before upload)
    BUT, LIKE ME and some member here, we see two error after the Step 4 command as below:
    /Users/kevs/Desktop/MyApp.xcent: unrecognized blob type (accepting blindly)
    /Users/kevs/Desktop/MyApp.xcent: invalid length in entitlement blob
    After few night try..... finally I found out the solution and just successfully submit the iPad App!!!
    The main problem was we used a wrong method to create that stupid MyApp.xcent file!!!!
    I used many many method, use Mac text editor, Window notepad, Mac/ Window Dreamweaver as .xml......
    but all facing the strange "invalid length in entitlement blob"
    why invalid length?!?! so I try to search for what is .xcent..... finally I found the following webpage
    http://www.246tnt.com/iPhone/
    it's talk about codesign and entitlement files.
    then..... I FOUND .xcent NOT ONLY A SAMLPE TEXT FILE!!!!!
    in the middle of the link above, there are a highlighted simple script , which is a python script to help us generate a .xcent entitlement file!!!!!
    Here is step by step solution to solve this error:
    1) just download the .py file here: simple script
    2) put the .py file anywhere you like, or just simply put in the root of you mac
    3) turn on the Terminal (in /Applications/Utilities), goto the folder where you put the .py
    4) TYPE: python gen_entitlements.py 5C297XXXXX.com.yourdomain.MyApp myApp.xcent
        Where 5C297XXXXX.com.yourdomain.MyApp is your AppID with BundleID,
        myApp.xcent is the file will be generate to you
    5) Finally you can see the .xcent which make me nearly crazy for a week!!!!!!!!
    6) Use this .xcent file to run that codesign script (Step 4 above)
    7) Congratulation the codesign changed and you can zip your app and upload it
    I have spent many hours for this simple stuff.........so sad........>.<
    Hope this post can help all guys who still mad on this error when trying to upload a iPad only apps.
    Good luck!!

    I think I followed everything very closely, but I am getting these errors when trying to run the codesign script
    here is my script command:
    /usr/bin/codesign -f -s "iPhone Distribution: Nethercottage Games, LLC" "--resource-rules=/Users/BATC/Desktop/book1.app/ResourceRules.plist" --entitlements "/Users/BATC/Desktop/book1.xcent" "/Users/BATC/Desktop/book1.app"
    Here is the error I get:
    /Users/BATC/Desktop/book1.app: replacing invalid existing signature
    codesign_allocate: object: /Users/BATC/Desktop/book1.app/book1 malformed object (unknown load command 9)
    /Users/BATC/Desktop/book1.app: object file format invalid or unsuitable
    Any help on this please?

  • Problem with JTree converting Node to string

    I have a problem that I cannot slove with JTree. I have a DefaultMutalbeTreeNode and I need its parent and convert to string. I can get its parent OK but cannot convert it to string.
    thisnode.getParent().toString() won't work and gives an exception
    thisnode.getParent() works but how do I convert this to string to be used by a database.
    Thanks
    Peter Loo

    You are using the wrong method to convert it to a String array.
    Try replacing this line:
    String[] tabStr = (String[])strList.toArray();
    With this line:
    String[] tabStr = (String[])strList.toArray( new String[ 0 ] );
    That should work for you.

  • Blocking locks encountered while splitting partitions in 11g

    Background: I've taken over administration of a database that has several date-range partitioned tables that, suffering from a lack of proper administration, have not had their MAXVALUE partition split into the requisite monthly partitions, in almost a year. As a result, in some cases the MAXVALUE partition has 10 million rows (the monthly partitions should average 750K rows).
    My understanding is that the syntax I am using to perform the split, should allow for on-line access to the tables while the split is being performed. Here is my syntax without the actual table names:
    ALTER TABLE owner.table_name
    SPLIT PARTITION MAXVALUE AT
    (TO_DATE(' 2012-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    INTO (PARTITION PART201201
    TABLESPACE tablespace
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255,
    PARTITION MAXVALUE) update indexes;
    Problem: In attempting to split the MAXVALUE partition into monthly partitions while the database is on-line and accessible, I see application sessions being blocked by my split session.
    So, is my understanding above incorrect? Is there some additional syntax that I am missing? Or, are the blocking locks I'm seeing merely transient in nature, and can be ignored? The server I'm running on is not very "beefy", and the split is taking quite a while to run.
    Any assistance would be appreciated.

    >
    Background: I've taken over administration of a database that has several date-range partitioned tables that, suffering from a lack of proper administration, have not had their MAXVALUE partition split into the requisite monthly partitions, in almost a year. As a result, in some cases the MAXVALUE partition has 10 million rows (the monthly partitions should average 750K rows).
    My understanding is that the syntax I am using to perform the split, should allow for on-line access to the tables while the split is being performed.
    Problem: In attempting to split the MAXVALUE partition into monthly partitions while the database is on-line and accessible, I see application sessions being blocked by my split session.
    So, is my understanding above incorrect? Is there some additional syntax that I am missing? Or, are the blocking locks I'm seeing merely transient in nature, and can be ignored? The server I'm running on is not very "beefy", and the split is taking quite a while to run.
    >
    DML that modifies the table cannot be performed on the table while the split is ongoing.
    Your bigger problem is that you are using the WRONG method for your use case. If you repeatedly split the MAXVALUE partition you will be repeatedly copying and moving the same ultimate MAXVALUE data over and over again.
    DBMS_REDEFINITION is one of your options. But since I just answered this same question 3 days ago see my reply in this thread for a more thorough discussion of your options.
    Re: Which is the Best method to Split Partition

Maybe you are looking for

  • HT4356 HP LaserJet Pro M1217nfw MFP.  AirPrint issues.

    My printer, the HP LaserJet Pro M1217nfw MFP, is listed above as an AirPrint-enabled printer model, but I am still receiving the "No AirPrint Printers Found" message.  Since I have successfully printed from three PCs connected to the WiFi, I know the

  • Installation number and client copy

    Hi Gurus, Is client copy possible between two systems which has got two different installation numbers? This is a very basic question I know, but i don't see any other source of information. Even the client copy pre-requisites doesn't tell anything a

  • Adobe Media Encoder CS4 crash on startup

    Hello, I've been using and troubleshooting with the help of Adobe forums for quite a few years now (thank you to everyone), but I don't recall actually ever posting anything, as of yet. Problem:  Adobe Media Encoder was working fine yesterday and tod

  • Document Signature - Popup on 2nd Signature

    I have a document that requires 2 signatures. The 2nd signer gets the following message popup: "The document contained certain rights to enable special features in Adobe Reader. The document has been changed since it was created and these rights are

  • Siri menu tab is missing

    Hi at all, after the install iOS 8 and reload my backup, SIRI is missing in the Settings Tab. These error is on both devices iPad-Air and iPhone6. Has anyone an idea how i can reactivate the menu in settings without a reinstall? thanks Alex