Skip to main content

Problem

  • Product Name: BES-AppServer
  • Product Version: 5.2.1
  • Product Component: JNDI Browser, SonicMQ, JMS Topic
  • Platform/OS Version: All

Opening a Topic in the JMS Browser on UNIX Platforms results in the error "NULL pointer on Field Writer Method".

Resolution

The problem specifically occurs when JMS resource objects are used in applications, whenever serialization is attempted for a class instance that houses certain java.awt.* classes. During introspection of classes involved in serializing a class instance, in preparation for marshaling the serialized class instance, certain java AWT package classes get loaded triggering static initialization and ultimately communication attempts with the GUI console through the DISPLAY variable. In this case it is the class progress.message.jclient.QueueConnectionFactory.

This problem occur for installations of BES on Unix platforms when JDK 1.3 is used. There is no issue on Windows based platforms.

Workaround:

1. In JDK 1.4, this issue can be avoided by setting the java property

java.awt.headless=true

to indicate an environment without an X terminal server, enabling exceptions related to the DISPLAY to be ignored rather than impacting application progress.

2. For JDK 1.3, where java.awt.headless property is not available, a virtual X terminal server such as Xvfb can be run on a machine without a console. Setting the DISPLAY variable to the Xvfb server allows initialization of awt classes to proceed. The Xvfb server absorbs events received from the awt classes without any interpretation.


#java.awt
#serialization
#VisiBroker
#NULLpointeronFieldWriterMethod
#java.awt.headless
#Security
#JMS