Buggy code:
throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( "src-ct.0.1" , new Object [ ] { typeInfo . fName , siblingName } ) ; } attrValues = fAttrChecker . checkAttributes ( simpleContent , false , schemaDoc ) ; QName baseTypeName = ( ( QName ) ( attrValues [ XSAttributeChecker . ATTIDX_BASE ] ) ) ; fAttrChecker . returnAttrArray ( attrValues , schemaDoc ) ; if ( baseTypeName == null ) { throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( "src-ct.0.3" , new Object [ ] { typeInfo . fName } ) ; } XSTypeDecl type = ( ( XSTypeDecl ) ( fSchemaHandler . getGlobalDecl ( schemaDoc , TYPEDECL_TYPE , baseTypeName ) ) ) ; if ( type == null ) throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( ) ; typeInfo . fBaseType = type ; XSSimpleType baseValidator = null ; XSComplexTypeDecl baseComplexType = null ; int baseFinalSet = 0 ; if ( ( type . getXSType ( ) ) == ( XSTypeDecl . COMPLEX_TYPE ) ) { baseComplexType = ( ( XSComplexTypeDecl ) ( type ) ) ; if ( ( baseComplexType . fContentType ) != ( XSComplexTypeDecl . CONTENTTYPE_SIMPLE ) ) { throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( "src-ct.2" , new Object [ ] { typeInfo . fName } ) ; } baseFinalSet = baseComplexType . fFinal ; baseValidator = baseComplexType . fXSSimpleType ; } else { baseValidator = ( ( XSSimpleType ) ( type ) ) ; if ( ( typeInfo . fDerivedBy ) == ( SchemaSymbols . RESTRICTION ) ) { throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( "src-ct.2" , new Object [ ] { typeInfo . fName } ) ; } baseFinalSet = baseValidator . getFinalSet ( ) ; } if ( ( baseFinalSet & ( typeInfo . fDerivedBy ) ) != 0 ) { String errorKey = ( ( typeInfo . fDerivedBy ) == ( SchemaSymbols . EXTENSION ) ) ? "cos-ct-extends.1.1" : "derivation-ok-restriction.1" ; throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( errorKey , new Object [ ] { typeInfo . fName } ) ; } simpleContent = DOMUtil . getFirstChildElement ( simpleContent ) ; if ( simpleContent != null ) { if ( DOMUtil . getLocalName ( simpleContent ) . equals ( ELT_ANNOTATION ) ) { traverseAnnotationDecl ( simpleContent , null , false , schemaDoc ) ; simpleContent = DOMUtil . getNextSiblingElement ( simpleContent ) ; } if ( ( simpleContent != null ) && ( DOMUtil . getLocalName ( simpleContent ) . equals ( ELT_ANNOTATION ) ) ) { throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( "src-ct.0.1" , new Object [ ] { typeName , SchemaSymbols . ELT_ANNOTATION } ) ; } } if ( ( typeInfo . fDerivedBy ) == ( SchemaSymbols . RESTRICTION ) ) { if ( ( simpleContent != null ) && ( DOMUtil . getLocalName ( simpleContent ) . equals ( ELT_SIMPLETYPE ) ) ) { XSSimpleType dv = fSimpleTypeTraverser . traverseLocal ( simpleContent , schemaDoc , grammar ) ; if ( dv == null ) throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( ) ; if ( ! ( XSConstraints . checkSimpleDerivationOk ( dv , baseValidator , baseValidator . getFinalSet ( ) ) ) ) { throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( "derivation-ok-restriction.5.1.1" , new Object [ ] { typeName } ) ; } baseValidator = dv ; simpleContent = DOMUtil . getNextSiblingElement ( simpleContent ) ; } Element attrNode = null ; XSFacets facetData = null ; short presentFacets = 0 ; short fixedFacets = 0 ; if ( simpleContent != null ) { FacetInfo fi = traverseFacets ( simpleContent , null , typeName , baseValidator , schemaDoc , grammar ) ; attrNode = fi . nodeAfterFacets ; facetData = fi . facetdata ; presentFacets = fi . fPresentFacets ; fixedFacets = fi . fFixedFacets ; } typeInfo . fXSSimpleType = schemaFactory . createTypeRestriction ( null , schemaDoc . fTargetNamespace , ( ( short ) ( 0 ) ) , baseValidator ) ; try { fValidationState . setNamespaceSupport ( schemaDoc . fNamespaceSupport ) ; typeInfo . fXSSimpleType . applyFacets ( facetData , presentFacets , fixedFacets , fValidationState ) ; } catch ( InvalidDatatypeFacetException ex ) { <START_BUG> reportGenericSchemaError ( ex . getLocalizedMessage ( ) ) ; <END_BUG> } if ( attrNode != null ) { if ( ! ( isAttrOrAttrGroup ( attrNode ) ) ) { throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( "src-ct.0.1" , new Object [ ] { typeInfo . fName , DOMUtil . getLocalName ( attrNode ) } ) ; } Element node = traverseAttrsAndAttrGrps ( attrNode , typeInfo . fAttrGrp , schemaDoc , grammar ) ; if ( node != null ) { throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( "src-ct.0.1" , new Object [ ] { typeInfo . fName , DOMUtil . getLocalName ( node ) } ) ; } } mergeAttributes ( baseComplexType . fAttrGrp , typeInfo . fAttrGrp , typeName , false ) ; typeInfo . fAttrGrp . removeProhibitedAttrs ( ) ; String errorCode = typeInfo . fAttrGrp . validRestrictionOf ( baseComplexType . fAttrGrp ) ; if ( errorCode != null ) { throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( errorCode , new Object [ ] { typeInfo . fName } ) ; } } else { typeInfo . fXSSimpleType = baseValidator ; if ( simpleContent != null ) { Element attrNode = simpleContent ; if ( ! ( isAttrOrAttrGroup ( attrNode ) ) ) { throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( "src-ct.0.1" , new Object [ ] { typeInfo . fName , DOMUtil . getLocalName ( attrNode ) } ) ; } Element node = traverseAttrsAndAttrGrps ( attrNode , typeInfo . fAttrGrp , schemaDoc , grammar ) ; if ( node != null ) { throw new XSDComplexTypeTraverser . ComplexTypeRecoverableError ( "src-ct.0.1" , new Object [ ] { typeInfo . fName , DOMUtil . getLocalName ( node ) } ) ; } typeInfo . fAttrGrp . removeProhibitedAttrs ( ) ; } if ( baseComplexType != null ) { mergeAttributes ( baseComplexType . fAttrGrp , typeInfo . fAttrGrp , typeName , true ) ; } } }

Fix:
reportSchemaError ( ex . getKey ( ) , ex . getArgs ( ) ) ;