I had a similiar problem in Weblogic once with elements not being unmarshalled correctly, I found if I switched castor debug on (in the properties file) that there were messages about a class descriptor not being found. It turned out to be that the jars I had deployed to weblogic didn't have all the classes (I was using JBuilder to build jars and it doesn't always go all the way down the hierarchy of packages when jarring - just one descriptor class was missing). Check the jars you are deploying to JBoss to see if anything is missing. An easy test is to temporarily put all compiled classes on the classpath and see if the problem goes away, if so you know the jars are missing classes.
Pete -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 07 March 2003 09:43 To: [EMAIL PROTECTED] Subject: Re: [castor-dev] castor - validation problems :(( [with JBOSS usage] yes ... i've removed castor.jar from jboss server/default/lib ... and i'm using newest castor from exolab website ... everything works fine except: 1.validation rules for reg expressions are never fired (isValid() method claims that fields with regexp validation rules are always valid - xsd:patterns, field lengths, enumerations doesn't work) 2. unmarshalling of field with xsd:enumerations always fails - unmarshalled fields are always null (on example object media with enumerations :paper,internet,tv .... despite of correct values in xml document is not unmarshalled properly to java object) in stand alone ver. (castor wtihout jboss) everythings works fine ... ...i think it could be a problem with some jboss libraries ... but at the moment i don't know the real reason of that strange behaviour in jboss + castor usage ... :( danny -----Original Message----- From: Matthew Baird [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 10:29 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] castor - validation problems :(( [with JBOSS usage] make sure you remove the copy of castor that ships with jboss if you are trying to use a newer library. -----Original Message----- From: tek1 [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 10:12 AM 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 This transmission is confidential and intended solely for the person or organisation to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you have received this transmission in error, please notify the sender immediately. Any opinions or advice contained in this e-mail are those of the individual sender except where they are stated to be the views of RDF Group or EMS plc. All messages passing through this gateway are virus scanned. ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev