Skip to main content

Problem

  • Product Name: Borland Enterprise Server
  • Product Version: 6.5
  • Product Component: JNDI Namespace
  • Platform/OS Version: All

Under BES 5.2.1, it was possible to install javax.jndi.Referenceable objects via jndi-definitions.xml.

When tried to do the same in BES 6.5 the following error occurs,

Error in BES 6.5: java.lang.ClassCastException when accessing the object.

Resolution

The objects in the JNDI namespace has to be made Serializable in addition to being Referenceable (similar to javax.jms.ConnectionFactory) to allow the JNDI framework of BES 6.5 to handle it correctly. The reason is, in BES, the default JNDI service provider is Naming Service, an implementation of JNDI CosNaming service provider. Binding Java objects to this service provider requires that they implement java.io.serializable as this is how Java objects map to CORBA value types.


#BES
#Security
#javax.jndi.Referenceable
#JNDI
#VisiBroker
#ClassCastException
#Serializable