# GemBuilder For Java v3.2 Documentation

## Licensing

GemBuilder for Java (GBJ) (C) is the property of GemTalk Systems LLC. It may only be used in conjunction with either the GemStone/S or GemStone/64 server products and is subject to the same licensing restrictions as these products. Refer to the licensing documentation included with these products for further details.

## API Reference Links

API reference documentation contains information on the interfaces, classes, methods and fields which make up GBJ and its supporting Java packages. Each tree divides its entries into their packages, and provides a comprehensive list of them from the tree's index page. Where appropriate, the GBJ API documentation contains links to pages within the JDK 8 documentation at https://docs.oracle.com/javase/8/index.html.

- GemBuilder For Java v3.2 GemBuilder For Java v3.2 API reference documentation.
- Java 8 API specification for the Java Standard Edition, Version 8.

## Product Guides

Two user manuals are available for GemBuilder for Java v3.2:

- The Programming Guide describes how to use the services provided by GemBuilder for Java.
- The Tools Guide describes how to use the GemBuilder for Java GUI tools.

Both are available on the GemTalk customer website http://gemtalksystems.com/products/gbj/.

## New in GemBuilder For Java v3.2

GBJ 3.2 is now provided with two separate interfaces; in addition to the RPC interface, which now uses the thread-safe GCI, support for a single linked GBJ session is provided using the classic GCI. There are a separate set of .jar files for each interface. Use of the thread-safe GCI allows robust support for multiple sessions. The linked interface permits a single session, when optimized performance is needed.

GBJ 3.2 is only suported with GemStone/S 64 Bit v3.7.2, with server and clients on Linux.

GBJ 3.2 provides enhanced and/or extended direct java/GS class mapping support for a number of java/GS classes, including:

GS Class | Java Class
--- | ---
LargeInteger | BigInteger
SmallDouble | float
Float | double
[Small]ScaledDecimal | BigDecimal
DecimalFloat | BigDecimalFloat*
[Small]Fraction | BigFraction**
SmallDate | LocalDate
SmallTime | LocalTime
GbjLocalDateTime* | LocalDateTime
GbjZonedDateTimer* | ZonedDateTime
[Small]DateAndTime | OffsetDateTime
GbjUtilDate* | Date
GbjInstant* | Instant

*   = New java or GS class created to support mapping
**   = Java class included from apache library
!   = Changes in GS DateTime/java Date mapping

### Details on new java/GS class mappings

New java class BigDecimalFloat (a subclass of BigDecimal) created to distinquish between [Small]ScaledDecimals and DecimalFloats.

To support the java BigFraction class, the Apache Commons Math 3.6.1 library jar file commons-math-3.6.1.jar must be included in the $CLASSPATH. This library can be downloaded from the Apache Commons site at:

https://commons.apache.org/proper/commons-math/download_math.cgi

Appropriate GbjObject methods to generate a new java instance of the appropriate class have been added, following the original convention of <className>Value( ). For example, to generate a BigInteger, call method <aGbjObject>.bigIntegerValue( ).

### Other bug fixes:

46427 Better handling of Utf8, Unicode7/16/32 instances
51112 GBJ does not handle codepoints in range 16r100000 to 16r10FFFF
48988 Better Java-side mapping support for various GemStone classes
49413 GbjGciInterface sendMsg conflicts with GBJ poller in server 3.6 and greater
49019 Use GciTs in GBJ for multi-session support
46531: Calling GbjLauncher from a java program had windowing problems
46532: GBJ library build information now printed during startup
46551: GbjObject.stringValue() printed wrong value on LargeIntegers
46816: Error message for "$GEMSTONE/version.txt not found" was incorrect
47078: Error in javadocs for GbjGciInterface.initialize()
47084: Enumeration over large collections could fail with ClassCastException
47289: Could get out of range error in getObjs() on GbjIterators
48138: Printout of large oop numbers in GbjObject.asString() can go negative
50994: GSCI stat library initialization error
50996: Corrupted GS Strings or Java strings with codepoints between 128 and 255

## New in GemBuilder For Java v3.1.3

GBJ 3.1.3 includes several bug fixes and restores support for GS/S 32-bit servers. Customers on GS/S 32-bit can request the required libgbjgci library via GemTalk Technical Support. For GS/64, all future server releases will include the appropriate libgbjgci library as part of $GEMSTONE/lib (%GEMSTONE%/bin on Windows).

Because this is a new GBJ release, existing GS server products will not have the 3.1.3 libgbjgci library immediately available. Customers may contact GemTalk Technical Support for a new libgbjgci library for GS/32 6.7 and GS/64 versions 3.2.15 and 3.3.1.

### New features

