ufff ...
many many many many thanks keith
... i've found what i was looking for ... the error was trivial (Pete Thomas
from previous post had the same problems)

the problem was that my ant deployer was deployed also old regexp library
into application.jar... and (in specific tests) it's forgotten to include
some descriptor classes int the same application.jar.  That's why the
validator couldn't fire validation some rules when i was calling validate()
methods.

greeting for Keith, Arnaud and all castor's family






-----Original Message-----
From: Keith Visco [mailto:[EMAIL PROTECTED]
Sent: Friday, March 07, 2003 11:02 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] castor - validation problems :(( [with JBOSS
usage]



Daniel,

You might want to put some debug statements in the code to find out
which regexp evaluator is getting used, and to make sure that the
correct castor.properties file is being used when you deploy via JBoss.

You can do something like the following in your class:

import org.exolab.castor.util.LocalConfiguration;

LocalConfiguration config = LocalConfiguration.getInstance();
RegExpEvaluator rexp = config.getRegExpEvaluator();

System.out.println("regexp: " + rexp.getClass().getName());

--Keith


[EMAIL PROTECTED] wrote:
>
> there is no errors ... validation of regular expressions just don't work
...
> method my_object.isValid() claims that these fields are always valid
(method
> returns always true), despite of they are no valid (bad format etc...)
...
> and  my_object.validate() method throwing no errors ... of course in stand
> alone castors apps everything works fine ...
>
> danny
>
> -----Original Message-----
> From: tek1 [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 06, 2003 7:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] castor - validation problems :(( [with JBOSS
> usage]
>
> what is the exact error that you're receiving (stack trace) in jboss?
>
> At 17:08 03/03/06 +0100, you wrote:
> >according to my previous post ... i think the problem is the regexp
library
> >...  unmarshaller (in castor+jboss usage) can't unmarshall objects that
are
> >described by regular expressions rules (paterns, enumerations, etc) -
they
> >are always null, and can't validate fields described by regular
> expressions.
> >Of course as i said castor in stand alone version works fine (regexp also
> >works fine), so i'm completly disgusted ... because i've made some tests
on
> >clear jboss instalation (3.0.4) + newest castor and regexp librady in
> >JBOSS_HOME/server/default/lib  directory ....  results are the same ...
> >unmarshaller can't unmarshall element with reg exp rules defined in xsd
> >(also of course in Descriptor Classes) ... and Validator can't validate
> >fields with regular expresion validation rules (isValid() returns always
> >true despite bad - non valid values initialized by setters methods)...
hmmm
> >i don't know what it is .... maybe some libraries in jboss clashes with
> >castor libraries ...
> >
> >if anyone has similiar problems i'll be grateful for suggestions
> >
> >greetings
> >danny
> >
> >
> >
> >-----Original Message-----
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >Sent: Thursday, March 06, 2003 1:21 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: [castor-dev] castor - validation problems :((
> >
> >
> >Hi everybody.
> >I think i' ve found the problem (but not solution ... yet :)
> >
> >All validations (inc. regular expressions) works fine when i'm using
castor
> >as stand-alone library.
> >
> >All my troubles (see posts below) started when i've tried to use
> >castor(0.9.4.3) with jboss(3.0.4).
> >
> >All validations (regular expressions, xsd:pattern elements,
xsd:enumeration
> >elements) are ignored when i'm unmarshalling simple object structure
> >(generated from xsd by S.Generator) in simple EJB session bean method.
> >
> >I've found also something strange ... all elements that have enumerations
> >are not unmarshalled properly when i'm using castor with jboss (calling
> >methods from simple ejb method).
> >
>
>---------------------------------------------------------------------------
> -
> >--------------
> >On example: i've defined in xsd file element called medium:
> >
> ><xsd:element name="medium">
> >         <xsd:simpleType>
> >         <xsd:restriction base="xsd:normalizedString">
> >                 <xsd:enumeration value="paper"/>
> >                 <xsd:enumeration value="file"/>
> >                 <xsd:enumeration value="fax"/>
> >                 <xsd:enumeration value="phone"/>
> >                 <xsd:enumeration value="internet"/>
> >                 <xsd:enumeration value="email"/>
> >         </xsd:restriction>
> >         </xsd:simpleType>
> ></xsd:element>
> >
> >S.Generator generated proper classes (Medium.java,MediumDescriptor.java
and
> >MediumType and MediumTypeDescriptor in types directory with descrition
for
> >enumerated values)
> >
> >When im calling simple unmarshalling in stand-alone client ( without
> jboss )
> >everything works fine and class attributes have correct values(validation
> >rules for enumeration are fired and method getMedium() returns proper
> >values), but when i'm calling the same code in EJB Session Bean simple
> >test() method class medium id not unmarshalled with xml proper data and
> >Medium Element is always null (getMedium() returns always null)
> >
> >
> >I wonder why ?  In my standalone tests im using the same castor library
> >0.9.4.3.jar and the same jakarta-regexp library that im using in jboss
> (i've
> >changed original castor.jar in jboss server.default.lib directory to
newest
> >castor0.9.4.3.jar form website)
> >
> >I wonder if anybody found similiar problems with jboss and castor?
> >
> >Hmm i'll try to make some test in a few hours ...and if my guesswork is
> true
> >... i'll try to prepare simple test case ... and i'll post it to the
group.
> >
> >grettings
> >
> >danny
> >
> >-----------------------------------------------------------
> >If you wish to unsubscribe from this mailing, send mail to
> >[EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-dev
> >
> >-----------------------------------------------------------
> >If you wish to unsubscribe from this mailing, send mail to
> >[EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-dev
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to