Skip to main content

Problem:

  • Product Name: Borland AppServer 6.6, VisiBroker 7.0
  • Product Version: 6.6
  • Product Component: marshaling 
  • Platform/OS version: All

Exception in Serialization of ENUMs in AppServer 6.6 (VB 7.0)

When serializing enums with VisiBroker 7.0 (used by AppServer 6.6), the following exception is thrown:

Exception in thread "main" org.omg.CORBA.MARSHAL: Error unmarshaling value [Error unmarshaling value [Could not allocate instance of class Bank.AdminToolConstants$INTERNER_TYP]] vmcid: 0x0 minor code: 0 completed: No
at com.inprise.vbroker.orb.CDRInputStream$ValueTypeReader.octets(Unknown Source)
at com.inprise.vbroker.orb.CDRInputStream$ValueTypeReader.state(Unknown Source)
at com.inprise.vbroker.orb.CDRInputStream$ValueTypeReader.value(Unknown Source)
at com.inprise.vbroker.orb.CDRInputStream.readValueType(Unknown Source)
at com.inprise.vbroker.orb.CDRInputStream.read_value(Unknown Source)
at Bank._AccountManagerStub.getSessionData(_AccountManagerStub.java:142)
at Client.main(Client.java:15)

Resolution:

In VB 7.0, the new JDK 1.5 language features are not supported, and that includes enum, which is part of the JDK 1.5 new features.

VisiBroker 7.0 only supports JDK 1.5 at runtime. 

Hence, the recommendation is to either:

  1. workaround the problem by avoiding the use of enums and use pre-JDK 1.5 features (i.e. using public static final String/Primitives constants) in their application code, or
  2. upgrade to VB 8.0.
Old KB# 30394

#marshaling
#VisiBroker
#Security