[jboss-user] [EJB 3.0] - Error messages from entity bean when Enum is definded inside

webmarck do-not-reply at jboss.com
Wed Sep 13 03:54:03 EDT 2006

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 {
  | 	}
  | 	@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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971204#3971204

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971204

More information about the jboss-user mailing list