Yes I have the same problem. This happens only for primitive data types. This is because of the fact Java will initialize primitive data types even if you don't.
I have opened a bug for this at http://issues.apache.org/jira/browse/MUSE-233 When declaring default values (in the RMD) for properties whose type is a primitive data type, Muse tries to initialize those properties by calling SimpleResourcePropertyCollection.insertOrUpdate(). Insert or update first does a getResourceProperty to see if a value already exists. If it does then it does a update otherwise an insert. The problem seems to be that updateResourceProperty() actually calls validateInsert() which will fail if you have defined the cardinality of the property to be 1. This happens only for primitive data types because Java will already initialize them even if you don't. So when Muse calls getResourceProperty() it will see that a value already exists and try to do an update. For object types, which automatically get initialized to null, Muse will correctly call insert to add the new value. Balan Subramanian Autonomic Computing, IBM, RTP, NC 919.543.0197 | [EMAIL PROTECTED] <[EMAIL PROTECTED]> 05/30/2007 05:45 AM Please respond to [email protected] To <[email protected]> cc Subject RE: Possible Bug with InitialValue Are you using the setXXXX(int someName) or updateXXXX(int someName), when changing the value? As far as I understand update works on the predefined value, where set attempts to add another new value to an array of the value (as if maxoccurs was higher than 1) /Lenni -----Original Message----- From: Jürgen Mangler [mailto:[EMAIL PROTECTED] Sent: 29 May 2007 21:56 To: [email protected] Subject: Possible Bug with InitialValue a custom property is introduced: * ref=xxxxx * minoccurs=1, maxoccurs=1 * element xxxxx is of type xsd:integer in the .rmd File the InitialValue is set for this property. <InitialValue> <tns:xxxxx>0</tns:xxxxx> </InitialValue> After the generation of the server, without changing anything the following error occurs: [ID = 'AboveMaximumPotential'] The property {http://xxxx.org/vienna/e1}xxxxx' has a maxOccurs value of 1. If the insertion were performed, there would be 2 instances of the property left, which is above the maximum. Can somebody confirm this? This is maybe a bug. Maybe its internal set twice? Jürgen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
