Menu

#1 Collection's Item() method

open-works-for-me
nobody
None
5
2009-05-08
2009-05-08
AlexSpritze
No

Calling the method Item() on the collections Messages and Recipients will cause an Exception:

org.jxchange.client.cdo121.JXCdoException: Exception occurred. [0x80020009]
at org.jxchange.client.cdo121.JXCdoRecipients.Item(JXCdoRecipients.java:167)
at org.jxchange.client.tests.JXCdoMyOwn_Test.checkRecipients(JXCdoMyOwn_Test.java:180)
at org.jxchange.client.tests.JXCdoMyOwn_Test.accessingTheInbox(JXCdoMyOwn_Test.java:278)
at org.jxchange.client.tests.JXCdoMyOwn_Test.main(JXCdoMyOwn_Test.java:108)
Caused by: org.jinterop.dcom.impls.automation.JIAutomationException: Exception occurred. [0x80020009]
at org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:333)
at org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:520)
at org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:526)
at org.jinterop.dcom.impls.automation.JIDispatchImpl.callMethodA(JIDispatchImpl.java:477)
at org.jxchange.client.cdo121.JXCdoRecipients.Item(JXCdoRecipients.java:166)
... 3 more
Caused by: org.jinterop.dcom.common.JIRuntimeException: Exception occurred. [0x80020009]
at org.jinterop.dcom.core.JICallBuilder.readResult(JICallBuilder.java:1078)
at org.jinterop.dcom.core.JICallBuilder.read(JICallBuilder.java:957)
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.call(JIComServer.java:870)
at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:825)
at org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:266)
at org.jinterop.dcom.core.JIComObjectImpl.call(JIComObjectImpl.java:153)
at org.jinterop.dcom.impls.automation.JIDispatchImpl.invoke(JIDispatchImpl.java:315)
... 7 more

It seems that instead of

return me.callMethodA("Item", new Object[] { Index })[0];

this line works:

return me.get("Item", new Object[] { Index })[0];

This one applies to Messages.Item() also. About the other six Collections I can't tell if they work and use or use not this call.
The idea for the code change is mentioned in this thread:
https://sourceforge.net/forum/forum.php?thread_id=3123561&forum_id=730937

Discussion

  • AlexSpritze

    AlexSpritze - 2009-05-08
    • status: open --> open-works-for-me
     
  • AlexSpritze

    AlexSpritze - 2009-05-08

    I was wrong: Messages already uses me.get(..) in the Item(..) method.
    What I meant was: Attachments and Recipients does not use it.

    The other collections Item(..) methods:
    InfoStores uses me.get()
    Folders uses me.get()
    Fields uses me.get()
    AddressEntries uses me.get()
    AddressLists uses me.get()

    So actually only Recipients and Attachments should be bugfixed.

     
MongoDB Logo MongoDB