Q1. Do you offer remote participation in your San Jose State University program?
A1. Sorry! Our program is an in-classroom program; most classes also have a lab.
Q1. I'm having trouble running the Symantec version of Club Med. Can you help?
A1. Due to a missing class file in the clubmed.jar
file, loading ClubMed.html from a browser will fail. This
is the result of a error in the manifest file for the Symantec symbeans.jar
file which causes the ErrorsBundle.class file to not be included
as a dependent class file. To successfully run ClubMed, execute the
following steps:
Change to the CorbaJavaBook.2e\classes subdirectory
Execute the following command:
jar -xf [vcafe-install]\bin\components\symbeans.jar
symantec\itools\resources\ErrorsBundle.class
where [vcafe-install]
is the drive and subdirectory of your Visual Cafe installation.
You can avoid this problem in the applications you develop by manually
adding the ErrorsBundle.class file to the jar
files you create using the Symantec JAR packager tool.
Q2. I am getting a compile error when compiling ClubMedDispenserImpl.java. Why is this happening?
A2. There is a mistake in ClubMedDispenserImpl.java that
causes a compile error when running the ClubMed Server make.bat
file (the executable as it exists on the CD-ROM functions correctly).
To correct the compile problem, replace lines 10 and 11:
public ClubMedDispenserImpl(java.lang.String[] args,
java.lang.String[] name, int num)
with
public
ClubMedDispenserImpl(java.lang.String[] args,
java.lang.String name, int num)
Note that the name parameter should be a String, not an array of String.
Q3. I'm having trouble with the Borland JBuilder Trial Edition giving me an expired message even though I just installed it. What is causeing this problem?
A3. Here's the scoop from Borland:
We are in process of devising a patch to get around this. This
patch
should be tested and ready to go in another few days. At that
time, it will
be available from Borland's tech support dept and I will also be sure
that
the tech support dept of every publisher who uses this trial version
also
has the patch. Thanks.
-----------
The patch is now available. Perform the following steps to install
the JBuilder C/S Trial Edition:
A4. VBJ and VBJC are VisiBroker alternatives to the JDK Java and Javac commands respectively. When using the JDK, you should use the VisiBroker alternatives. These commands append the VisiBroker JAR files to the environment CLASSPATH when running or compiling your Java programs. When using Symantec Visual Cafe, ensure that you have included the VisiBroker JAR files in the CLASSPATH of the bin/sc.ini file in the Visual Cafe installation directory. Use the sc.ini in CorbaJavaBook.2e as an example.
Q5. I'm having trouble running the CountApplet example. What could I be doing wrong?
A5. There are several things to keep in mind when running the CountApplet example. First, make sure your Web server can find the Count.html file. The suggested location of this file is the CorbaJavaBook.2e directory. If you are using Netscape's Enterprise Server from the book CD-ROM, you can set the root directory to point to CorbaJavaBook.2e; the default is a different directory. You can also use the VisiBroker Gatekeeper as a simple Web server. With the Gatekeeper, the root directory is whatever directory you start the Gatekeeper from. If you are using the Gatekeeper as a Web server, you should start it from the CorbaJavaBook.2e directory. Note that when you use the Gatekeeper as a Web server, you must specify the Gatekeeper's port number (15000) in your URLs (e.g., http://www.corbajava.engr.sjsu.edu:15000/Count.html).
The next consideration is that the Gatekeeper must be running and your browser must be able to find the gatekeeper.ior file in the codebase subdirectory. By default, the Gatekeeper writes the gatekeeper.ior file to the directory in which it was started. When using a Web server other than the Gatekeeper, you can start the Gatekeeper in the CorbaJavaBook.2e\classes directory. Note that classes is specified as the codebase in Count.html, so starting the Gatekeeper in CorbaJavaBook.2e\classes means the gatekeeper.ior file will be written to the codebase. Also, since the Gatekeeper requires the Gatekeeper requires OSAGENT, you will need to start it also.
When using the Gatekeeper as a Web server (in which case it must be
started from the CorbaJavaBook.2e directory) the gatekeeper.ior
file is not written to codebase directory by default. To override
this behavior, use the
-IOR \CorbaJavaBook.2e\classes\gatekeeper.ior Gatekeeper parameter
to force the gatekeeper.ior file to be written to the correct location.
Next, Count.html specifies that the ORB should be downloaded to the browser. This can be accomplished by copying the JAR files in your VisiBroker installation (Visigenic\vbroker\lib by default) to the CorbaJavaBook.2e\classes directory and then unpacking each of them running the jar utility from the CorbaJavaBook.2e\classes directory with the -xf parameter followed by the name of the jar file.
In some configurations, if you include the codebase subdirectory (e.g., CorbaJavaBook.2e\classes) in the browser's classpath and you are running the Web server locally, the applet will fail. Avoid the problem by not including CorbaJavaBook.2e\classes in your system classpaths.
Finally, it is not possible to run CountApplet from a browser by loading Count.html as a file. You must load it from a Web server.
Q6. Do you have any new information regarding the connect an disconnect APIs?
A6. connect and disconnect are stop-gap APIs for
transient POA objects. We expect some changes in this area because
these two calls just got deprecated. However, they are still supported
by all the Java ORBs and it is the only way to write a portable server-side
CORBA program today. Via this FAQ, we'll continue to keep you informed
of future changes in the area of POA/Java.
Q1. When I execute the idl2java compiler as shown in Chapter 5 on page 74 I get errors. What is going on?
A1. Remove the "-T" option shown in the example; it is no longer supported.
Q2. When I compile the stubs or skeletons produced by VisiBroker, I get errors like the following:
"Access across scopes to the private member
pomoco.CORBA.Skeleton(java.lang.String , pomoco.CORBA.MethodPointer[]
, boolean ) in class pomoco.CORBA.Skeleton is not implemented. The referenc
will succeed if the member is given package scope. super( name , _methods
, true )"
Why am I getting these errors?
A2. VisiBroker for Java is not yet "JDK 1.1 friendly." Revert to JDK 1.02 until Visigenic releases a new version of VisiBroker for Java.
Q3. I'm having trouble running the sample programs that use applets. How can I get this to work?
A3. Running the applet example requires that your browser be able to find the ORB and Count class files. Netscape navigator uses the environment variable CLASSPATH to find the class files locally or can download them from the CODEBASE subdirectory. Append your VisiBroker classes and \CorbaJavaBook\classes subdirectories to your CLASSPATH environment variable via My Computer->System->Environment to make the classes available locally to the browser.
The sample applets specify classes as its CODEBASE. So, assuming your web server has \CorbaJavaBook as its root directory, the sample program classes will be available for remote download. To also make the VisiBroker classes available for remote download by your browser, copy the entire VisiBroker classes subdirectory tree to \CorbaJavaBook\classes.
Note also the Gatekeeper can also be used as a simple HTTP daemon (or web server). Start the Gatekeeper in the \CorbaJavaBook subdirectory. When running an applet by specifying the URL for an applets HTML, don't forget to include the 15000 port number that the Gatekeeper daemon uses. For example, http://myhost:15000/count.html.
Q4. Is the Gatekeeper really needed to run applets?
A4. Won't work without it. When the VisiBroker client stubs are part of an applet, they communicate with a server indirectly through the Gatekeeper.
Q5. Where is this thing called Caffeine you describe in Chapter 13? I can't find any more information on it on the Visigenic or Netscape web sites.
A5. The function provided by Caffeine is still in beta. However, when you download Visibroker for Java from the Visigenic site, the Caffeine function as described in the book is part of the toolkit. In addition, you can find more information about Caffeine at http://developer.netscape.com/library/documentation/enterprise/javapg/vbj.htm. This is part of the documentation for Netscape Communicator and Enterprise Server beta. See Chapters 9 and 10.
Q6. I can't find everything I need to run the programs on the CDROM. Where are they?
A6. Knowing that the products the books uses (like VisiBroker for Java) were going to change soon after the book was released, we chose to point our readers to the Web sites where they could get the latest version of the vendor's product. The products we used also do not have demo or "lite" versions that we could include on the CDROM. Again, we point you to the vendor's web sites. See readme.html for the list of Web sites.
Q7. Is there a way to get the ease of use of use of DataStreams combined with the performance of BufferedStreams?
A7. Yes! Construct the stream as follows:
DataInputStream ids = new DataInputStream( new BufferedInputStream ( socket.getInputStream ));
An output stream would be constructed in a similar manner.
Thanks to Bob Scranton of Symantec for pointing out this technique.
Q8. I'm having problems running the DCOM example in Chapter 14. What could the problem be?
A8. Try the following bug workaround from Microsoft to see if it helps...
A9. Try the following to see if it helps...
Caffeine is still in beta so a few problems still linger.