2007-09-25 19:34:21 UTC
Hi!
I have seen very few examples of usage of this terrific API.
I have used the JGDQuery but would like to use the benefits of the jgd.comapi but with very little success. I have probably missed something BIG but Please bare with me.
Could somone Please point this n00b into the direction of the "obvoious" solution
The simple code:
// It IS the correct path for the DLL
ComponentRegistrator registrator = new ComponentRegistrator( "./lib/gdapi/x86/");
// I get a warning which I think is normal (I shouldn't be doing this but the first time)
// But I don't know how to detect if the component is registered.
registrator.registerQueryComponent( registrator.getGUID());
// constructs a new query (registration of GDAPI is
// started if it's the first time) (Someone elses comment :-)
QueryCOM query = new QueryCOM( "CBRN");
// This query triggers the error stack, I have tried with 0, 20 but without any
// difference.
QueryResultSet results = query.execute( 1, 20);
Gives the uninformant (for me) message stack:
[INFO] JGDRegister - compReg=jgd.comapi.ComponentRegistrator@18237215{jacobDLLPath=N:\dokument\Martin\Projekt\CBRN\SearchEngine\lib\gdapi\x86\, GUID={488A5393-D843-4f60-A357-68EC5BA63C92}}
Exception in thread "main" com.jacob.com.ComFailException: Invoke of: Execute
Source:
Description:
at com.jacob.com.Dispatch.invokev(Native Method)
at com.jacob.com.Dispatch.invokev(Dispatch.java:945)
at com.jacob.com.Dispatch.callN(Dispatch.java:558)
at com.jacob.com.Dispatch.call(Dispatch.java:633)
at com.jacob.activeX.ActiveXComponent.invoke(ActiveXComponent.java:534)
at jgd.comapi.QueryCOM.execute(Unknown Source)
at jgd.comapi.QueryCOM.execute(Unknown Source)