Re: [castor-dev] possible to create a java object which has less

2004-03-12 Thread Keith Visco
You can create a custom FieldHandler which does basically nothing in the setValue method and simply returns null in the getValue method. Then simply specify the handler in the mapping file: --Keith > Sourabh wrote: > > Suppose in my mapping file i mapped 4 different attributes for a > cla

Re: [castor-dev] Rollback problem...

2004-03-12 Thread Nick Stuart
Just some more info on the specs: Was using castor 0.9.5.2 upgraded to 0.9.5.3 (same problem persists) Using MS SQL Server 2000 with the net.sourceforge.jtds.jdbc.Driver jdbc driver Running tests with Junit 3.0.x (comes with NB) Windows XP SP 1 with misc updates J2sdk1.4.2_03 -Nick -Original

[castor-dev] Making sure id's defined via xsd:ID are unique

2004-03-12 Thread Ibtsam Mahfouz
Hi  I am defining a description file for my schema and I want to enforce unique id's. I defined an element as follows in the schema file:                I would like all ScalarSettings defined in a file to have a unique id (eid). When I run the above schema through sourceGenerator it ge

Re: [castor-dev] Rollback problem...

2004-03-12 Thread Nick Stuart
Ok, for when I actually call it. I do the following: try{ Class cmdCls = Class.forName(command); Command com = (Command)cmdCls.newInstance(); parameters.put("db", db); Object returnValue = com.execute(parameters); return returnVal

Re: [castor-dev] Mapping file question - nested objects

2004-03-12 Thread Keith Visco
Patrick, This my help you: http://castor.exolab.org/xml-faq.html#My-mapping-file-seems-to-have-no-effect! --Keith Patrick Wright wrote: > > Hi > > Haven't been able to find this in the documentation. I have Castor 0.9.5.3 > installed. > > I am setting up my mapping file to work with an e

Re: [castor-dev] Rollback problem...

2004-03-12 Thread Werner Guttmann
Nick, can you make your statement 'but I have a section of code later on ' a bit more explicit. Iow, when exactly are you calling Database.rollback() ? Could I see the complete code ? I'd just like to make sure you get the exception handling right before starting to dig deeper ... Looking at

[castor-dev] Rollback problem...

2004-03-12 Thread Nick Stuart
I'm having a weird (at least to me) issue when trying to do a rollback. Basically during my tests I'm trying to insert a duplicate key, I catch and throw that error just fine, but I have a section of code later on that looks like: try{ if(db.isActive())

[castor-dev] Mapping file question - nested objects

2004-03-12 Thread Patrick Wright
Hi Haven't been able to find this in the documentation. I have Castor 0.9.5.3 installed. I am setting up my mapping file to work with an existing set of Java classes. The Marshaller appears to load the correct mapping file, but ignores the directives in it. I know it's the correct file because

[castor-dev] XMLife 2.9.90 XSD - ClassCastException calling SourceGenerator

2004-03-12 Thread Andy Scherzinger
I get a ClassCastException wenn I call SourceGenerator to generate javasources from the XMLife 2.9.90 Schema. The Problem is the base attribute used in an extension tag: ...

[castor-dev] NullPointerException after switching from 0.9.3.21 to 0.9.5.3

2004-03-12 Thread Milovankic Dragan
Hi, I am using castor together with mapping file to marshall data to xml. After changing from castor-0.9.3.21.jar to castor-0.9.5.3.jar in my runtime directory I've got following ... [java] java.lang.NullPointerException [java] at org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate(X

[castor-dev] org.exolab.castor.indent=true causing problem by elements having type "xsd:string"

2004-03-12 Thread Yaldiz, Sunay
Hello, I am just trying to update to Castor version 0.9.5.3 from version 0.9.5.2. The marshall/unmarshall operations that were running properly in previous version now have problems. The problems I have are because of simple xml elements having type xsd:string. When I set org.exolab.castor.indent

[castor-dev] possible to create a java object which has less attributes than specified in the mapping file?

2004-03-12 Thread Sourabh
Suppose in my mapping file i mapped 4 different attributes for a class.But my java file has only 3 attributes in it  .one is missing. Now when i apply mapping to create a java object from this class , i get an exception - "the method...accepting/returning object of type...was not found"

[castor-dev] Castor Error: restriction of a restriction

2004-03-12 Thread Matthew Van Horn
Sent this again, because I got no response the first time. If this is not the right place to ask this, please let me know. I get the following error message when trying to process the XBRL schema using source generator. I have seen the question asked several times, but never with a clear answer.

Re: [castor-dev] Castor in a Web Application?

2004-03-12 Thread Richard Grill
Werner, many thanks for your answer. Regards, Richard - Original Message - From: "Werner Guttmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 11, 2004 8:54 PM Subject: Re: [castor-dev] Castor in a Web Application? > > On Thu, 11 Mar 2004 16:38:16 +0100, Richard