Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 0.9.5.1
-
Fix Version/s: None
-
Component/s: XML
-
Labels:None
-
Environment:Operating System: Windows 2000
Platform:
-
Bugzilla Id:1467
-
Number of attachments :
Description
The following points identify the problem I am having.
1. The element name "Effective_Date" and value exists in the xml file under
a "Group" level and is mapped to a java class using a mapping.xml file.
2. The same element name, "Effective_Date", is added to the same xml file in a
different location "Group_Plan" and is not mapped in the mapping.xml file.
3. The castor.properties file has the following setting:
org.exolab.castor.xml.strictelements=false (If new elements are added and not
mapped, I want to ignore these). I also used "setIgnoreExtraElements(true)"
which does the same thing. I set the latter to false, just to prove that other
elements that were not mapped were being ignored; and they were.
4. If the newly added element name is changed to a unique name, such as
Effective_Date2, it does not cause an error. Again Effective_Date2 is not
mapped.
5. I am actually using JDK1.4/IBM.
6. The following is the actual error message:
org.xml.sax.SAXException: unable to add 'Effective_Date' to <Group_Plan> due to
the following exception:
>>>--- Begin Exception ---<<<
java.lang.IllegalArgumentException: Type conversion error: could not set value
of Group_Effective_Date(java.lang.String) with value of type java.lang.String
7. The following is the snippet from the xml file that shows two
elements "Effective_Date" that are defined in different locations. The one in
Group_Plan is not defined in the corresponding java class. I indented this as
well as I could, but the wrap-around makes it harder to see.
<Group>
<Group_ID>74486</Group_ID>
<Group_Name>All RRs Medicare Elig in Premier Plan</Group_Name>
<Effective_Date>2002-08-01</Effective_Date>
<Termination_Date>2003-07-31</Termination_Date>
<Eligibility_ID>1</Eligibility_ID>
<Split_Family>N</Split_Family>
<Bill_Group_Name>All EEs</Bill_Group_Name>
<Group_Plan>
<Customer_Plan_ID>16</Customer_Plan_ID>
<Invoice_Distribution_Method>MAIL</Invoice_Distribution_Method>
<Group_Plan_Original_Effective_Date>2002-08-
01</Group_Plan_Original_Effective_Date>
<Effective_Date>2002-08-01</Effective_Date>
<Termination_Date>2003-07-31</Termination_Date>
<Group_Market_Type>
<Market_Type_Code>00</Market_Type_Code>
<Market_Type_Name>PCP/Wide Access</Market_Type_Name>
<Structure>
<Group_Market>
<Market_Code>N/A</Market_Code>
<Market_Name>Compressed</Market_Name>
<Suffix_Code>AG</Suffix_Code>
<Suffix_Type_Code>2</Suffix_Type_Code>
<Plan_Variation_Code>0028</Plan_Variation_Code>
<Reporting_Code>0028</Reporting_Code>
<Claim_Account_Number>028</Claim_Account_Number>
<Premium_Account_Number>024</Premium_Account_Number>
<Sub_Group_Code>28028</Sub_Group_Code>
<Effective_Date>2002-08-
01</Effective_Date>
<Termination_Date>2003-07-
31</Termination_Date>
<Group_Network>
<Network_Org_ID>0</Network_Org_ID>
<Network_Name>Compressed</Network_Name>
<Account_Division_Code/>
</Group_Network>
</Group_Market>
</Structure>
</Group_Market_Type>
</Group_Plan>
</Group>
8. In the mapping file, I tried adding a location for the Group level
Effective_Date. This did not alter the result. Below is that specific code. I
also tried it without the 'node = "element"' and it did not alter the result.
<field name="Group_Effective_Date" type="string" required="true">
<bind-xml name="Effective_Date" node = "element" location="Customer/Group"/>
</field>
9. In the mapping file, I tried the following code, but it also had no effect
on the error.
<class name="com.uhg.ut.pbd.dm.acisextract.bo.Group">
<map-to xml="Customer.Group"/>
Activity
| Field | Original Value | New Value |
|---|---|---|
| issue.field.bugzillaimportkey | 1467 | 22905 |
| Assignee | Keith Visco [ kvisco ] |
Issue 1025 ( http://jira.codehaus.org/browse/CASTOR-1025 ) is a duplicate of this issue.