Geometry collections (gtype 4) and validation rules

Hi folks,
I am not finding anywhere any particular rules about how a geometry collection should validate. What is the best reference (even outside Oracle Spatial)?
Below is a collection geometry of a single point and three polygons (some of which overlap each other). When I remove the point and test the three polygons as a multipolygon I get back a 13351 error as expected. But when wrapped up in a collection I get back TRUE. Are there really any rules for collections? Or does anything go?
In this use case the collection is the source data but then I pull out the polygons further down the road and - whammo - invalid geometries.
I see the same results on both 10gR2 and 11gR2.
Thanks!
Paul
Collection Geometry of one point with three overlapping polygons - validates TRUE
SELECT
SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(
   SDO_GEOMETRY(
      2004,
      8265,
      NULL,
      SDO_ELEM_INFO_ARRAY(
         1,
         1,
         1,
         3,
         1003,
         1,
         13,
         1003,
         1,
         23,
         1003,
         1
      SDO_ORDINATE_ARRAY(
         -84.3508498737178,
         45.9775103765449,
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168,
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168,
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168
   0.001
FROM
dualPoint removed making it 2007, now throws 13351 error
SELECT
SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(
   SDO_GEOMETRY(
      2007,
      8265,
      NULL,
      SDO_ELEM_INFO_ARRAY(
         1,
         1003,
         1,
         11,
         1003,
         1,
         21,
         1003,
         1
      SDO_ORDINATE_ARRAY(
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168,
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168,
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168
   0.001
FROM
dual

Baris,
I came across this on a different forum and was very, very surprised that it validates.
SELECT SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(
MDSYS.SDO_GEOMETRY(2005,4326,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1,3,1,1,5,1,1),MDSYS.SDO_ORDINATE_ARRAY(18.5272949231966,43.9245558053237,18.527391754093,43.924240327095,18.5310243924313,43.9252225514267))
, 0.0001) IsThisOk
FROM DUAL
Based upon your comment then, validation sees the first element as correct ... what is the second and third element then? I assume points but this method of defining a multipoint is an undocumented feature :-) .... or did i miss something
This is what the fellow was actually looking for but he didn't pay much attention to the docs ....
MDSYS.SDO_GEOMETRY(2005,4326,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,3),MDSYS.SDO_ORDINATE_ARRAY(18.5272949231966,43.9245558053237,18.527391754093,43.924240327095,18.5310243924313,43.9252225514267))
r,
dennis

Similar Messages

  • Business rules and validation at view level?

    Hello,
    I was hoping to be able to do attribute validation at view level but I could not find this option and I would need to help to determine how to achieve this.
    I have a view based on several entities. That view include a updatable entity and others read only entities.
    Basically I have a season entity/ table and a dateRange Entity/table. The model is that dateRange is a child of Season ( a season can have several dataranges...).
    I need a validation rule to fire when users change the dateRange in the UI, I have to make sure that the date range attributes from and to are in the range of the season definition (season table has two attributes: starting date and ending date). So I would like to verify that
    daterange.from > season.startingdate and daterange.to < Season.endingdate and daterange.from < daterange.to
    Can I do that in some way? I don't how to resolve this at the entity level. the entity does not know about other entities, here I need a validation of the transaction by checking serveral entities.
    Thank you very much for your help

    You can do this programatically.
    Check out [url http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcrules.htm#sm0241]this part of the docs (and the surrounding chapter as well)
    John

  • Validation Rule for the coding mask and project profile

    Hi,
    I have two project profile and two coding masks. I want one project profile to be only used by defined coding mask for that profile.
    So i have maintained a validation rule as follow -
    Prerequisite - Project Def. :1-3: = 'A5M'
    Check - Project Profile = 'ABC'
    And if the above check is failed then give me an error message.
    Now i am trying to add the project profile other than 'ABC' for the coding mask starting with 'A5M', but still the system is not giving me an error message configured and allowing me to save the project.
    Is there any other thing which is tobe activated other than assigning the validation rule in project profile and clicking the Autom. validation check box in OPSA.
    Request to confirm share the views.
    Thanks

    Hi,
    Try the following, this must work.
    Prerequisite
    PROJ-PROFL = "ABC"
    Check
    PROJ-PSPID: 1-3: = "A5M"
    Message
    Project profile & Coding mask wronly assigned
    Repeat the same for other project profiles also.
    Enter this validation in your project profile. Check in "Auto Validation"
    In transactinal data,
    Enter project def and select the wrong profile. when you save the project system will show you the error message.
    Hope this will help you.
    Regards
    Prabu

  • Renaming Validation-rule.xml and Validation.xml

    Hi
    Is it possible to rename Validation-rule.xml and validation.xml files in the Struts Validation framework.
    will the validation work both the files are renamed to say abc-rule.xml or xyz.xml.
    please provide your feedback on this.
    Thanks
    Vikeng

    vikeng wrote:
    please provide your feedback on this.I think that it would be better if you asked that on an Apache Struts forum (or mailing list).

  • BPC Validation Rules and Reports

    We have validation rules set up, however, the client wants a report that shows the information that does not validate.  Does such a report exist? or do I need to write a script?

    Hi,
    You can acheive this by using Use BADI implementation under Validation maintenance.
    hope it helps...
    regards,
    Raju

  • SDO_UTIL.EXTRACT fail when single item in geometry collection

    Hi folks,
    Didn't we have a discussion a while back on whether geometry collections are valid when they only contain a single item? Darned if I can find it with the OTN search function. I think back then the issue was either a multipolygon or multistring with a single item.
    Anyhow this time around I have a 2004 geometry collection that for no particular reason happens to only contain a single point. This collection geometry with one item validates TRUE. Just like with multipolygons and multistrings when I attempt to EXTRACT the result I just get back the input geometry (the 2004 in this case) rather than the component part (the 2001). I think this is because there is a test in the EXTRACT routine that checks if there is but one element and if so then returns the original input assuming the original input was gtype 1,2 or 3. Unlike a multipolygon or multistring where I can just assume the output is a polygon or string respectively, with a geometry collection I am rather stumped to figure it out short of inspecting the SDO_ELEM_INFO array. At that point I am kind of writing my own EXTRACT function. I guess I have to do that.
    Anyhow, this would lead one to believe that a geometry collection with only one element is not really valid for Oracle Spatial. Or is this a bug in SDO_UTIL.EXTRACT? I have no recollection if that previous conversation ever decided this question. I might humbly suggest that either SDO_UTIL.EXTRACT should successfully unpack the single item or SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT should report an error for this type of collection.
    I looked over metalink and cannot find anything logged on the issue. The results are the same on 10gR2 and 11gR2.
    If anyone remembers the previous discussion please post the link.
    Cheers,
    Paul
    SELECT
    SDO_UTIL.EXTRACT(
       SDO_GEOMETRY(
          2004,
          8265,
          NULL,
          SDO_ELEM_INFO_ARRAY(
             1,
             1,
             1
          SDO_ORDINATE_ARRAY(
             -100.515216953125005261426849756389856339,
             39.98440002562352191262107226066291332245
       1
    FROM
    dual

    Ok,
    Let's make a quick distinction between the SDO_GTYPE (all four digits) and the lower-case "gtype" meaning the last digit - e.g. the "type of geometry" per the Oracle Spatial book.
    I submitted the above SDO_UTIL.EXTRACT issue to Oracle support yesterday and as I rather expected the response was that this is "expected behavior". The analyst noted that my what I called a collection per its gtype was not a collection but a point. He made the distinction between the gtype and the "geometry definition". I assume by that he means the elem_info_array. So in fact djonio (user 633187) back in November 2009 under Matt's thread had the best answer. I don't see anyway to credit him. :) Hey djonio if you post a response I will give this answer to you.
    So the gtype is in truth a kind of convenience marker or fancy hat "hinting" at the contents of the geometry object, but by no means defining it. A point wearing a 2004 hat is still a point and a valid Oracle Spatial point at that. If you want to "really" know what a geometry is you need to unpack and inspect the elem_info_array. So those of us writing code which is only inspecting the gtype are going down the wrong road particularly when our data might be of suspect quality. As djonio says the gtype is a performance shortcut. In my defense I think lots of folks (e.g. certain software from California) work off the gtype alone. So its not like we can just set the gtypes all to be "9999" and say the heck with it all. :) So incorrect gtypes are bad as they hose the performance shortcut that the gtype allows (and certain software demands) but a bad gtype is NOT an invalid geometry. I am not sure I am entirely sold on that idea as VALIDATE_GEOMETRY certainly looks at the gtype when doing its evaluation. Alas, I suppose its all shades of gray here as validate geometry is just responding to my gtype "hint" to give me the best feedback on my input. Perhaps there is a distinction between "good", "bad" and "imprecise" gtypes.
    My next question is if the gtype system is just a fancy hat, then how best to catalog basic geometry types? Both multi-points and point clouds share gtype 5 but the elem_info marks them as being unique data types that really require unique handling (I never use point clouds so feel free to argue that point). So rather than just mumbling "5" over and over to myself, what vocabulary might be used? Is it GML time? Hmm, does GML even have a point cloud datatype? I suppose I just make something up? Does anyone else have a system they are using?
    Thanks for reading this rambling, feel free to shoot down everything I say. I clearly need more coffee this morning.
    Paul

  • Validation rules applied to data migration templates at import

    Hi everyone!
    First post here for me, so please bear with me if I missed something.
    My company has just started the initial implementation of ByDesign. We come from a set of disparate and partially home-grown systems that we outgrew a few years ago.
    As part of this initial phase, we are basically re-creating the data on customers, suppliers, etc. since none of our existing systems makes a good source, unfortunately. We will be using the XML templates provided by ByDesign itself to import the relevant data.
    It has become clear that ByDesign applies validation rules on fields like postal codes (zip codes), states (for some countries), and other fields.
    It would be really helpful if we could get access to the rules that are applied at import time, so that we can format the data correctly in advance, rather than having to play "trial and error" at import time. For example, if you import address data, the first time it finds a postal code in the Netherlands which is formatted as "1234AB", it will tell you that "there needs to a space in the 5th position, because it expects the format to be "1234 AB". At that point, you stop the import, go back to the template to fix all the Dutch postal codes, and try the import again, only to run into the next validation issue.
    We work with a couple of very experienced German consultants to help us implement ByDesign, and I have put this question to them, but they are unaware of a documented set of validation rules for ByDesign. Which is why I ask the question here.
    So just to be very celar on what we are looking for: the data validation/formatting rules that ByDesign enforces at the time the XML data migration templates are imported.
    Any help would be appreciated!
    Best regards,
    Eelco

    Hello Eelco,
    welcome to the SAP ByDesign Community Network!
    The checks performed on postal codes are country specific, and represent pretty much the information that you would find in places like e.g. the "Postal Codes" page in Wikipedia.
    I recommend to start with small files of 50-100 records that are assembled of a representative set of different records, in order to collect the validation rules that need reactions based on your data in an efficient way. Only once you have caught these generic data issues, I would proceed to larger files.
    Personnaly I prefer to capture such generic work items on my list, then fix the small sample file immediately by editing, and do an immediate resimulation of the entire file, so that I can drill deeper and collect more generic issues of my data sample. Only after a while when I have harvested all learnings that were in my sample file, I would then apply the collected learnings to my actual data and create a new file - still not too large, in order to use my time efficiently.
    Best regards
    Michael  

  • Any API to get a collection of object and it's property in a page

    Just wondering whether Oracle provides any API which is able to return a collection of object in page and then I can read the object name and its attributes. If such API exists, it will make my life easier to code the logic because I don't have to hardcode the object name.

    I found the solution myself:
    Using a cursor of
    select ITEM_NAME, LABEL from APEX_030200.APEX_APPLICATION_PAGE_ITEMS
    where
    workspace=[Workspace Name] and
    application_id=[APP_ID] and
    page_id=[PAGE ID]
    order by
    display_sequence;
    Then I can use v("ITEM_NAME") to find out the values of each page item. With this method I don't have to hardcode all the item name in the PL/SQL code. e.g. If I want to validate a page that all items cannot be empty, I can use this way, rather then creating multiple validation rules.

  • Differerence betwin distubution rules and settelment rule

    < MODERATOR:  Message locked.  Please post this message in the [Controlling forum|SAP ERP Financials - Controlling;. >
    Hi gurus any doby explain the difference betwin ditibution rule and settelment rule.

    Hi friend,...
    The distribution rule is part of the settlement rule. You specify the following for a settlement sender:
    Settlement receiver
    Settlement share (percentage or proportional)
    Settlement type (periodic or cumulative)
    Validity of the distribution rule
    The system automatically assigns a settlement rule to the production order when the order is created. The assignment is carried out via the default rule defined in Customizing.
    The settlement rule includes one or more distribution rules for the production order. The distribution rule consists of a cost receiver, a settlement share and a settlement type:
    The settlement receiver determines to which cost object the actual costs of the production order are to be settled. Possible receivers include
    a material
    a cost center
    an internal order
    a sales order
    a project
    a network
    a fixed asset
    The settlement share determines the percentage rate or the equivalence number to distribute the costs to the individual cost receivers.
    The settlement type determines whether all the costs are settled which were incurred for the order (full settlement) or whether the costs collected on the order are to be settled periodically (periodic settlement).
    for more details u may go the following link...
    http://help.sap.com/saphelp_47x200/helpdata/en/e9/7a0716cde011d19eb4080009b0db33/frameset.htm

  • Not able to run validation using validation.xml & validator-rules.xml

    Hello Friends,
    I am not able to run validation using validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    </form-beans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    </global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    </action>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    </form>
    </formset>
    </form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    } else {
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come from a real data
    source such as a database. */
    private static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.

    Hello Friends,
    I am not able to run validation using
    validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error
    messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    ans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    tion>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in
    className="org.apache.struts.validator.ValidatorPlugI
    ">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    >
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}"
    resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    /form>
    </formset>
    form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new
    EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria
    was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    else {
    results =
    service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access
    by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come
    from a real data
    source such as a database. */
    ivate static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if
    (employees.getName().toUpperCase().indexOf(name.toU
    pperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.
    Hi,
    Your error message are not displaying because u does not made Message-Resoucrce property file (Resource Bundle) when you make it .
    give it entry in
    struts-config.xml
    <message-resources parameter="ApplicationResources" />
    and
    define key and corresponding error message to key in this ApplicationResources i.e
    #Error Resources
    label.search.ssNum=Plz Enter correct ssNum

  • Exit in the Validation rule is not working in Project system

    Hi Team,
    I have created a validation rule for wbs and inserted a exit under check condition. But when i trying to test the validation rule, exit is not called. Is there any other step to activate the exit??
    Best regards,
    Dileep

    Hi,
    The code you have written in the exit must be activated. Please check the same.
    Regards,
    Harsh.

  • ADF: showing error message on a validation rule programatically

    Jdeveloper : 11.1.2.2.0
    i m using ADF. i ve a form that contains input text that is binded to a managed bean property.
    that input text value is inserted into an entity attribute.the attribute in the entity has a validation rule.
    i submit the form and in my managed bean i call
    am.getDBTransaction().commit();
    i want when i submit the form and the when the commit is called and throws exception regarding the validation rule,i want to show an error note window same style like this http://oi50.tinypic.com/15fhnpt.jpg
    how can i do that ?
    thanks in advance :)

    Hi,
    i submit the form and in my managed bean i call
    am.getDBTransaction().commit();A strict NO NO for doing this. You add the commit action to the binding and call the execute the commit operation binding programatically.
    i m using ADF.ADF is vast. Be specific on the technologies you use (ADF BC and ADF Faces?)
    that input text value is inserted into an entity attribute.the attribute in the entity has a validation rule.Are you doing something special with the binding you have in bean? If not, why don't you Drag and Drop the VO from the data control directly? (set the af:messages tag to have inline=true).
    -Arun

  • Error while Loading the validator-rules.xml in Struts 1.2

    Hello Guys,
    I am trying to use the Struts 1.2.4 on Jdk1.3 inside WSAD5.1 and i get the following error when loading the application. It breaks on the fist line inside validator-rules.xml witht hte following error. My first line in the validator-rules.xml is
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
    I do have the commons-validator inside the Lib folder. I also tried it out by removing the above reference to dtd in the validator-rules.
    Can any one help me with some suggestions on something i am missing.
    ----------------------ERROR BELOW------------------------------------------
    [11/23/04 17:45:44:772 EST] 3ca45923 ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validator-rules.xml'
    [11/23/04 17:45:44:772 EST] 3ca45923 ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validation.xml'
    [11/23/04 17:45:45:053 EST] 3ca45923 Digester E org.apache.commons.digester.Digester Parse Error at line 1 column 17: Document is invalid: no grammar found.
    [11/23/04 17:45:45:063 EST] 3ca45923 Digester E org.apache.commons.digester.Digester TRAS0014I: The following exception was logged org.xml.sax.SAXParseException: Document is invalid: no grammar found.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1591)
    at org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:159)
    at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:233)
    at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:164)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
    at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
    at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
    at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
    at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
    at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
    at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
    at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
    at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
    at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
    at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
    at java.lang.reflect.Method.invoke(Method.java:386)
    at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
    at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
    org.xml.sax.SAXParseException: Document is invalid: no grammar found.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1591)
    at org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:159)
    at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:233)
    at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:164)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
    at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
    at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
    at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
    at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
    at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
    at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
    at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
    at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
    at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
    at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
    at java.lang.reflect.Method.invoke(Method.java:386)
    at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
    at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
    [11/23/04 17:45:45:093 EST] 3ca45923 Digester E org.apache.commons.digester.Digester Parse Error at line 1 column 17: Document root element "form-validation", must match DOCTYPE root "null".
    [11/23/04 17:45:45:093 EST] 3ca45923 Digester E org.apache.commons.digester.Digester TRAS0014I: The following exception was logged org.xml.sax.SAXParseException: Document root element "form-validation", must match DOCTYPE root "null".
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1591)
    at org.apache.commons.validator.ValidatorResources.<init>(ValidatorResources.java:159)
    at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:233)
    at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:164)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
    at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
    at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
    at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
    at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
    at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
    at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
    at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
    at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
    at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
    at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
    at java.lang.reflect.Method.invoke(Method.java:386)
    at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
    at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)

    This is a JDeveloper Forum, not a Websphere one. A better place to ask this question woudl be on a Forum that deals with WSAD or the Struts user list (http://struts.apache.org/learning.html)

  • How to create a validation rule in SAP BODS Job

    Hi Experts
    I have created a BODS Job and in that job i have to create a validation rule as if the cust_id is null the loading must stop.
    I dont have idea where i have to define this validation rule in the Job and how to stop the load job if the validation rule file.
    My Job was defined like below image
    Please guide me where i have to define the validation rule and how to stop the load job.
    Thanks in advance
    PrasannaKumar

    Hi samatha b
    Thanks for your response. I have done as you said and now i can rise the exception.
    I have another requirement as per the validation transformation the data will load into Pass table and Fail table after job execution. If any data entered into fail table i have delete the data loaded into Pass table.
    Here i am facing problem as my target tables are MySQL tables and when i am writing scripts i wrote the script as
    sql('database','delete from <tablename>');
    but as it is an SQL Query execution it is rising exception for the query.
    How can i delete the data loaded into MySQL Target table using scripts.
    Please guide me for this error also
    Thanks in Advance
    PrasannaKumar

  • How do you create custom validation rule in WS 9.2?!?!?!

    Hello,
    I am using Workshop 9.2. I created a page flow, and want to do some form validations.
    I saw the simple 9.2 example, but it is only good for very basic validation, what if you have to validate the form field against a database, must you write a custom validation rule? HOW would you do this in 9.2 so that will still stay with the workshop/netui paradigm?
    http://beehive.apache.org/docs/1.0.1/netui/validation.html
    Keith

    Hi Keith,
    Staying within the declarative validation framework the answer is probably that you do need to write a custom validation rule and refer to it using the @Jpf.ValidateCustomRule annotation.
    The NetUI Annotation Reference shows how the Struts validations are supported via the framework.
    http://beehive.apache.org/docs/1.0.1/netui/annotations/pageflow_annotations.html
    Specifically, if you look through the @Jpf.Validate* annotations, while most of these are "canned" common validations, there are a few that are more open-ended, such as @Jpf.ValidateMask and @Jpf.ValidateValidWhen.
    Those two let you write the validation logic in the annotation while @Jpf.ValidateCustomeRule only refers to a custom rule in the struts validator file.
    In any case, there is a validation rule editor which should help in authoring and managing the annotations. In the Page Flow Explorer or Page Flow Editor just right click on the action or form bean bean of interest and choose Validation Rules and the appropriate scope.
    I hope that's of some use,
    Troy

Maybe you are looking for

  • Using nclob in Oracle

    Hi All, In our Oracle database,one of the fields is of type nclob. I need to call a stored proc which has this field(nclob) as OUT parameter. Since JDBC does not support nclob,how do I handle this situation? Thanks

  • JEditorPane and copy/paste

    Hello, I've got an applet with an editable JEditorPane. I can make a copy/paste in the editor from any application outside the applet and from the applet itself. But with Word under windows, the paste method tries to insert html rendered by word and

  • Single JCO Connection at Runtime.

    Hi I have 3 Function modules (3 Models) to be called in my webdynpro project. Each model is taking one JCO connection at runtime. How do i minize my connections at runtime? regards Radha Krishna

  • Identifying Programs using BDC.

    Hi Experts, I have a peculiar requirement. i have a list of programs. I have to develop a logic which will help me identify those programs using BDC (using batch input session or Call transaction). I also have to identify the transactions called usin

  • Coke free songs error

    Hey everyone im hoping somebody can help me. I loaded all 5 of my free songs (through Coca Cola promo) onto my itunes a while back. I thought I had used them all, but when I go to the itunes store and try and download a song it says: 'Your free song