When attempting to return back an integer from the server using GbjObject.longValue(), if the integer is too large to fit in a java long type, GBJ now triggers a java.lang.ArithmeticException. If this occurs, users can call new method GbjObject.bigIntegerValue() to return back a java.math.BigInteger (part of fix to 46283).

### Other bug fixes

30012: GBJ could corrupt Strings containing non-ASCII characters (codepoint > 127).
46283: Returning back instances of LargeInteger from the server would cause the java client to fail with a java.lang.ClassCastException.
46368: Problems with GBJ library loading can cause problems using GbjGciPreferences.

### Limitations

Oracle does not provide a 32-bit version of java and the JDK for Solaris platforms (sparc.Solaris and i386.Solaris). Attempts to run GBJ on GS/32 using 64-bit java will trigger a "wrong ELF class: ELFCLASS32" error (bug 46359)

## New in GemBuilder For Java v3.1.2

Built to support the new GS/64 3.3 server release.

GBJ is now built using JDK version 1.8.0. If you still need to use an earlier version of Java, please contact GemTalk Technical Support (45246).

GBJ Android test application GbjTest is now built using the new Android Studio IDE. Refer to the file README.android.txt for more info (45459).

Enhanced support for object change notification (44674). See documentation for details.

Various bugfixes:

44705: Improved formatting of GbjGciException error messages
44659: Using monitorSessionSignals triggers "GBJ classes not loaded" error
44646: Using monitorChangedObjects can trigger GCI 2203 error
44618: registerStub( ) triggers "Object table put on oop zero" error
44577: Android getObjs( ) can trigger "local reference table overflow" error
44576: Android GbjTest app breaks when phone orientation changes
44523: Android GbjTest project broken on newer versions of Eclipse/ADT

## New in GemBuilder For Java v3.1.1

Built to support the new GS/64 3.2 server release.

New for GBJ 3.1.1 is support for development of Android applications using the Android SDK. This release includes the file GbjAndroid.zip containing Android SDK files needed for building a simple example Android app that can login to a GemStone repository and execute simple GemStone Smalltalk commands. GbjTest can act as an template for your own GBJ Android applications.

See the README.android.txt file for more details.

Various bugfixes:

43981: Now compiled using JDK 1.7.
43949: Fixed various problems with GBJ graphic interface GbjLauncher.
43387: Fixed problem with finding GBJ stats library due to name change.
42788: Improved diagnostic information provided on GBJ library load problems.
41890: Fixed GBJ library load problem on AIX under JDK 1.6

## New in GemBuilder For Java v3.1

GBJ 3.1 includes important bugfixes since the release of GBJ 3.0, plus new functionality to support programmatic support for accessing shared page cache statistics, through either GBJ application code or via Java JMX monitors or VMware Hyperic system monitoring tool.

This new support is contained in the new package com.gemstone.gbjstats -- See the package documentation for details on this new functionality.

All other functionality is the same as in GBJ 3.0.

Bugfixes include:

40657: Improvement in login performance. Server-dependent static variables are now initialized differently, and the results cached. This provides a 20% performance improvement in login.

41796: Excessive blocking between GBJ sessions If a java client is running multiple sessions, a long operation in one session (for example, executing a time-consuming GS smalltalk command) caused operations in other sessions to block until the first one completed.

42081: Finalization of incomplete GbjGciObject could have crashed gem Incomplete GbjGciObjects have an OOP of 0, which caused a failure in java finalization.

40656: Gem-to-gem signals were sometimes not received by the recipient.

41755: Asynchronous signals delayed on quiet GBJ client. With the 3.0 GbjGciInterface redesign, asynchronous signals were only signaled when GS smalltalk code was executed or when the GBJ client communicated with the gem. This caused delays in the receipt and/or processing of these signals if there was no communication between the GBJ client and gem; this included SigAbort, LostOTRoot, gem-to-gem signals, and object change notification.

41734: Problems with GBJ client/server class mapping. GBJ provides a mechanism where the application can map a GS server class to a particular java class on the client, using calls to mapGsToJavaClass() and registerStub(). This did not work correctly in 3.0, resulting in all objects being mapping to instances of GbjObject. GBJ uses this mechanism to map collection classes to GbjCollection, so Java operations involving Enumeration also failed.

41757: isLoggedIn() may have incorrectly reported true. The GbjGciSession method isLoggedIn() could have incorrectly reported true if the gem session has been externally terminated or killed and the GBJ client has not recently attempted to communicate with it.

40951: GbjGemStoneErrors updated. The errors listed in GbjGemStoneErrors were out of date.

Copyright Information

Copyright © GemTalk Systems 1997-2026. All Rights Reserved. Last modified: Wed Jul 15 16:43:16 PDT 2020