0 Replies Latest reply: Apr 2, 2013 4:45 AM by 161271 RSS

    JacORB and java enum

      Hi All.
      I am not sure what is wrong, but when I used JacORB 2.2.3 I had problems with deserializing classes with enum fields. I guessed, the problem with old version of JacORB (release 10 Dec 2005), but when I started to use latest version of JacORB 3.2 (7 Dec 2012) I saw same error.
      For example, I have following class
      +public class ServerInfo implements Serializable {+
      +public static enum Type {+
      Other, ConfigurationServer, WebApplicationServer,
      PolicyServer, ManagementServer, ReportServer
      private final String hostName;
      private final String serverName;
      private final Type type;

      When I am trying to get the value of attribute with this type (getServerInfo) using interface
      +public interface ServerManager {+   

      +public static enum State {+
      Other, Failed, Stopped, Running, Starting, Stopping
      public ServerInfo getServerInfo();
      public State getState() throws IOException;
      I have following error

      java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is: org.omg.CORBA.MARSHAL: unknown value tag: 0xe (offset=0x1a8) vmcid: 0x0 minor code: 0 completed: No

      What is stranger, I have no problem with reading value for getState(), the returned type (State) is enum also. Any ideas, what is wrong. Thanks

      Edited by: tvv2000 on 02.04.2013 2:45