0 Replies Latest reply on Sep 13, 2006 3:54 AM by webmarck

    Error messages from entity bean when Enum is definded inside

    webmarck

      JBoss 4.0.4 - Windows - JDK 1.5.0_08

      Is this a known error?

      If I define my Enum in a file and use it inside my entiy bean then everything is good - but if I define it inside the same entity class like this


      @Entity
      public class MySetup implements Serializable {
      
       private static final long serialVersionUID = 1L;
      
       public static enum SyncSetup {
      
       FIRST , SECOND;
       }
      
       @Enumerated(EnumType.STRING)
       public SyncSetup getSyncSetup() {
       return syncSetup;
       }
      }
      


      The log is full of error messages on deployment:

      09:42:48,906 ERROR [JBossXSErrorHandler] [domain:http://www.w3.org/TR/xml-schema-1]::[key=s4s-att-invalid-value]::Message=s4s-att-invalid-value: Invalid attribute value for 'name' in element 'complexType'. Recorded reason: cvc-datatype-valid.1.2.1: 'MySetup$SyncSetup' is not a valid value for 'NCName'.
      09:42:48,906 ERROR [JBossXSErrorHandler] [domain:http://www.w3.org/TR/xml-schema-1]::[key=s4s-att-must-appear]::Message=s4s-att-must-appear: Attribute 'name' must appear in element 'complexType'.


      As a side note then I can say that is seams to work either way.