0 Replies Latest reply on Sep 13, 2006 3:54 AM by Nicolai Ødum

    Error messages from entity bean when Enum is definded inside

    Nicolai Ødum Newbie

      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

      public class MySetup implements Serializable {
       private static final long serialVersionUID = 1L;
       public static enum SyncSetup {
       FIRST , SECOND;
       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.