Hi Anca,

On 09.05.2011 17:18, Anca Dobrescu wrote:
> Hi everyone -
> 
> I'm trying to use Castor XML Code generator 1.3.2 in my project. I'm
> invoking it through the Maven 2 plugin.

What version are you using here ?

> I'm having the following error:
> 
> *cannot find symbol
> symbol  : method setPattern(java.lang.String)
> location: class org.exolab.castor.xml.validators.StringValidator*
> 
> This method is actually called in one of the classes generated from my XSD.
> Here's the context:
> 
> *//-- validation code for: _naissance
>  fieldValidator = new org.exolab.castor.xml.FieldValidator();
>         { //-- local scope
>             StringValidator typeValidator = new StringValidator();
>             typeValidator.setWhiteSpace("preserve");
>             typeValidator.setPattern("\\d{4}-\\d{2}-\\d{2}");
>             fieldValidator.setValidator(typeValidator);
>         }
>  desc.setValidator(fieldValidator);*
> 
> It seems that the setPattern method of the PatternValidator class has been
> deprecated some versions ago and no longer exists in the 1.3.2 version.
In order to have a detailed look at this, can you please create a new
Jira issue at http://jira.codehaus.org/browse/CASTOR and attach all
relevant files for me to reproduce the problem. Thanks in advance.

Cheers
Werner

> 
> So, if I'm not missing something, although the method no longer exists in
> the Castor XML 1.3.2 API it appears in code generated by this very API.
> 
> Please let me know if there is something I'm missing or, if not, is there is
> a workaround to this problem.
> 
> Thanks for taking the time to help me figure this out!
> 
> -Anca
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to