Menu

Can't map name to dispid: Session

Help
Nick
2005-03-05
2013-05-20
  • Nick

    Nick - 2005-03-05

    My java/jacob app connects to MS Outlook. It uses the folder picker and does reads, adds, and edits to contacts, appointments, and tasks.

    One of my users got the following exception:

    com.jacob.com.ComFailException: Can't map name to dispid: Session
    at com.jacob.com.Dispatch.invokev(Native Method)
    at com.jacob.com.Dispatch.invokev(Dispatch.java:384)
    at com.jacob.com.Dispatch.get(Dispatch.java:512)

    Is there anything other than not having Outlook installed that could cause this error?

    Thanks,

    - Nick

     
    • clay_shooter

      clay_shooter - 2005-03-05

      version and installed patch differences?
      Security preferences?

       
    • Rauchhaupt

      Rauchhaupt - 2005-03-09

      I have nearly the same Problem. I start my Lib with COM-traffic to Outlook (via Jacob) on 2 ways. As a normal Java Applicationthere is no error. The same Programm started with WebStart gets several errors (see below). The Problem occurs with 1.7 as well as with 1.9. Generally WebStart cant be the problem, because I used Jacob with nearly the same code in another Project and there it was ok.

      com.jacob.com.ComFailException: Can't map name to dispid: Items
          at com.jacob.com.Dispatch.invokev(Native Method)
          at com.jacob.com.Dispatch.invokev(Dispatch.java:804)
          at com.jacob.com.Dispatch.get(Dispatch.java:1153)
          at de.heitec.core.office.outlook.accessing.MAPIFolder.getItems(MAPIFolder.java:77)

      AND

      com.jacob.com.ComFailException: Can't map name to dispid: Items
          at com.jacob.com.Dispatch.invokev(Native Method)
          at com.jacob.com.Dispatch.invokev(Dispatch.java:804)
          at com.jacob.com.Dispatch.get(Dispatch.java:1153)

       
      • Rauchhaupt

        Rauchhaupt - 2005-03-09

        Sorry. The first Error was

        com.jacob.com.ComFailException: Can't map name to dispid: Name
            at com.jacob.com.Dispatch.invokev(Native Method)
            at com.jacob.com.Dispatch.invokev(Dispatch.java:804)
            at com.jacob.com.Dispatch.get(Dispatch.java:1153)
            at de.heitec.core.office.outlook.accessing.UApplication.getName(UApplication.java:65)

         
    • Rauchhaupt

      Rauchhaupt - 2005-03-10

      OK. We found the Problem. The problem is not JACOB. It is a Problem with JNI (or the JNI context for a DLL). Never use the same DLL in different threads! We use now a Factory Pattern, that raises a new Lib instance for each Thread (simply use Thread.currentThread ().getName() ). Now it works.

       
    • clay_shooter

      clay_shooter - 2005-03-11

      There are other folks using Jacob in multi threaded environments without problems.   I wonder if it is that or if we have non thread safe C++ code.

       

Log in to post a comment.