XML Data Binding with Castor
Subject:   handling enums in mapping xml
Date:   2004-04-22 12:57:49
From:   Espinosa

I'm using Castor mapping to handle differences between 2 schemas. One schema is derived from the other. If I make a change to one of the schema to add an enum from commsStateDefs_CommsState_T .... but my incoming XML message uses one of the existing enum values for this type, I get the following error during the unmarshalling.

Why am I getting this error and what should be done to resolve this problem? I tried to add the enums in the mapping document but the class is the generated Castor classes and the marshalling fails because the member variables are static.

com.lucent.oms.xml.naInterface.types.CommsStateDefs_CommsState_T{file: [not available]; line: 2; column: 633}
java.lang.IllegalStateException: Java schema change: Class com.lucent.oms.xml.naInterface.types.CommsStateDefs_CommsState_T can no longer be constructed
: com.lucent.oms.xml.naInterface.types.CommsStateDefs_CommsState_T
at org.exolab.castor.mapping.loader.FieldHandlerImpl.newInstance(
at org.exolab.castor.xml.UnmarshalHandler.startElement(
at org.apache.xerces.parsers.SAXParser.startElement(
at org.apache.xerces.validators.common.XMLValidator.callStartElement(
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch (
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(
at org.apache.xerces.framework.XMLParser.parse(
at org.exolab.castor.xml.Unmarshaller.unmarshal
at org.exolab.castor.xml.Unmarshaller.unmarshal(