2 Replies Latest reply: May 15, 2006 10:35 AM by 414326 RSS

    create contact returns -- CAPI_STAT_LIBRARY_INTERNAL_COSMICRAY

    480794
      I am not able to figure out this cause of this message.

      The code i am using to create a contact is:

      private void createCalendarContact() {
                
                RequestResult results = new RequestResult();

                String s = "";
                s += "Content-Type: text/x-vard; charset=UTF-8\n";
                s += "Content-Disposition: attachment; filename=\"\"\n";
                s += "Content-Transfer-Encoding: QUOTED-PRINTABLE\n\n";
                s+= "BEGIN:VCARD\n";
                s+= "TITLE:dba\n";
                s+= "ADR;TYPE=WORK:;; javk;xyz;;3333;ddd\n";
                s+= "N;ENCODING=QUOTED-PRINTABLE:Jills;Joyce\n";
                s+= "FN;ENCODING=QUOTED-PRINTABLE:Joyce=20Jills\n";
                s+= "REV:20060120T151337Z\n";
                s+= "VERSION:3.0\n";
                s+= "END:VCARD\n";


                System.out.println(s);
                try {
                     mySession.storeContacts(Api.CSDK_FLAG_STORE_CREATE | Api.CSDK_FLAG_STREAM_NOT_MIME,s,results);
                     System.out.println("Status is :" + results.getFirstResult().getStatus());
                     System.out.println("Contact Created");
                
                     // results.getFirstFailure();
                //     System.out.println(results.toString());
                }
                catch (Api.StatusException e)
                {
                     System.out.println("storeContacts returned status'" + e.getMessage() + "'");
                     System.out.println("storeContacts returned status'" + e + "'");
                     e.printStackTrace();
                }
                
           }


      The return is

      user: orcladmin
      Content-Type: text/x-vard; charset=UTF-8
      Content-Disposition: attachment; filename=""
      Content-Transfer-Encoding: QUOTED-PRINTABLE

      BEGIN:VCARD
      TITLE:dba
      ADR;TYPE=WORK:;;x;y;;'11212;z
      N;ENCODING=QUOTED-PRINTABLE:Jills;Joyce
      FN;ENCODING=QUOTED-PRINTABLE:Joyce=20Jills
      REV:20060120T151337Z
      VERSION:3.0
      END:VCARD

      storeContacts returned status'CAPI_STAT_LIBRARY_INTERNAL_COSMICRAY'
      storeContacts returned status'oracle.calendar.sdk.Api$StatusException: CAPI_STAT_LIBRARY_INTERNAL_COSMICRAY'

      Message was edited by:
      user477791
        • 1. Re: create contact returns -- CAPI_STAT_LIBRARY_INTERNAL_COSMICRAY
          480794
          Commenting out these lines and using the code above will insert the contact in the calendar server:

          s += "Content-Type: text/x-vard; charset=UTF-8\n";
          s += "Content-Disposition: attachment; filename=\"\"\n";
          s += "Content-Transfer-Encoding: QUOTED-PRINTABLE\n\n";

          This contact appers in the desktop client but when trying to retrieve the contact using
          fetchContactsByQuery retunes null;

          Does anyone get the same behavior... Can anyone share the vCard used to create contacts.
          • 2. Re: create contact returns -- CAPI_STAT_LIBRARY_INTERNAL_COSMICRAY
            414326
            The CAPI_STAT_LIBRARY_INTERNAL_COSMICRAY is not very helpfull for the end user, I will log a bug to have that error message, removed from the list of errors and have a meaningfull error retruned instead.

            For the issue with problems querying the contact, here is how you can have it working.

            Here is the output from a demo program, available in the 10G sdk package called CSDKCalendar.java.

            Enter VCARD property name
            FN
            Enter Operator
            startswith
            Enter Case Sensitive true or false
            false
            Enter Value
            Joy
            oracle.calendar.sdk.Query@1f9dc36
            BEGIN:VCARD
            UID:ORACLE:CALSERV:CONTACT/AAAAAQAAAVcD6AAAAAAAAAQCAAQAAAAA
            CLASS:PUBLIC
            REV:20060515T152832Z
            TITLE:dba
            ADR;TYPE=X-ORACLE-OTHER:;;;;;;
            ADR;TYPE=HOME:;;;;;;
            ADR;TYPE=WORK:;;x;y;;'11212;z
            N:Jills;Joyce;;;
            FN:Joyce Jills
            VERSION:3.0
            END:VCARD

            Currently the supported types for the queries are N, FN, BDAY, TITLE, ROLE, NOTE, CATEGORIES, NICKNAME, X-ORACLE-SPOUSE, X-ORACLE-ANNIVERSARY, X-ORACLE-OFFICE, and X-ORACLE-ASSISTANTNAME."

            Regards,
            Jean-Philippe