I am new to Java-IDL bridge. I created a Java export bridge for my custom IDL class. This class has an INIT method that takes in a string argument designating a file name. However, when I tried to create IDL bridge object from within my Java client bridge code, I got the exception complaining about invalid arguments:
C:\foo>java -cp .;build;\Progra~1\ITT\IDL70\resource\bridges\export\java\javaidlb.jar -DIDL_LOAD_DEBUG IdlBridge
Java location : C:\Program Files\Java\jdk1.6.0_01\jre\bin (set relative to java.
home property)
EBUtils location : C:\Program Files\ITT\IDL70\resource\bridges\export\java\..\..
\..\..\bin\bin.x86 (set relative to javaidlb.jar)
Successfully loaded idl_ebutil.dll
JavaPALDir location : C:\Program Files\ITT\IDL70\bin\bin.x86\
BMLDir location : C:\Program Files\ITT\IDL70\bin\bin.x86\
Successfully loaded idl_bml.dll
Successfully loaded awt.dll
Successfully loaded jawt.dll
Successfully loaded javaidlb.dll
Exception in thread "main" com.idl.javaidl.JIDLException[iErr=-999 sMsg=Argument
s are invalid for this call.]
at com.idl.javaidl.JIDLPAL.nativeThrowJIDLException(Native Method)
at com.idl.javaidl.JIDLPAL.throwSpecificException(JIDLPAL.java:1069)
at com.idl.javaidl.JIDLPAL.throwJIDLException(JIDLPAL.java:1098)
at com.idl.javaidl.JIDLPAL.createObject(JIDLPAL.java:378)
at com.idl.javaidl.JIDLPAL.createObject(JIDLPAL.java:314)
at com.idl.javaidl.JIDLObject.createObject(JIDLObject.java:193)
at com.idl.javaidl.JIDLObject.createObject(JIDLObject.java:151)
at IdlBridge.main(IdlBridge.java:29)
The code to create the exported IDL object is as follows:
public class IdlBridge extends IdlObject
{
public static void main(String[] args)
{
IdlBridge idlBridge = new IdlBridge();
int argc = 1;
Object[] argv = { new JIDLString("\\test\\testfile1") };
int[] argp = { JIDLConst.PARMFLAG_CONST };
idlBridge.createObject(argc, argv, argp);
}
}
I am not sure what the problem is. I tried to set the IDL_PATH environment variable to include the directory of the IDL source file for the Java export bridge. But the problem did not go away. The IDL runtime library is still complaining about the invalid arguments during the object creation process.
William
|