The IDL-Java bridge provides error messages for specific types of operations. These messages can be used to determine when these errors occur, how these errors happen, and what solutions can be applied. The following sections pertain to these error messages and their possible solutions for each type of operation:

Calling System.exit


The Java method System.exit terminates the process in which the Java Virtual Machine is running. When the Java Virtual Machine is initialized by IDL, terminating its process also terminates IDL.

Errors When Initializing the Bridge


The IDL-Java bridge initializes when the first Java object in IDL is created. If the bridge is not configured correctly, an error message is issued and the IDL stops. The following errors occur because the IDL-Java bridge cannot find the Java Virtual Machine on your system. On UNIX, check the IDLJAVAB_LIB_LOCATION environment variable, and on Windows, check the IDLJAVAB_LIB_LOCATION environment variable. If this environment variable does not exist on your system, create it and set it equal to the location of the Java Virtual Machine on your system. See Location of the Bridge Configuration File for details:

  • Bad JVM Home value: 'path', where path is the location of Java Virtual Machine on your system.
  • JVM shared lib not found in path 'JVM LibLocation', where JVM shared lib is the location of the Java Virtual Machine shared library and JVM LibLocation is the value of the IDLJAVAB_LIB_LOCATION environment variable.
  • No valid JVM shared library exists at location pointed to by $IDLJAVAB_LIB_LOCATION
  • idljavab.jar not found in path 'path', where path is the location of the /resource/bridges/import/java directory in the IDL distribution.
  • Bridge cannot determine which JVM to run
  • Java virtual machine failed to start
  • Failure loading JVM: path/JVM shared lib name, where path is the location of the Java Virtual Machine and JVM shared lib name is the name of the main Java shared library, which is usually libjvm.so on UNIX and jvm.dll on Windows.

If IDL catches an error and continues, subsequent attempts to call the bridge will generate the following message:

  • IDL-Java bridge is not running

If this message occurs, fix the error and restart IDL.

Errors When Creating Objects


The following error messages can occur while creating a Java object in IDL. Possible solutions for these errors are also provided:

  • Wrong number of parameters - occurs if OBJ_NEW does not have 2 or more parameters. Make sure you are specifying the class name twice; once in uppercase with periods replaced by underscores for IDL, and another with periods for Java. See Java Class Names in IDL for details.
  • Second parameter must be the Java class name - occurs if 2nd parameter is not an IDL string. When using OBJ_NEW, make sure the Java class name parameter is an IDL string. In other words, the class name has a single quote mark before and after it. See Java Class Names in IDL for details.
  • Class classname not found, where classname is the class name you specified in the first two parameters to OBJ_NEW - occurs if the IDL-Java bridge cannot find the class name specified. Check the spelling of each class name parameter and make sure the class name specified for IDL is referring to the same type of object specified for the Java class name. If the parameters are correct, check the Classpath setting in the IDL-Java bridge configuration file. Make sure the Classpath is set to the correct path for the class files containing the classname class. See Location of the Bridge Configuration File for details.
  • Class classname is not a public class, where classname is the class name you specified in the first two parameters to OBJ_NEW - occurs if specified class is not a public class. Edit your Java code to make sure the class you want to access is public.
  • Constructor class::class(signature) not found, where class is the class name - occurs if the IDL-Java bridge cannot find the class constructor with the given parameters. Check the spelling of the specified parameters and look in your Java code to see if you are specifying the correct arguments for the class you are trying to create. Also check to ensure your IDL data can be promoted to the data types in the Java signature. See Java Class Names in IDL for details.
  • Illegal IDL value in parameter n, where n is the position of the parameter - occurs if an illegal parameter type is provided. For example, an IDL structure is not allowed as a parameter to an IDLjavaObject.
  • Exception thrown - occurs if an exception occurs in Java. Either correct or handle the Java exception. The Java exception can be determined with the IDLJavaBridgeSession object. See The IDLJavaBridgeSession Object for details.

Errors When Calling Methods


The following error messages can occur while calling methods to Java objects in IDL. Possible solutions for these errors are also provided:

  • Illegal IDL value in parameter n, where n is the position of the parameter - occurs if an illegal parameter type is provided. For example, an IDL structure are not allowed as a parameter to an IDLjavaObject.
  • class::method(signature) is a void method. Must be called as a procedure, where class is the class name and method is the method name specified when a void Java method is called as an IDL function. Change the syntax of the method call. See Method Calls on IDL-Java Objects for details.
  • Exception thrown - occurs if an exception occurs in Java. Either correct or handle the Java exception. The Java exception can be determined with the IDLJavaBridgeSession object. See The IDLJavaBridgeSession Object for details.

Errors When Accessing Data Members


The following error messages can occur while accessing data members to Java objects in IDL. Possible solutions for these errors are also provided:

  • Illegal IDL value in parameter n, where n is the position of the parameter - occurs if an illegal parameter type is provided. For example, an IDL structure is not allowed as a parameter to an IDLjavaObject.
  • Class class has no data member named property, where class is the class name and property is the data member name specified when trying to access the Java data member - occurs if the data member of the given name does not exist. Check the spelling of the property name. Also compare the data member name in the Java class source file with the property name provided when accessing it in IDL. See Managing IDL-Java Object Properties for details.
  • Property class::property of type type not found, where class is the class name, property is the data member name specified, and type is property’s data type when trying to access the Java data member - occurs if the IDL-Java bridge cannot find the Java data member of the given type. Check the data type of Java data member and make sure you are trying to use a similar type in IDL. See Getting and Setting Properties for details.
  • Exception thrown - occurs if an exception occurs in Java. Either correct or handle the Java exception. The Java exception can be determined with the IDLJavaBridgeSession object. See The IDLJavaBridgeSession Object for details.