Re: [castor-dev] not all attributes of object are marshalled

2004-03-15 Thread Keith Visco
Hi Katja, You mapping for the key is as follows: So you're telling castor that you only care about one field, but then you mark it as transient, I have a feeling you want the following instead: [EMAIL PROTECTED] wrote: > > Removing 'container="false"' didn't really help. > Wha

Re: [castor-dev] not all attributes of object are marshalled

2004-03-15 Thread marathonkati
Removing 'container="false"' didn't really help. What happend is following but the missing attributes didn't show up. This is the new xml file without 'container="false"' and two elements in the HashMap: - http://www.w3.org/2001/XMLSchema-instance"; /> - - 50 200 -

[castor-dev] Un/Marshal:supersuperclass is ArrayList

2004-03-15 Thread marathonkati
Hi I'm sorry, I'm not using the same thread. My computer broke and I have to use a wired webmail support on a friends computer. I posted this question a view days ago http://www.mail-archive.com/[EMAIL PROTECTED]/msg17461.html I solved the problem by writing a second get-method that gives back a

Re: [castor-dev] not all attributes of object are marshalled

2004-03-15 Thread Keith Visco
I think the problem is coming from the container="false". Try removing that and it should work ok. --Keith [EMAIL PROTECTED] wrote: > > Hello, > > I'm un/marshalling a HashMap but not all attributes of the key are getting > marshalled. Of course I can't unmarshall them either. > Following i

Re: [castor-dev] unable to find FieldDescriptor

2004-03-15 Thread Keith Visco
You need to modify your mapping.xml file as such: should be: --Keith jose luis campos wrote: > > org.xml.sax.SAXException: unable to find FieldDescriptor for > 'product_group' in ClassDescriptor of org.sibum.amazon.Catalog{file: > [not available]; line: 6; column: 16} > > > What im

[castor-dev] not all attributes of object are marshalled

2004-03-15 Thread marathonkati
Hello, I'm un/marshalling a HashMap but not all attributes of the key are getting marshalled. Of course I can't unmarshall them either. Following is a part of my mapping file. graphicData is the HashMap I'm saving. ..

[castor-dev] unable to find FieldDescriptor

2004-03-15 Thread jose luis campos
org.xml.sax.SAXException: unable to find FieldDescriptor for 'product_group' in ClassDescriptor of org.sibum.amazon.Catalog{file: [not available]; line: 6; column: 16}   What im doing wrong? Please check the xml file at http://rcm.amazon.com/e/cm?t=universitstea-20&l=st1&search=XML&mode=books&p=

Re: [castor-dev] Why DuplicateIdentityException for read only objects/fields ?

2004-03-15 Thread Mark Egloff
Thank you Werner and Bruce, If this is the answer that "read-only" could only be used for simple data types, yes than I would submit this as bug. I added below the code of my problem. As you have guessed, yes, I use there the "DataBase.load()" feature. Does this make any difference as using OQ

Re: [castor-dev] Source generator error with binding file

2004-03-15 Thread Damian ONeill [AePONA]
Thanks Keith, I really should read the docs before ploughing in. Quoting Keith Visco <[EMAIL PROTECTED]>: > > > > Damian, > > That's because your binding-file is not a binding-file, but rather a > mapping file. They are different file types, so you are giving Castor > the wrong file type.

Re: [castor-dev] Source generator error with binding file

2004-03-15 Thread Keith Visco
Damian, That's because your binding-file is not a binding-file, but rather a mapping file. They are different file types, so you are giving Castor the wrong file type. Please see the following for more information on binding-file: http://castor.exolab.org/sourcegen.html#Binding-File Please s

Re: [castor-dev] Ignore extra elements when Unmarshalling bug??

2004-03-15 Thread Keith Visco
Robert, please see my previous reply...it's the difference between using non-static and static unmarshal method. All non-static configuration on the Unmarshaller cannot be accessed via the static unmarshal method, which you were using in your first example. Now you are using a non-static method

Re: [castor-dev] Ignore extra elements when Unmarshalling bug??

2004-03-15 Thread Keith Visco
Hi Robert, It's not a bug...you are using a static unmarshal method, so any of your changes done on the Unmarshaller will not be accessible from the static method. --Keith [EMAIL PROTECTED] wrote: > > I am trying to parse a file that may have additional elements that are unforeseen. > I do

