This Installation Guide describes how to install GemBuilder for Java (GBJ) into a GemStone Repository, or upgrade GBJ in a GemStone repository, and how to configure Java clients to log in to GemStone using GBJ.
This version of GemBuilder for Java supports only GemStone/S 64 Bit 3.7.2 and later, with server and clients on Linux only. 32-bit GemStone/S is not supported by GBJ 3.2.
For details on the changes in this version of GBJ, see the GemBuilder for Java Release Notes for version 3.2.
The GemBuilder for Java installation process includes installing the GBJ interface files into the GemStone repository, and configuring your system to allow a GBJ Java application to log into GemStone. You need only install the GBJ interface files into the server once for each release of GBJ or new GemStone repository, but each Java client must be configured for login.
This version of GBJ is provided with two environments:
There are differences between the low level packages com.gemstone.gbjgci between the RPC and linked interfaces. However, using the com.gemstone.gbj package (which is recommended), and provided the application does not use unavailable features, the resulting java application will run correctly in both environments, provided that the correct login parameters are used.
GemBuilder for Java includes components that are part of both the GemStone server and the Java client. A supported GemStone server product and version, and a supported client platform, are required
GemBuilder for Java version 3.2 is compatible with GemStone/S 64 Bit versions 3.7.2 only, on 64-bit Linux only.
Authorization for using GemBuilder for Java is provided by the GS/64 keyfile. You will need to have a keyfile that provides authorization for use with GemBuilder for Java in order to use GemBuilder for Java. If you require a keyfile, write to keyfiles@gemtalksystems.com, or contact GemTalk Technical Support.
The following instructions describe installing GemBuilder for Java v3.2 server and java components onto your system.
1. Select an installation directory, installdir, and make this directory the current working directory.
We recommend installing GBJ at the same level as the GemStone server installation directory. You will need about 9 MB of free disk space.
2. GemBuilder for Java is provided as a zipped archive file, GemBuilderJava3.2.0.zip. Move this distribution file to the directory location in which GemBuilder for Java will be installed.
3. Unzip the distribution file using unzip.
InstallDir now contains a GemStone directory with a name similar to GemBuilderJava3.2.0. In the instructions that follow, we refer to this directory as gbj_directory.
gbj_directory includes the following:
gbj320.jar - the Java class library for the RPC/thread-safe environment.
gbjopensrc320.jar - class library with open source libraries used by the RPC/thread-safe GBJ tools.
gbjsource320.jar - additional class library to support debugging, used by the RPC/thread-safe environment.
gbjLnk320.jar - the Java class library for the linked environment.
gbjLnksource320.jar - additional class library to support debugging, for use with the linked environment.
doc - directory containing documentation for the RPC/thread-safe GBJ environment
index.html - the entry point for the online javadocs documentation
api - directory containing support files for the online javadocs documentation.
copyinfo.html - intellectual property ownership information
open_source_licenses.txt - licenses for open-source components.
sources.html - Further information and GemStone Technical Support
docLnk - directory containing documentation for the linked GBJ environment:
api - directory containing support files for the online javadocs documentation for the linked environment.
server - directory containing:
GbjFileinReader.gs
GbjGciInterface.gs
GbjHypericServerTemplate.xml
GbjHypericServiceTemplate.xml
GbjInstant.gs
GbjJmxCommandsTemplate.dat
GbjJmxSystemStatsTemplate.dat
GbjLocalDateTime.gs
GbjSupport.gs
GbjToolsInterface.gs
GbjUtilDate.gs
GbjZonedDateTime.gs
install.gs
GemBuilder for Java has server components that must be installed into your GemStone repository. This process is the same if you are installing into a new repository, or upgrading from a repository containing a previous version of GBJ.
GemBuilder for Java version 3.2 requires several environment variables to be set prior to installation to a server repository.
1. The $GEMSTONE environment variable should be set to the GemStone server installation directory. This is described in the GemStone server documentation. For example:
os$ export GEMSTONE=GS64InstallDir/GemStone64Bit3.7.2-x86_64.Linux
2. Your path should include the path for the Gemstone Server executables,
$GEMSTONE/bin
os$ export PATH=$GEMSTONE/bin:$PATH
3. $GBJ should be set to the GemBuilder for Java installation directory.
Before installing GBJ into the server repository for the first time, or upgrading an existing GBJ installation, verify the installation in a pilot environment. The server installation commits automatically. If the installation fails, you should correct the problem and re-run the installation.
GBJ 3.2 installation will report an error if the TimeZone configured in the server repository does not match the TimeZone configured in the OS, in /etc/timezone.
1. Installation writes a log file to the current working directory. You must cd to a working directory in which you have write permission.
2. Start topaz using the -l -i options, which starts a linked topaz that does not read a topaz initialization file.
3. Log in to the GemStone server as SystemUser.
4. Input the installation script, $GBJ/server/install.gs, which files in the server components. For example:
topaz 1> input $GBJ/server/install.gs
During the filein operation, output is directed to the file installGbj.out in the current directory.
The filein operation should end with a message that the errorcount is 0. If errorcount is not 0, errors have occurred. Contact GemStone Technical Support, providing the file installGbj.out as well as details about the installation process.
The installation script performs the commit, so you do not need to commit.
topaz 1> quit
Your GemStone server is now ready for use by GemBuilder for Java clients.
Ensure that your GemStone server has successfully installed GBJ, and that the Stone and NetLDI are running.
If you are running the GBJ client on the same machine as the GemStone server, or if you install the GemStone server distribution on the client node, you may use this environment for the required server shared libraries.
Otherwise, you must have an directory accessible from the client, containing the required server shared libraries listed in Table 1 .
If you are running the GBJ client on the same machine as the server, use the existing location configured in the gbjInstallDir.
If the GBJ client is on a different machine, copy the following files to the client node:
gbjopensrc320.jar. (if you are using GbjTools)
You should also copy gbjInstallDir/docs/ to the client node. The javadocs provide important documentation for GBJ functions.
The directory containing the GBJ jar files accessible to the client will be referred to as gbj_jar_dir.
To support the java BigFraction class, the Apache Commons Math 3.6.1 library jar file commons-math-3.6.1.jar must be accessible.
This library can be downloaded from the Apache Commons site at:
https://commons.apache.org/proper/commons-math/download_math.cgi
GemBuilder for Java version 3.2 does not require that $GEMSTONE be defined, provided that the server shared libraries are available and the server version can be determined.
If $GEMSTONE is defined, it must include the file version.txt, and the required shared libraries must be in $GEMSTONE/lib.
If $GEMSTONE is not defined, you must include -Dgemstone.version=3.7.2 on the java command line, and either define LD_LIBRARY_PATH or the java command line -Djava.library.path= argument, to include a directory containing the required server shared libraries as listed in Table 1 .
GemBuilder for Java version 3.2 does not require that $LD_LIBRARY_PATH be defined.
If $GEMSTONE is defined, $LD_LIBRARY_PATH and -Djava.library.path= are ignored.
Otherwise, if $LD_LIBRARY_PATH is defined, it must include a directory containing the required server shared libraries as listed in Table 1 .
If neither $GEMSTONE nor $LD_LIBRARY_PATH are defined, you must include -Djava.library.path= on the java command line as well as -Dgemstone.version=3.7.2.
You may specify the java CLASSPATH either by defining the environment variable $CLASSPATH, or using the java command line argument -cp.
The CLASSPATH must include the GBJ class library, gbj320.jar, and the third-party (Apache) .jar file commons-math3-3.6.1.jar. This contains Apache’s BigFraction class is used to support GemStone server Fractions.
If you are using the GbjTools, you will also need to include the open source library gbjopensrc320.jar, which contains the Kunststoff graphic support.
os$ export CLASSPATH= gbj_jar_dir/gbj320.jar:gbj_jar_dir/gbjopensrc320.jar:apacheInstallDir/3.6.1/commons-math3-3.6.1/commons-math3-3.6.1.jar
The GBJ distribution includes a simple java application that allows you to test your GBJ configuration.
Find or create a directory to hold your source and class files. These instructions will call this gbj_dev.
os$ cp $GBJ/doc/Test.java gbj_dev
os$ chmod 755 gbj_dev/Test.java
Ensure that your GemStone server has successfully installed GBJ, and that the Stone and NetLDI (for remote configurations) are running.
If you are running the GBJ client on the same machine as the GemStone server, or if you install the GemStone server distribution on the client node, you may use this environment for the required server shared libraries.
If you are running on a machine remote from the Stone, you must have a full GemStone installation on the client node, since it will need to start a remote cache and page server; you must have a NetLDI running on the client as well as on the server.
If you are running the GBJ client on the same machine as the server, use the existing location configured in the gbjInstallDir.
If the GBJ client is on a different machine, copy the following file to the client node:
You should also copy gbjInstallDir/docsLnk/ to the client node. The javadocs provide important documentation for GBJ functions.
The directory containing the GBJ jar files accessible to the client will be referred to as gbj_jar_dir.
To support the java BigFraction class, the Apache Commons Math 3.6.1 library jar file commons-math-3.6.1.jar must be accessible.
This library can be downloaded from the Apache Commons site at:
https://commons.apache.org/proper/commons-math/download_math.cgi
In the linked environment, you must have $GEMSTONE defined to point to a full GemStone distribution installation.
You may specify the java CLASSPATH either by defining the environment variable $CLASSPATH, or using the java command line argument -cp.
The CLASSPATH must include the GBJ class library, gbjLnk320.jar, and the third-party (Apache) .jar file commons-math3-3.6.1.jar. This contains Apache’s BigFraction class is used to support GemStone server Fractions.
When using the linked environment, the default java stack size is insufficient. You should include the java argument to increase this value, e.g. -Xss2048k.
The GBJ distribution includes a simple java application that allows you to test your GBJ configuration.
Find or create a directory to hold your source and class files. These instructions will call this gbj_dev.
os$ cp $GBJ/doc/Test.java gbj_dev
os$ chmod 755 gbj_dev/Test.java
The GBJ Launcher provides a simple GUI tool that allows you to specify the name and location of the GemStone server and the other parameters that control an RPC login.
You cannot login using the linked environment to the GbjLauncher.
To log in to GemStone, you must have the GemStone server and a NetLDI running on the GemStone server machine, and be otherwise configured to allow login.
If you have defined $GEMSTONE and $CLASSPATH, you may open the Launcher simply using:
os$ java com.gemstone.tools.GbjLauncher
com.gemstone.tools.GbjLauncher. contains the GBJ Launcher; this tool supports the following options on the command line:
This GBJ Tools Launcher window:
In the Tools Launcher, click Login to begin a session. A Session Parameters Dialog appears, prompting you for the session parameters.
Fill in the session parameters, as described in Table 2 . More detail on the specific details for configuring login parameters can be found in the GemStone/S System Administration Guide.
When the session parameters are correct, click Ok.
A successful login results in the event being recorded in the Launcher’s Text Pane, which serves as a transcript. Additional buttons are activated, and the Login button becomes Logout.
After you have successfully logged in to the GemStone server, you have verified that your GemBuilder installation is correct.
If the login attempt did not complete or if login fails, the console will contain log messages with java error details.
If this is not sufficient to determine the problem, you can configure more complete error messages by setting full logging. To do this, execute:
os$ java com.gemstone.gbjgci.GbjGciPreferences set GBJ.LogLevel ALL
For more information on login parameters and on using the GBJ tools available from the GBJ Launcher, see the GemBuilder for Java Programming Guide and the GemBuilder for Java Tools Guide.