[Previous] [Contents]

Appendix A
Troubleshooting

This appendix explains how to troubleshoot common build and compilation errors by checking the settings of system properties and environment variables and debugging the runtime. It includes these major sections:

Language Mapping and Name Changes

The OMG IDL to Java language mapping specification has changed, causing IDL to Java language mapping changes. ISB for Java conforms with the OMG IDL/Java Language Mapping Specification. A brief list of differences between the new language mapping and the old language mapping follows:

Because of these language mapping changes, the following conversions may be necessary in your code:

Name Changes

If you are upgrading from a previous version of Netscape ISB for Java or Visigenic VisiBroker for Java, you may encounter the name changes listed in the following table.

Type Old Name New Name
Environment Variable

ORBELINE

VBROKER_ADM

ORBELINE_IMPL_PATH

VBROKER_IMPL_PATH

Directory

orb2.0 or /Orbeline2.0

vbroker or /vbroker

Commands

bw

java

Classes

pomoco

com.visigenic.vbroker

Build Errors

This section lists errors that may be encountered while building the example applications and the solutions to those problems.

The executable idl2java is not in your path.

Typical output:
prompt> make idl
idl2java Bank.idl
sh: idl2java: not found
*** Error code 1
make: Fatal error: Command failed for target 'idl'
Solutions:

Need to run a preprocessor on UNIX input files.

Before using idl2java to compile UNIX format files you must invoke the C preprocessor manually. Then you can run idl2java on the preprocessed file. As an alternative, you can convert UNIX format files to DOS format, then run idl2java.

The java compiler (javac) or the java interpreter (java) are not in your path

Typical output:
prompt> make javac Client.java
sh: javac: not found
*** Error code 1
make: Fatal error: Command failed for target \QClient.class'
Solutions:
U: Substitute <installation_location> with the location where you installed ISB for Java and, assuming you are using C shell, update your path like the following:

setenv PATH /<installation_location>/java/bin:$PATH

Compilation Errors

There are numerous compilation errors that users have encountered. Please look through the outputs and see if anything resembles what you are encountering.

Typical output (truncated):
prompt> make
javac Client.java
Client.java:7: Undefined variable: org
org.omg.CORBA.ORB.init();
^
./Bank/AccountManager.java:2: Interface org.omg.CORBA.Object of
interface Bank.AccountManager not found.
public interface AccountManager extends org.omg.CORBA.Object
^
 
Solutions:
U: Substitute <installation_location> with the location where you installed both Java and ISB for Java and assume you are using C shell. You would enter the following:

setenv CLASSPATH .:/<installation_location>/java/classes:/<installation_location>/isb/classes

Recompiling IDL Files

The runtime and code generators have been upgraded to be compatible with JDK 1.1.

To be compatible with the new runtime, you must use the idl2java compiler and recompile all IDL files. This will create new stub, skeleton, and support files which are compatible with the OMG IDL /Java Language Mapping Specification.

Make sure you make backups of all the IDL files before you use idl2java.

Debugging the Runtime

The ISB for Java runtime can be configured to provide detailed diagnostics of its functionality. The debugging diagnostics can be controlled:

The runtime diagnostics can be turned on from the command line by specifying the CORBA_DEBUG property as follows:

prompt> java -DCORBA_DEBUG Client
...
The runtime diagnostics can be turned on via HTML by specifying the CORBA_DEBUG parameter as follows:

<applet code=ClientApplet.class width=200 height=80>
<param name=CORBA_DEBUG value=1>
</applet>

System Properties

Various problems can be solved by checking the setting of System Properties. Use this section as a guide to setting System Properties appropriately for your needs and environment.

To set system properties, use the java command. Always add a -D before the system property, and the system property must appear before the Java class name.

CORBA_DEBUG

The CORBA runtime diagnostics can be turned on by specifying the CORBA_DEBUG property as follows:

prompt> java -DCORBA_DEBUG Client
...

OAport

Specifies the port number to be used by a server. If a port number is not specified, an unused port will be selected.

Environment Variables

Various problems can be solved by checking the setting of environment variables. Use this section as a guide to setting environment variables appropriately for your needs and environment.

CLASSPATH

Set the CLASSPATH environment variable to tell the Java interpreter where to look for your classes. Since you are using ISB for Java classes, the CLASSPATH must include the path to these classes. By default, classes reside in the following directory:

c:\netscape\suitespot\wai\java\nisb.zip

PATH

Set your PATH environment variable to include the bin directory of the ISB for Java distribution and to the directory where the Java binaries have been installed.

VBROKER_ADM

For Windows users, the default location for ORB log files will be the directory pointed to by the VBROKER_ADM environment variable. If this variable is not set, they will be found in the log directory on the current drive.

VBROKER_IMPL_NAME

Set this to change the directory name where the implementation repository files reside. Setting this environment variable overrides IMPL_DIR.

VBROKER_IMPL_PATH

Defines the path to the directory where implementation repository files reside. Setting this environment variable overrides VBROKER_ADM.


[Previous] [Contents]

Last Updated: 02/04/98 13:48:04


Copyright © 1997 Netscape Communications Corporation