Re: [castor-dev] XML validation problem whith multiple nested class

2004-03-15 Thread Keith Visco
Thanks Roman, I'll mark that as PCDATA for now instead of ID. --Keith Roman Maeder wrote: > > Hi > > I am using the new nested class mapping feature to map key/value pairs to a > Java HashMap. The XML mapping doc says that this can be used if more than > one mapping for a particular class

[castor-dev] Source generator error with binding file

2004-03-15 Thread Damian ONeill [AePONA]
Folks I have attached an xsd and a binding file. I have an xsd that defines node and Node, subsequently I get a class name collision. If I use the binding file attached I get the following error when I execute the generation command. C:\syncml>java -cp castor-0.9.5.3.jar;xerces-2.4.0.jar org.ex

[castor-dev] Casting from java.lang.Object to Castor Object

2004-03-15 Thread Vaidya, Prajakta P
Hi,   I am trying to do the following operation vmd = (VIDEOMD) mets.getAmdSec(5).getTechMD(0).getMdWrap().getXmlData().getAnyObject(0); and I get the following exception: Unmarshaller Exception: java.lang.ClassCastException VIDEOMD is a Castor generated object and so it “mets”. The

[castor-dev] primitive type hasXXX() method return true always

2004-03-15 Thread Bora, Prantor
Hi, We are seeing this behavior that for primitive types fields. The hasXXX() method generated always returns true even when our xml does not have a value. Any idea why. I downloaded Castor's example and ran InvoiceTest.java by adding "System.out.println("my quantity = " + item[i].hasQuantity()

Re: [castor-dev] Ignore extra elements when Unmarshalling bug??

2004-03-15 Thread Robert La Ferla
This is definitely a bug in Castor. If you instantiate the Unmarshaller using a class, it works fine: unmarshaller = new Unmarshaller(MyType.class); unmarshaller.setIgnoreExtraAttributes(true); unmarshaller.setIgnoreExtraElements(true); reader = new FileReader(filename); myobj = (MyType)unmarsha

[castor-dev] Ignore extra elements when Unmarshalling bug??

2004-03-15 Thread robertlaferla
I am trying to parse a file that may have additional elements that are unforeseen. I do not need to parse those elements. Therefore, I tried telling the unmarshaller to ignore extra elements. It does not seem to work. Here's the exception: org.xml.sax.SAXException: unable to find FieldDesc

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

2004-03-15 Thread Jeremy Haile
I also receive this problem. I posted about it this problem two weeks ago, but was not able to resolve the issue. See the following post: http://www.mail-archive.com/[EMAIL PROTECTED]/msg17337.html I still have this issue today and am forced to run Castor with validation turned off. I would ap

Re: [castor-dev] org.exolab.castor.indent=true causing problem by

2004-03-15 Thread Yaldiz, Sunay
Sorry, I forgot to delete the attachment of xerces library in my previous email. It was not meant to be sent. Sunay -Ursprüngliche Nachricht- Von: Yaldiz, Sunay Gesendet: Montag, 15. März 2004 12:51 An: [EMAIL PROTECTED] Betreff: Re: [castor-dev] org.exolab.castor.indent=true causing

Re: [castor-dev] saving a HashMap

2004-03-15 Thread marathonkati
Hi, The question of Roman helped a little bit to solve my problem. Un/marshalling workes fine now. However when I unmarshall my HashMap the value and the key are both of type org.exolab.castor.mapping.MapItem. The problem is that I can't cast the value back to the original type. Can somebody gi

[castor-dev] update object in a different table (sql many-table) for collection type vector.

2004-03-15 Thread Avalivin Jhons
 Hi Bruce,//the tx context above is never made aware of the testEntry object. Because each tx above contain separate contexts, you must make use of long transactions whereby an object is read in the first tx and persisted in the second tx. In order to bridge the gap between each tx, the objects in

[castor-dev] XML validation problem whith multiple nested class mappings

2004-03-15 Thread Roman Maeder
Hi I am using the new nested class mapping feature to map key/value pairs to a Java HashMap. The XML mapping doc says that this can be used if more than one mapping for a particular class is needed. I am using the org.exolab.castor.mapping.MapItem class to map my XML data to.