#12 Connection to MS Outlook causes a win32 exception

open
nobody
None
5
2015-01-01
2009-09-17
Anonymous
No

INFO: creating ComServer
org.jinterop.dcom.common.JIException: Server execution failed. [0x80080005]
at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:550)
at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:458)
at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:396)
at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:350)
at com.scope.kiss.client.util.dcom.MSOutlook2.init(MSOutlook2.java:61)
at com.scope.kiss.client.util.dcom.MSOutlook2.main(MSOutlook2.java:22)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Server execution failed. [0x80080005]
at org.jinterop.dcom.core.JIRemActivation.read(JIRemActivation.java:191)
at ndr.NdrObject.decode(NdrObject.java:19)
at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:138)
at rpc.Stub.call(Stub.java:112)
at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:538)
... 5 more

Discussion

  • heinzi

    heinzi - 2009-09-17

    This only happens when outlook 2007 sp2 is running. if it is not running it works fine.

     
  • heinzi

    heinzi - 2009-09-17

    source:

    OUTLOOK_ID = "Outlook.Application";

    private void init() throws Exception {
    LOG.info("starting");
    JISystem.setAutoRegisteration(true);
    host = InetAddress.getLocalHost().getHostAddress();

    LOG.info("creating session");
    JISystem.getLogger().setLevel(Level.WARNING);
    session = JISession.createSession(host, user, password);
    LOG.info("creating ComServer");
    comServer = new JIComServer(JIProgId.valueOf(OUTLOOK_ID), session);

    LOG.info("connecting to outlook");
    outlookDCOM = comServer.createInstance();
    outlookDispatch = (IJIDispatch) JIObjectFactory.narrowObject(outlookDCOM.queryInterface(IJIDispatch.IID));

    LOG.info("showing some outlook info");
    JIVariant nameInfo = outlookDispatch.get("Name");
    System.out.println("Outlook Name " + nameInfo.getObjectAsString().getString());

    JIVariant versionInfo = outlookDispatch.get("Version");
    System.out.println("Outlook Version " + versionInfo.getObjectAsString().getString());

    }
    }

     
  • Vikram Roopchand

    Hi,
    The crash occurs as soon as you create the Outlook COM component , is that right ? Did you try with a native Windows application built on VB or VC++ ? If that succeeds could please attach a wireshark capture of that interaction here.

    If the VB\VC applications are not available, please use OleView (available freely from MS) and instantiate the Outlook application from there.

    thanks,
    best regards,
    Vikram

     
  • heinzi

    heinzi - 2009-09-23

    Hello, i attached a C# Program, thats the .NET language i am the fittest in.
    I attached both Code plus the Wireshark capture. I hope the capture is useful to you, i havent used wireshark since they changed their name.

    Also i forgot to mention:
    Operation System is WinXP Prof. SP3
    and the code i posted initially in the bugreport works with version 2.05 (!)

     
  • Vikram Roopchand

    Wait , you mean the code WORKS with j-Interop 2.05 but crashes with j-Interop 2.06 ?

     
  • heinzi

    heinzi - 2009-09-23

    yes, exactly. we evaluted with 2.05 but now we get the usual win32 Visual Studio Popup.

    i put everything on my student webspace: http://stud4.tuwien.ac.at/~e0325848/outlook.zip (15kb) dont know how to attach here.

     
  • Vikram Roopchand

    Hi,
    The capture is incomplete, no packets of COM captured. Could you please do it again and this time also provide a capture of 2.06 j-Interop.

    best regards,
    Vikram

     

Log in to post a comment.