Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Reg:com.jacob.com.ComFailException

843829Mar 6 2006
Hi..

When im calling a VB method in Java through Jacob,i encontered the following exception

com.jacob.com.ComFailException: A COM exception has been encountered:

At Invoke of: RetrieveTask

Description: Does not support a collection.

at com.jacob.com.Dispatch.invokev(Native Method)
at com.jacob.com.Dispatch.invokev(Dispatch.java:804)
at com.jacob.com.Dispatch.callN(Dispatch.java:440)
at com.jacob.com.Dispatch.call(Dispatch.java:531)
at com.ivesia.etg.sync.client.Activities.getNewRecords(Activities.java:1148)
at com.ivesia.etg.sync.client.ActivitiesDataSync.getNewRecords(ActivitiesDataSync.java:228)
at com.ivesia.etg.sync.SyncController.syncTables(SyncController.java:269)
at com.ivesia.etg.sync.SyncController.sync(SyncController.java:190)
at client.SyncTool$RunSync.run(SyncTool.java:730)


The code where i called the VB method is specified below

public Document getNewRecords()
{
Document docResult = null;
DOMUtil objDOMUtil = null;
try {

objDOMUtil = new DOMUtil();
Dispatch testdoc = new Dispatch("sync.OutlookSync");
com.jacob.com.Variant varStr = Dispatch.call(testdoc, "RetrieveTask", strDeviceId, strUserId);

//Retreive Task is the method that is caled from VB.This method gives XML file as an input to the Java File.

String strVBDoc = varStr.getString();
if(!Util.isEmpty(strVBDoc.trim())) {
docResult = objDOMUtil.stringToXML(strVBDoc);
}
}catch(Exception ex) {
ex.printStackTrace();
}
finally {
}
return docResult;
}


Pls.can any one help me out to solve this problem

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 3 2006
Added on Mar 6 2006
0 comments
188 views